Skip to content

Add Threads Contest Engine MVP monorepo#591

Open
ethgr0wth wants to merge 1 commit intobountyfrom
codex/create-threads-contest-engine-mvp-monorepo
Open

Add Threads Contest Engine MVP monorepo#591
ethgr0wth wants to merge 1 commit intobountyfrom
codex/create-threads-contest-engine-mvp-monorepo

Conversation

@ethgr0wth
Copy link

Motivation

  • Provide a minimal but complete MVP monorepo implementing a contest engine with FastAPI+Redis backend and Next.js frontend to demo season/submission/judging/voting flows.
  • Use Redis (DB 7) as the single source of truth with a strict key schema and TTL sessions for simple token auth and RBAC.
  • Offer a usable UI (Tailwind + simple Aceternity-like styling) and an API client so the frontend can operate without local DB persistence.

Description

  • Added backend FastAPI app under threadStax/backend/app with config.py, async redis_client.py, redis_keys.py (tc: prefix), Pydantic models in models.py, session auth in auth.py, RBAC dependency in rbac.py, and route modules implementing the required endpoints (auth, season(s), admin, submissions, judge, vote, leaderboard), plus requirements.txt and docker-compose.yml for Redis.
  • Implemented the required Redis key schema and logic: user/session keys, seasons, submissions, moderation queue, judge assignments, per-judge scores, aggregated score pipeline updates, leaderboards, voting atomic pipeline, and simple rate-limits using INCR+TTL.
  • Built a Next.js (App Router) TypeScript frontend under threadStax/frontend with pages and components matching the spec including landing, /login, /submit, judge/admin/voter pages, role-based RoleGate, Navbar, SeasonPicker, SubmissionCard, LeaderboardTable, moderation/judge queues, a typed lib/api.ts fetch wrapper, and lib/auth.ts storing token+uid+role in localStorage.
  • Configured Tailwind, PostCSS, and basic dark/premium theme; documented quickstart instructions in README files at repository and per-package locations.

Testing

  • Ran npm install in threadStax/frontend and the install completed successfully (packages added and audit reported warnings), which validates the frontend dependency graph installation.
  • Ran npm run dev for the frontend which compiled the app successfully and served the site locally at http://localhost:3000 (Next.js compilation succeeded).
  • Programmatically exercised the frontend using a Playwright script to load the homepage and capture a screenshot, which completed and produced an artifact confirming the UI renders.
  • No backend integration tests were executed automatically in this run (backend assets and docker-compose are included for manual startup and testing).

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant