Login  |  RegisterAll languages • All CC0 • No attribution
CC0 ONLY — hard rule. We do NOT list MIT, Apache, BSD, GPL, LGPL, MPL, or “free with attribution”. If it is not CC0 1.0 with proof, it does not list. Most code on the internet is not CC0 — that is why this catalogue is small on purpose. It is a curated CC0 shelf, not a mirror of the whole internet.
12CC0 demo codebases
12CC0 demo snippets
8Languages in demo
100%CC0 — 0% other licenses

Code

🏆 Leaderboard — Ranked by CC0 quality score

Score = stars + downloads + docs + tests + CC0 proof. Tap a row to open it. Ranking is demo, not real GitHub stars.

RankNameLanguageTypeStarsDownloadsScore

Catalogue — CC0 codebases & snippets

12 CC0 demo entries

Search, filter by language / type / category, tap a card or leaderboard row to read code. No real repo is cloned in demo.

Submit Code — CC0 only

We check proof before listing. No proof = no listing. Do not submit MIT, Apache, GPL, or “free with attribution” code here — they belong on a different page, not opencode.

Why CC0 is different for code

CC0 1.0
Copy, paste, ship, sell. No LICENSE file to keep, no attribution header, no share-alike. Put it in a closed product if you want.
NOT CC0
MIT = keep license + attribution. Apache = keep license + notice. GPL = share-alike. All useful, all rejected here.
How we verify
Repo, gist, or archive must say CC0 1.0 for that exact code. A repo with no LICENSE file is not CC0 — it is all rights reserved by default.
Backend  ·  Template · Proposed · Not connected

Backend, opencode Backend, Template

Right now opencode is a demo catalogue plus ranking, filters, code viewer, copy, submit form, no repo cloned, no real download. This backend is the map to make it real: code entries, CC0 proof, files, ranking. Proposed, not connected.

01 / Files to create
api/opencode/entries.php    GET /api/opencode/entries
api/opencode/entry.php      GET /api/opencode/entry?id=
api/opencode/submit.php     POST /api/opencode/submit
api/opencode/download.php   GET /api/opencode/download?id=
api/opencode/rank.php       GET /api/opencode/rank
sql/opencode_tables.sql

Keep the tinyfiles PHP pattern: /api/bootstrap.php, json_in() / json_out(), prepared PDO.

02 / Database tables
opencode_entries
  id BIGINT AUTO_INCREMENT PRIMARY KEY
  title VARCHAR(200) NOT NULL
  author VARCHAR(200) NOT NULL
  language VARCHAR(50) NOT NULL
  entry_type VARCHAR(20) NOT NULL
  category VARCHAR(50) NOT NULL
  tags VARCHAR(500) NOT NULL
  license VARCHAR(20) NOT NULL DEFAULT 'CC0-1.0'
  proof_url TEXT NOT NULL
  code_text MEDIUMTEXT NULL
  status VARCHAR(30) NOT NULL DEFAULT 'pending'

opencode_ratings
  id BIGINT AUTO_INCREMENT PRIMARY KEY
  entry_id BIGINT NOT NULL
  user_id BIGINT NOT NULL
  stars TINYINT NOT NULL
  UNIQUE (entry_id, user_id)
03 / API endpoints
GET /api/opencode/entries?language=Python&type=Codebase&category=Game&q=todo&sort=rank
- returns only status=approved AND license=CC0-1.0, never any other license

GET /api/opencode/entry?id=1
- returns one entry, proof_url, code_text, ranking

POST /api/opencode/submit
{ "title": "...", "author": "...", "language": "Python", "entry_type": "Snippet", "proof_url": "https://..." }
- creates pending entry, never auto-approves

GET /api/opencode/download?id=1
- serves zip with code + LICENSE-CC0.txt, only if approved + CC0

GET /api/opencode/rank?language=all
- returns ranking by score = stars + downloads + docs + tests + CC0 proof

License filter must be server-side. Never trust client license flag.

04 / Cooldown, moderation and validation
// Cooldown: 1 search per 1s, 1 submit per 60s, 1 download per 2s, 1 rating per 5s
// Validation: title 2 to 200 chars, author 2 to 200 chars, proof_url must be http(s), language + type + category must be in allowlist
// CC0 gate: if license != CC0-1.0, reject. If proof_url missing, reject. If proof does not say CC0, reject in review.
// Safety: store code zips outside web root, scan uploads, limit zip to 20 MB, never execute submitted code, never serve .exe, escape code in HTML
// Privacy: submitter email never shown publicly, author name only if author consents

Keep disclaimer until this ships: Tinker toy, not live yet.

05 / Frontend wiring
// On Search / Language / Type / Category / Sort: GET /api/opencode/entries, render grid + rank
// On Card / Rank row click: GET /api/opencode/entry?id=..., show code viewer
// On Download: GET /api/opencode/download?id=..., log download
// On Copy: copy code_text locally, no API call
// On Submit: POST /api/opencode/submit, show pending, never list until approved
// If API fails, fall back to local demo plus disclaimer.
Copy snippets into api/opencode/ plus sql/opencode_tables.sql, no GitHub needed. opencode stays safe by never listing non-CC0 code, never auto-approving a submit, never executing submitted code, and never serving a code zip without LICENSE-CC0.txt.

Made by people,
for people.

Shop
Gift cards
Registry
Sitemap
Blog
Sell
Seller handbook
Teams
Forums
Affiliates & Creators
About
tinyfiles, Inc.
Policies
Investors
Careers
Press
Impact
Help
Help Center
Privacy settings

United States | Terms of Use | Privacy | Interest-based ads | Local Shops | Regions | © 2026 tinyfiles, Inc.