A comprehensive educational platform with role-based access for teachers and students, featuring real-time progress tracking, quiz management, and gamified learning experiences.
# Clone the repository
git clone https://github.com/CodeByDeepankar/hackthon-sih.git
cd hackthon-sih
# Run automated setup
start.bat
# Clone the repository
git clone https://github.com/CodeByDeepankar/hackthon-sih.git
cd hackthon-sih
# Make script executable and run
chmod +x start.sh
./start.sh
# Clone and install dependencies
git clone https://github.com/CodeByDeepankar/hackthon-sih.git
cd hackthon-sih
# Backend setup
cd backend
cp .env.example .env
# Edit .env with your CouchDB credentials
npm install
npm start
# Frontend setup (in new terminal)
cd frontend
cp .env.local.example .env.local
npm install
npm run dev
- Node.js v18 or higher
- CouchDB v3.0 or higher
- Git for cloning the repository
- Windows/Mac: Download from Apache CouchDB
- Linux:
sudo apt-get install couchdb
- Docker:
docker run -d -p 5984:5984 -e COUCHDB_USER=admin -e COUCHDB_PASSWORD=password apache/couchdb:3.3
- Start CouchDB service
- Access admin panel: http://localhost:5984/_utils
- Create admin user (recommended: admin/password)
- Update
backend/.env
with your credentials
- Subject Management: Create and organize educational subjects
- Quiz Creation: Build interactive quizzes with multiple choice questions
- Student Progress: Monitor individual and class-wide performance
- Analytics: Real-time insights into student engagement
- School Management: Track students within the same school
- Take Quizzes: Interactive quiz-taking experience with timers
- Progress Tracking: View personal performance and improvement
- Daily Streaks: Gamified learning with streak tracking
- Subject Exploration: Browse and access quizzes by subject
- Achievement System: Track accomplishments and milestones
- Daily Streaks: Encourage consistent learning
- Progress Visualization: Visual progress bars and statistics
- Achievement Badges: Reward system for milestones
- Leaderboards: Friendly competition between students
- Real-time Feedback: Instant quiz results and explanations
- RESTful API endpoints
- CouchDB integration with offline sync
- Role-based access control
- Real-time progress tracking
- Comprehensive error handling
- Modern React with App Router
- Responsive design with Tailwind CSS
- Clerk authentication
- Progressive Web App (PWA) features
- Offline-first data synchronization
- Document-based storage
- Built-in replication and sync
- Offline-capable
- ACID transactions
- Web-based admin interface
GET /health
GET /users/:userId/role
POST /users/role
GET /subjects
POST /subjects
PUT /subjects/:id
DELETE /subjects/:id
GET /quizzes
POST /quizzes
GET /quizzes/:id
GET /questions/quiz/:quizId
GET /students/school/:schoolId
GET /students/:studentId/progress
GET /progress/school/:schoolId
POST /responses
Backend (.env)
COUCHDB_URL=http://127.0.0.1:5984
COUCHDB_USERNAME=admin
COUCHDB_PASSWORD=password
PORT=4000
NODE_ENV=development
FRONTEND_URL=http://localhost:3000
Frontend (.env.local)
NEXT_PUBLIC_API_URL=http://localhost:4000
Backend
npm start # Start production server
npm run dev # Start with nodemon
npm run env-check # Check environment variables
Frontend
npm run dev # Start development server
npm run build # Build for production
npm start # Start production server
- Set
NODE_ENV=production
- Use HTTPS for all URLs
- Configure proper CORS origins
- Set up database backups
- Enable rate limiting
# Using docker-compose (recommended)
docker-compose up -d
# Manual container setup
docker run -d -p 5984:5984 apache/couchdb:3.3
# Build and run your application containers
"Failed to fetch" Error
- Check if backend server is running on port 4000
- Verify CouchDB is accessible
- Check environment variables
Database Connection Failed
- Ensure CouchDB service is running
- Verify credentials in .env file
- Test connection:
curl http://localhost:5984
CORS Errors
- Check FRONTEND_URL in backend .env
- Verify CORS configuration
- Ensure both servers are running
- Health check: http://localhost:4000/health
- Database admin: http://localhost:5984/_utils
- Browser developer tools for frontend issues
- Deployment Guide - Comprehensive deployment instructions
- Deployment Checklist - Step-by-step checklist
- Full Stack Guide - Technical architecture details
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter issues:
- Check the troubleshooting section above
- Review the deployment checklist
- Check server logs for errors
- Create an issue on GitHub with detailed information
- Advanced analytics dashboard
- Video lesson integration
- Mobile app development
- Multi-language support
- Advanced gamification features
- Integration with external LMS systems
Made with โค๏ธ for gamified STEM education