A fast-paced, timed trivia game about music and cinema. Players answer creative clues (story summaries , short story plot)and earn points for streaks of correct answers. The app is designed for serverless deployment on Netlify.
- Timed trivia gameplay
- Music and cinema questions
- Streak-based scoring system
- Leaderboard for top players
- Modern UI with React
- Serverless backend (Netlify Functions)
GUESS-IT-RIGHT/
├── apps/
│ └── web/ # Frontend (React + Vite)
├── packages/
│ └── shared/ # Shared types/models (TypeScript)
├── netlify/
│ └── functions/ # Backend (Netlify Functions)
├── netlify.toml # Netlify config and redirects
├── setup.md # Quickstart setup guide
├── README.md # Project overview
└── ... # Other config files
- Monorepo managed with pnpm workspaces
- Frontend: React + Vite app in
apps/web - Backend: Netlify Functions in
netlify/functions(main function:game-api) - Shared: Common types/interfaces in
packages/shared - Netlify glue:
netlify.tomlconfigures build, functions, and API redirects
- The frontend only calls
/api/*endpoints (never talks to the DB directly) - Netlify redirects
/api/*to thegame-apifunction - The backend handles:
GET /api/question– returns a question cluePOST /api/answer– checks answer, updates score/streakGET /api/leaderboard– returns top scores
- Intended to use Netlify DB for storing questions and scores
- Install prerequisites:
- Node.js 18+
- pnpm (install globally:
npm install -g pnpm)
- Clone the repo and install dependencies:
git clone <YOUR_REPO_URL>.git cd GUESS-IT-RIGHT pnpm install
- Start the app (frontend + backend):
This runs Netlify locally, serving both the React frontend and the API function. Open the URL shown in the terminal (usually
pnpm run dev
http://localhost:8888). - Optional commands:
- Type check:
pnpm typecheck -r - Lint:
pnpm lint -r - Build:
pnpm build
- Type check:
See setup.md for a step-by-step guide.
- The app is designed for Netlify. It connects the repo to Netlify.
- Netlify will use
netlify.tomlto build and deploy:- Build command:
pnpm install && pnpm build - Publish directory:
apps/web/dist - Functions directory:
netlify/functions
- Build command:
MIT