Skip to content

enzofalone/kahoot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Kahoot

Real-time multiplayer quiz game. Host creates a room, players join with a code, everyone answers live.

Stack

Layer Tech
Backend Go, WebSocket (coder/websocket), PostgreSQL (pgx)
Frontend React 19, Zustand, React Router 7, Tailwind CSS 4

Running locally

Backend

cd backend
cp .env.template .env
# Optional: add DATABASE_URL=postgres://... to .env for bank management
go run ./cmd/kahoot/

Frontend

cd frontend
npm install
npm run dev

Open http://localhost:5173.

Database (optional)

Set DATABASE_URL in backend/.env to enable the question bank API:

DATABASE_URL=postgres://user:pass@localhost:5432/kahoot

Tables are created automatically on startup. Without a database the game runs with a built-in demo bank.

API

All endpoints require DATABASE_URL to be set.

Method Path Description
GET /banks List all banks
POST /banks Create bank {"title":"..."}
GET /banks/{id} Get bank with questions
POST /banks/{id}/questions Add question {"prompt","answer_bank","correct_answer"}
DELETE /banks/{id} Delete bank
DELETE /questions/{id} Delete question

WebSocket endpoints: /host?bankId={id} (host), /player?roomId=X&playerId=Y (player).

About

Kahoot Clone created using React + Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages