A modern, interactive quiz and trivia game platform built with React and Go. Create custom games, add questions, and challenge your knowledge in a sleek, user-friendly interface.
- ๐ฎ Interactive Game Creation: Build custom quiz games with ease
- โ Question Management: Create and organize trivia questions
- ๐ฏ Real-time Gameplay: Engaging quiz experience with smooth navigation
- ๐จ Modern UI: Beautiful, responsive interface with gradient designs
- ๐ฑ Mobile Responsive: Works seamlessly on all device sizes
- ๐ Image Search Integration: Find images for your questions
- ๐ค User Management: User profiles and game tracking
- ๐ Dashboard: Comprehensive overview of games and performance
- Go: 1.21 or higher
- Node.js: 18 or higher
- MongoDB: Running instance
- npm/yarn: Package manager
-
Clone the repository
git clone https://github.com/prabalesh/brainless-map.git cd brainless-map -
Setup Backend
cd backend # Install dependencies go mod tidy # Create .env file cp .env.example .env # Edit .env with your MongoDB connection and other configs # Run the server go run cmd/server/main.go
-
Setup Frontend
cd frontend # Install dependencies npm install # Start development server npm run dev
-
Access the application
- Frontend:
http://localhost:5173 - Backend API:
http://localhost:8080
- Frontend:
backend/
โโโ cmd/server/ # Application entry point
โโโ internal/
โ โโโ config/ # Database configuration
โ โโโ handler/ # HTTP request handlers
โ โโโ model/ # Data models
โ โโโ repository/ # Data access layer
โ โโโ service/ # Business logic layer
โ โโโ utils/ # Utility functions
frontend/
โโโ src/
โ โโโ pages/ # React page components
โ โโโ services/ # API service layer
โ โโโ types/ # TypeScript type definitions
โ โโโ App.tsx # Main application component
- Go: Core backend language
- MongoDB: Database for storing games, questions, and users
- Gorilla Mux: HTTP router and URL matcher
- CORS: Cross-origin resource sharing
- React 18: UI framework
- TypeScript: Type-safe JavaScript
- React Router: Client-side routing
- Tailwind CSS: Utility-first CSS framework
- Lucide React: Beautiful icon library
- Vite: Fast build tool
GET /api/games- Get all gamesPOST /api/games- Create new gameGET /api/games/{id}/questions- Get questions for a gamePOST /api/games/{id}/questions- Add question to game
GET /api/questions- Get all questionsPOST /api/questions- Create new questionGET /api/questions/{id}- Get specific question
POST /api/users- Create new user
GET /api/images/search- Search for images
- Navigate to "Create Game" in the navigation
- Fill in game details and settings
- Add questions to your game
- Save and share with players
- Go to "Create Question" page
- Enter question text and multiple choice answers
- Set the correct answer and difficulty
- Save to question bank
- Access the Dashboard to view available games
- Select a game to start playing
- Answer questions and track your progress
- View results and scores
Create a .env file in the backend directory:
# Database
MONGO_URI=mongodb://localhost:27017/brainless-map
# Server
PORT=8080
FRONTEND_ORIGIN=http://localhost:5173
# External APIs (if applicable)
IMAGE_SEARCH_API_KEY=your_api_key_here# Build the application
go build -o bin/server cmd/server/main.go
# Run in production
./bin/server# Build for production
npm run build
# Serve the dist folder with your preferred static server# Backend tests
cd backend
go test ./...
# Frontend tests (if configured)
cd frontend
npm test- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow Go conventions for backend code
- Use TypeScript strictly in frontend
- Maintain consistent code formatting
- Write meaningful commit messages
- Add tests for new features
- Mobile menu functionality needs implementation
- Image search integration may require API key setup
- Real-time multiplayer support
- Advanced scoring algorithms
- Question categories and tags
- User authentication and profiles
- Game analytics and statistics
- Social sharing features
- Mobile app version
This project is licensed under the MIT License - see the LICENSE file for details.
Prabalesh
- GitHub: @prabalesh
- Thanks to the React and Go communities for excellent documentation
- Tailwind CSS for the amazing utility classes
- Lucide React for the beautiful icons
โญ Star this repository if you find it helpful!