A Full-Stack Collaborative Q&A Platform with Gamification & Social Features
CodeQuest is a feature-rich Stack Overflowβstyle platform built using the MERN stack (Next.js on the frontend, Node/Express on the backend). It goes beyond standard Q&A by adding:
- A social Public Space with friend-based posting limits
- A subscription system with time-gated mock payments
- A gamified reward system and point transfers
- Multi-language support with OTP security
- Login/device tracking and time-based access rules
Deployed on:
- Frontend: Vercel β https://codequest-harsh.vercel.app
- Backend: Render β https://codequest-harsh.onrender.com
All screenshots are stored in the /screenshots folder in the repo.
- Post questions, answers, and comments.
- Upvote/downvote questions and answers.
- Tag-based filtering and search.
- Users share posts with images/videos, like, comment, and share.
- Friend-based posting limits:
- 0 friends β cannot post.
- 1 friend β 1 post/day.
- 2 friends β 2 posts/day.
- β₯10 friends β unlimited posts/day.
- Plans:
- Free: 1 question/day.
- Bronze: βΉ100/month β 5 questions/day.
- Silver: βΉ300/month β 10 questions/day.
- Gold: βΉ1000/month β unlimited questions/day.
- Payment allowed only between 10:00 AM β 11:00 AM IST.
- After payment, invoice/plan details are sent to the user via email (mocked in logs / mailer).
- +5 points for each answer.
- +5 bonus points when an answer reaches 5 upvotes.
- Points reduced when an answer is removed or downvoted.
- Users can transfer points to others if they have more than 10 points.
- Track login IP, browser, OS, and device type.
- Show login history in the user profile.
- If user logs in via Chrome, access can require OTP.
- If user logs in via Microsoft Edge, allow direct access without extra OTP.
- If the device is mobile, restrict access to 10:00 AM β 1:00 PM IST only.
- Supported languages: English, French, Spanish, Hindi, Portuguese, Chinese.
- Switching to French triggers email OTP verification.
- Switching to any other language triggers mobile OTP verification.
- The entire UI (navigation, labels, major screens) updates to the selected language.
| Layer | Technologies |
|---|---|
| Frontend | Next.js, TypeScript, Tailwind CSS, Axios, Context API |
| Backend | Node.js, Express.js, Mongoose, JWT, Bcrypt, Nodemailer |
| Database | MongoDB Atlas |
| i18n | i18next, react-i18next |
| Deployment | Vercel (frontend), Render (backend) |
| Utilities | Nodemon, Dotenv |
- Node.js v16 or higher
- npm or yarn
- MongoDB Atlas connection string
git clone https://github.com/harsh323dev/code-quest.git
cd code-quest
cd server
npm install
Create a .env file in server/:
PORT=5000 MONGODB_URL=your_mongodb_connection_string JWT_SECRET=your_secret_key NODE_ENV=development
Start the backend server:
Backend runs at: http://localhost:5000
cd ../stack npm install
Create a .env.local in stack/:
NEXT_PUBLIC_BACKEND_URL=http://localhost:5000
Start the frontend:
npm run dev
Frontend runs at: http://localhost:3000
code-quest/ βββ server/ # Backend Logic (Node/Express) β βββ controllers/ # Auth, Question, Answer, Payment, Reward, OTP β βββ models/ # Mongoose Schemas (User, Question, Post, LoginHistory) β βββ routes/ # API Routes β βββ middleware/ # Auth & Security Middleware β βββ seed.js # Seed script for demo questions β βββ index.js # Entry Point β βββ stack/ # Frontend (Next.js) β βββ public/ # Assets & Locales (i18n) β βββ screenshots/ # Project screenshots for README β βββ src/ β β βββ components/ # UI Components (Navbar, Sidebar, Cards) β β βββ pages/ # Routes (Auth, Questions, Public Space, Subscription) β β βββ lib/ # Axios instance, Contexts, Hooks β β βββ styles/ # Global styles β βββ package.json β βββ README.md
POST /payment/subscribeβ Upgrade user plan (time-restricted 10β11 AM IST).POST /posts/createβ Create Public Space post with friend-based rate limits.POST /user/transfer-pointsβ Transfer reward points between users.POST /user/otp/generateβ Generate OTP for language switching / login flows.GET /login/historyβ Fetch login history with browser/OS/device/IP details.
Harsh Agarwal
- π GitHub: https://github.com/Harsh427744
- πΌ LinkedIn: https://linkedin.com/in/harsh323
β If you found this project interesting, consider giving it a star!
Built with β€οΈ by Harsh Agarwal









