A modern, real-time platform for students to ask and answer doubts, share knowledge, and connect with peers.
Live Demo • Features • Tech Stack • Local Setup
DoubtRoom is packed with features to facilitate a seamless learning experience:
- 🙋♀️ Ask & Answer: Users can post questions with rich text, images, and tags. Others can provide detailed answers.
- 💬 Comments & Discussions: Engage in discussions on questions and answers.
- 🔼/🔽 Upvote/Downvote: Vote on the quality of answers to highlight the best solutions.
- 🔍 Powerful Search: Easily find questions on specific topics.
- 👤 User Profiles: View user activity, including questions asked and answered.
- 🔔 Notifications: Get notified about answers and comments on your questions. (Future Scope)
- 🔒 Secure Authentication: JWT-based authentication with password encryption and Google OAuth.
- 🖼️ Image Uploads: Cloudinary integration for hosting images in questions and answers.
- ✉️ Email Notifications: OTP verification and password reset via email.
This project is a full-stack application built with the MERN stack and other modern technologies.
- React: A JavaScript library for building user interfaces.
- Vite: A fast build tool for modern web projects.
- Redux Toolkit: The official, opinionated, batteries-included toolset for efficient Redux development.
- React Router: For declarative routing in React.
- Tailwind CSS: A utility-first CSS framework for rapid UI development.
- Axios: A promise-based HTTP client for the browser and Node.js.
- Framer Motion: A production-ready motion library for React.
- Node.js: A JavaScript runtime built on Chrome's V8 JavaScript engine.
- Express.js: A minimal and flexible Node.js web application framework.
- MongoDB: A NoSQL database for storing application data.
- Mongoose: An elegant MongoDB object modeling tool for Node.js.
- JSON Web Tokens (JWT): For secure user authentication.
- Bcrypt.js: For hashing passwords.
- Cloudinary: For cloud-based image and video management.
- Nodemailer: For sending emails from Node.js applications.
With Docker installed, the whole backend stack (API + MongoDB replica set + Redis) is one command:
docker compose up --build
# API on http://localhost:5000 — verify with: curl localhost:5000/healthThen start the frontend as usual:
cd frontend && npm install && npm run devSee docs/understanding/06-docker-observability.md for how it works.
Follow these instructions to set up the project locally on your machine.
git clone https://github.com/your-username/Doubtroom.git
cd DoubtroomBackend:
cd backend
npm installFrontend:
cd ../frontend
npm installThis project requires environment variables to be configured for both the backend and frontend.
Create a .env file in the backend directory and add the following variables.
MONGO_URI=your_mongodb_connection_string
PORT=5000
CLIENT_URL=http://localhost:5173
JWT_SECRET=your_jwt_secret
REFRESH_TOKEN_SECRET=your_refresh_token_secret
CLOUD_NAME=your_cloudinary_cloud_name
CLOUD_API_KEY=your_cloudinary_api_key
CLOUD_API_SECRET=your_cloudinary_api_secret
EMAIL_USER=your_gmail_address
EMAIL_PASS=your_gmail_app_password
GOOGLE_CLIENT_ID=your_google_oauth_client_id
NODE_ENV=development
CRON_SECRET=your_cron_endpoint_secret
# Redis leaderboards (optional — Mongo fallback used without it)
# See docs/understanding/04-leaderboard-badges.md
# REDIS_URL=rediss://default:password@host:port
# Semantic duplicate detection (optional — feature stays off without a key)
# See docs/understanding/03-semantic-duplicate-detection.md
EMBEDDINGS_PROVIDER=voyage # voyage | openai
EMBEDDINGS_API_KEY=your_embeddings_api_key
# EMBEDDINGS_MODEL=voyage-3-lite # optional override
# SIMILARITY_THRESHOLD=0.75 # optional tuning
# Observability (optional)
# SENTRY_DSN=your_sentry_dsn # error tracking; off when unset
# LOG_LEVEL=info # pino log levelCreate a .env file in the frontend directory and add the following variables. The project is configured to use Firebase and Appwrite, so you can fill in the variables for the service you are using.
# The base URL of your backend API
VITE_API_BASE_URL=http://localhost:5000
# Firebase Configuration
VITE_FIREBASE_API_KEY=your_firebase_api_key
VITE_AUTH_DOMIAN=your_firebase_auth_domain
VITE_PROJECT_ID=your_firebase_project_id
VITE_STORAGE_BUCKET=your_firebase_storage_bucket
VITE_MESSAGING_SENDER_ID=your_firebase_messaging_sender_id
VITE_APP_ID=your_firebase_app_id
VITE_MEASUREMENT_ID=your_firebase_measurement_id
# Appwrite Configuration
VITE_APPWRITE_BUCKET_ID=your_appwrite_bucket_id
VITE_APPWRITE_PROJECT_ID=your_appwrite_project_id
VITE_APPWRITE_ENDPOINT=your_appwrite_endpoint
# Other
VITE_RECAPTCHA_SITE_KEY=your_recaptcha_site_keyStart the backend server:
cd ../backend
npm run devStart the frontend development server:
cd ../frontend
npm run devThe frontend should now be running on http://localhost:5173 (or whatever port Vite chooses) and the backend on http://localhost:5000.
