Skip to content

Repository files navigation

FYSC — Find Your Sub Count

YouTube growth simulator with sign-in, dashboard stats/commands, Unix-time growth math, and an MDM-style Top 50 leaderboard (5 rows × 10 columns).

Features

  1. Sign in / Register
  2. Dashboard — live subs/views/growth + Post Video / Shorts / Live
  3. Growth logic — on upload, add growth * (1 - 0.99999^(0.2 * (now - lastUpload))) subscribers, then add growth and reset last-upload time; views keep the existing linear settle + bonus
  4. Leaderboard — Top 50 as 5 rows × 10 columns, top→bottom then left→right (real users only)

Run locally

npm install
npm run dev

Without Redis env vars, data uses data/db.json.

npm test
npm run build

Redis usage (optimized)

  • Dashboard: baselines live in the fysc_snap cookie; subs/views are calculated in the browser. Redis is read/written mainly when you post.
  • Leaderboard: shared cache refreshes at most once per minute; between refreshes, clients calculate live subs from the formula.

Finish Vercel hosting (required)

Production is currently broken for sign-up until Redis is connected (ENOENT mkdir /var/task/data).

Vercel KV was discontinued — use Upstash Redis:

  1. Open your project on vercel.com → Storage
  2. Create Database → Upstash Redis → create & Connect to this project
    (injects UPSTASH_REDIS_REST_URL + UPSTASH_REDIS_REST_TOKEN)
  3. Deployments → Redeploy the latest production deployment
    (or merge this PR so production gets the Redis-backed code)
  4. Visit /api/health — should show "storage":"upstash-redis" and "ok":true
  5. Register a channel — data now persists forever on Redis

Optional local use of the same DB:

npx vercel env pull .env.local
npm run dev

Other hosts

Render

New → Blueprint using render.yaml + Dockerfile (persistent disk at /app/data).

Docker

docker build -t fysc .
docker run -p 3000:3000 -v fysc-data:/app/data fysc

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages