tinyfiles.tv
⚠️ TINKER TOY — NOT LIVE YET — DISCLAIMER

This is a toy prototype. Posts are local-only — stored only in this browser tab. They are NOT saved to the server and NOT shared with anyone yet. Refresh = gone (unless this tab autosaves). Shared posts, accounts, and moderation are coming later. Don’t post anything you wouldn’t want to lose.

✨
Local-only toy — download to keep your board.

How it works (when it’s real)

Everyone posts to the same board. You show your product, people upvote, comment, and share it. Best rises, spam sinks. Cooldowns, accounts, and moderation will keep it from becoming chaos. For now, you’re posting alone — practice your pitch.

  • Post = title + what it does + link + tag
  • Upvote = signal. Comment = feedback.
  • One post per product per week
  • Download .txt to keep your board

Community — coming soon

Shared state is not connected yet.

🟢 0 makers posting right now (fake — local toy)
✨ Last post: —
💬 Last comment: — (not saved)
📜 Rules: Be kind. No spam. Show, don’t just link.

Backend  ·  Template · Proposed · Not connected

⬇ Backend — ShowYourProduct Backend — Template

Right now ShowYourProduct is a tinker toy — posts is a local array in this tab, upvotes are local counters, comments are local, and Refresh = gone (except local autosave). Disclaimer is the truth: local-only, not saved, not shared. This backend is the map to make it real: one shared board, per-post writes, votes as server counts, comments as server rows, cooldowns, accounts, moderation. Proposed, not connected.

01 / Files to create
api/showyourproduct/post.php      POST /api/showyourproduct/post
api/showyourproduct/posts.php     GET  /api/showyourproduct/posts?sort=best&tag=
api/showyourproduct/vote.php      POST /api/showyourproduct/vote
api/showyourproduct/comment.php   POST /api/showyourproduct/comment
api/showyourproduct/snapshot.php  GET  /api/showyourproduct/snapshot
sql/showyourproduct_tables.sql

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

02 / Database tables
-- sql/showyourproduct_tables.sql
showyourproduct_posts
  id BIGINT AUTO_INCREMENT PRIMARY KEY
  user_id INT NOT NULL
  title VARCHAR(200) NOT NULL
  body TEXT NOT NULL
  link VARCHAR(500) NULL
  tag VARCHAR(20) NOT NULL DEFAULT 'website'  -- website,game,tool,app
  pinned TINYINT NOT NULL DEFAULT 0
  created_at DATETIME NOT NULL

showyourproduct_votes
  post_id BIGINT NOT NULL
  user_id INT NOT NULL
  value TINYINT NOT NULL  -- 1 up, -1 down
  PRIMARY KEY (post_id, user_id)

showyourproduct_comments
  id BIGINT AUTO_INCREMENT PRIMARY KEY
  post_id BIGINT NOT NULL
  user_id INT NOT NULL
  body TEXT NOT NULL
  created_at DATETIME NOT NULL

showyourproduct_snapshot
  id INT AUTO_INCREMENT PRIMARY KEY
  path VARCHAR(200) NOT NULL
  post_count INT NOT NULL DEFAULT 0
  created_at DATETIME NOT NULL

showyourproduct_cooldowns
  user_id INT PRIMARY KEY
  last_post_at DATETIME NOT NULL
  posts_last_hour INT NOT NULL DEFAULT 0

Board is one shared feed. Never store a board per user — store only posts by id, plus votes and comments. Same idea as TinyBoard, but posts instead of ad blocks.

03 / API endpoints
POST /api/showyourproduct/post
{ "title": "tinyfiles.tv", "body": "...", "link": "https://tinyfiles.tv", "tag": "website" }
- auth required, 1 post per product per week
- validates title 5-200 chars, body 10-2000 chars, link http(s), tag in set
- returns { "ok": true, "id": 123 }

GET /api/showyourproduct/posts?sort=best&tag=&since=
- returns { "ok": true, "posts": [ { id, title, body, link, tag, votes, comments } ] }

POST /api/showyourproduct/vote
{ "post_id": 123, "value": 1 } — one vote per user per post, toggle to 0

POST /api/showyourproduct/comment
{ "post_id": 123, "body": "Love this..." } — 1 comment per 10s

GET /api/showyourproduct/snapshot
- returns { "ok": true, "url": "/data/showyourproduct/snapshot.json", "post_count": 42 }

Votes are server counts — showyourproduct_votes — not client counters. Server decides Best / New / Top sorting.

04 / Cooldown, moderation & validation
// Cooldown: 1 post per product per week, 1 comment per 10s, 1 vote per 2s
// Moderation: no hate / NSFW / spam / lying ads — mods can remove + ban user_id
// Validation: title, body, link, tag — else 400
// Pinned: only mods can pin — tinyfiles.tv is pinned as the first example

Keep disclaimer until this ships: “Tinker toy — not live yet. Refresh = gone.”

05 / Frontend wiring
// posts[] is already local. After posting (debounced 800ms):
// POST /api/showyourproduct/post with new post
// Poll GET /api/showyourproduct/posts?sort=best every 5s, apply only new posts
// On load: GET /api/showyourproduct/snapshot -> load into posts[]
// If API fails, fall back to local-only toy + disclaimer.
Copy snippets into api/showyourproduct/ + sql/showyourproduct_tables.sql — no GitHub needed. Shared board, per-post writes, votes as server counts, cooldowns + moderation.