KahootQuizClone is a real-time quiz game platform inspired by Kahoot. It allows users to create, host, and participate in interactive quizzes with multiple-choice questions. The project is built using a modern tech stack, featuring a Svelte frontend and a Go backend.
- Create and edit custom quizzes
- Host live quiz sessions
- Join quiz games using a unique game code
- Real-time gameplay with instant feedback
- Leaderboard to track player scores
- Responsive design for both desktop and mobile devices
- Svelte
- TypeScript
- Tailwind CSS
- SPA Router
- Go
- Fiber (Web framework)
- WebSocket for real-time communication
- MongoDB for data storage
The project is divided into two main parts:
- Frontend (
/frontend
) - Backend (
/backend
)
/src
: Main source code/views
: Different views/pages of the application/lib
: Reusable components/service
: Services for API calls and game logic/model
: TypeScript interfaces and types
/cmd
: Entry point for the application/internal
: Core application logic/controller
: HTTP and WebSocket handlers/service
: Business logic and game management/entity
: Data models/collection
: Database operations
- Node.js and npm
- Go 1.23 or later
- MongoDB
- Navigate to the
frontend
directory - Install dependencies:
npm install
- Start the development server:
npm run dev
- Navigate to the
backend
directory - Install Go dependencies:
go mod download
- Run the server:
go run cmd/quiz/quiz.go
GET /api/quizzes
: Fetch all quizzesGET /api/quizzes/:quizId
: Fetch a specific quizPUT /api/quizzes/:quizId
: Update a quizGET /ws
: WebSocket endpoint for real-time game communication