A comprehensive online platform for placement preparation with contests, practice tests, and resource management.
- Practice Tests: Take practice tests with questions from various categories
- Contests: Participate in timed contests with real-time monitoring
- Bookmarks: Save important questions for later review
- Results & Analytics: View detailed performance analytics
- Resources: Access study materials, PDFs, and videos
- Real-time Notifications: Get notified about new contests and results
- User Management: Manage students and moderators
- Question Bank: Add, edit, and manage questions
- Contest Creation: Create and manage contests
- Analytics Dashboard: View platform statistics and user performance
- Resource Management: Upload and manage study materials
- Question Management: Add and edit questions
- Contest Management: Create contests and monitor participation
- Content Moderation: Review and approve content
- Node.js with Express.js
- PostgreSQL with Prisma ORM
- Socket.IO for real-time features
- JWT for authentication
- Multer for file uploads
- Nodemailer for email notifications
- Cron jobs for automated tasks
- React 18 with Vite
- React Router for navigation
- Tailwind CSS for styling
- Lucide React for icons
- React Toastify for notifications
- Socket.IO Client for real-time features
- Chart.js for analytics
- Recharts for data visualization
- Node.js (v16 or higher)
- PostgreSQL (v12 or higher)
- npm or yarn
git clone <repository-url>
cd PlacePrep# Install backend dependencies
cd backend
npm install
# Install frontend dependencies
cd ../frontend
npm installCreate a .env file in the backend directory:
# Database Configuration
DATABASE_URL="postgresql://username:password@localhost:5432/placeprep_db"
# JWT Configuration
JWT_SECRET="your-super-secret-jwt-key-here"
# Server Configuration
PORT=5001
NODE_ENV="development"
# Google OAuth Configuration
GOOGLE_CLIENT_ID="your-google-client-id-here"
# Email Configuration (for password reset)
EMAIL_USER="your-email@gmail.com"
EMAIL_PASS="your-app-password"
# Cloudinary Configuration (for file uploads)
CLOUDINARY_CLOUD_NAME="your-cloud-name"
CLOUDINARY_API_KEY="your-api-key"
CLOUDINARY_API_SECRET="your-api-secret"cd backend
npx prisma generate
npx prisma db push
npx prisma db seed# Start backend server (from backend directory)
npm run dev
# Start frontend server (from frontend directory)
npm run devThe application will be available at:
- Frontend: http://localhost:5173
- Backend API: http://localhost:5001
PlacePrep/
βββ backend/
β βββ src/
β β βββ controllers/ # API controllers
β β βββ middleware/ # Authentication & authorization
β β βββ routes/ # API routes
β β βββ lib/ # Utilities
β β βββ server.js # Main server file
β βββ prisma/
β β βββ schema.prisma # Database schema
β β βββ migrations/ # Database migrations
β βββ uploads/ # File uploads
βββ frontend/
β βββ src/
β β βββ components/ # Reusable components
β β βββ pages/ # Page components
β β βββ contexts/ # React contexts
β β βββ main.jsx # App entry point
β βββ public/ # Static assets
βββ README.md
POST /api/auth/signup- User registrationPOST /api/auth/login- User loginPOST /api/auth/logout- User logoutGET /api/auth/me- Get current userPOST /api/auth/forgot-password- Password reset requestPOST /api/auth/reset-password- Reset password
GET /api/questions- Get all questionsPOST /api/questions- Add new question (admin/moderator)PUT /api/questions/:id- Update questionDELETE /api/questions/:id- Delete question
GET /api/testseries- Get all contestsPOST /api/testseries- Create contest (admin/moderator)GET /api/testseries/:id- Get contest detailsPOST /api/testseries/:id/join- Join contestPOST /api/testseries/:id/submit- Submit contest answers
POST /api/free-practice/start- Start practice testPOST /api/free-practice/:id/practice-submit- Submit practice testGET /api/free-practice/student/stats- Get student statistics
GET /api/resources- Get all resourcesPOST /api/resources- Add resource (admin/moderator)PUT /api/resources/:id- Update resourceDELETE /api/resources/:id- Delete resource
GET /api/notifications- Get user notificationsPUT /api/notifications/:id/read- Mark notification as readDELETE /api/notifications/:id- Delete notification
The application uses JWT tokens for authentication. Users are assigned roles:
- user: Regular students
- moderator: Can manage questions and contests
- admin: Full access to all features
- User: Students, moderators, and admins
- Question: MCQ questions with categories and difficulty levels
- TestSeries: Contests with start/end times
- Participation: User participation in contests
- StudentActivity: User answers and performance tracking
- Bookmark: User bookmarked questions
- Notification: Real-time notifications
- Resource: Study materials (PDFs, videos, MCQs)
- Set up a PostgreSQL database
- Configure environment variables
- Run database migrations
- Deploy to your preferred hosting service
- Build the application:
npm run build - Deploy the
distfolder to your hosting service
- Missing nodemon dependency - Added to devDependencies
- Missing cors dependency - Added to dependencies
- Field name inconsistency - Fixed
fullnamevsfullName - Missing environment variables - Created env.example file
- Error handling improvements - Added proper error logging
- API endpoint mismatches - Fixed route paths
- Missing error handling - Added proper catch blocks
- Authentication flow - Improved session management
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.
For support, please contact the development team or create an issue in the repository.
- v1.0.0: Initial release with core features
- v1.1.0: Added real-time notifications
- v1.2.0: Added resource management
- v1.3.0: Added bookmark functionality
- v1.4.0: Added comprehensive analytics
Note: Make sure to update the environment variables with your actual values before running the application.