A comprehensive platform connecting students with expert mentors to solve coding doubts through an interactive Q&A system.
- Overview
- Features
- Tech Stack
- Installation
- Environment Setup
- Usage
- API Documentation
- Project Structure
- Contributing
- License
DevHelp is a modern doubt-tracking application designed to bridge the gap between students struggling with coding problems and experienced mentors ready to help. The platform provides a seamless experience for posting doubts, receiving expert guidance, and building a community of learners.
- Role-based Access: Separate dashboards for students and mentors
- Real-time Interaction: Live commenting system with nested replies
- File Upload Support: Share code screenshots and files using ImageKit
- Responsive Design: Optimized for mobile, tablet, and desktop
- Secure Authentication: JWT-based authentication with role management
- Modern UI/UX: Built with Tailwind CSS and React Icons
- Create Doubts: Post coding questions with detailed descriptions
- File Attachments: Upload screenshots of code
- Real-time Tracking: Monitor doubt status and responses
- Interactive Comments: Engage with mentors through threaded discussions
- Profile Management: Update personal information and preferences
- Browse Doubts: View and filter student queries
- Provide Solutions: Respond with detailed explanations and code examples
- Comment System: Engage in discussions with multiple students
- Progress Tracking: Monitor resolved vs pending doubts
- Secure Registration: Email validation and password hashing
- JWT Authentication: Token-based session management
- Role-based Authorization: Protected routes for students and mentors
- Auto-logout: Session timeout and security measures
- Safe Toast System: Prevents notifications after logout
- Responsive Design: Mobile-first approach with Tailwind CSS
- Loading States: Branded suspense loaders and mini-loaders
- Error Boundaries: Graceful error handling with fallback UI
- Toast Notifications: Real-time feedback for user actions
- Modern Navigation: Intuitive menu system with mobile overlay
- React 19.1.0 - Modern UI library with hooks
- Vite - Fast build tool and development server
- Tailwind CSS 4.1.11 - Utility-first CSS framework
- React Router Dom 7.6.3 - Client-side routing
- Axios 1.10.0 - HTTP client for API calls
- React Icons 5.5.0 - Comprehensive icon library
- React Toastify 11.0.5 - Toast notification system
- Node.js - JavaScript runtime environment
- Express.js 5.1.0 - Web application framework
- MongoDB with Mongoose 8.16.1 - NoSQL database and ODM
- JWT (jsonwebtoken 9.0.2) - Authentication tokens
- bcryptjs 3.0.2 - Password hashing
- ImageKit 6.0.0 - Image upload and management
- Express Rate Limit 7.5.1 - Rate limiting middleware
- Express Validator 7.2.1 - Input validation
- Multer 2.0.1 - File upload handling
- CORS 2.8.5 - Cross-origin resource sharing
- dotenv 17.0.0 - Environment variable management
- ESLint - Code linting and formatting
- Postman - API testing and documentation
- Node.js (v16 or higher)
- npm or yarn
- MongoDB (local or cloud)
- ImageKit account (for file uploads)
git clone https://github.com/gauravsingh1281/DevHelp-Doubt-Tracker-App.gitcd server
npm installcd client
npm installCreate a .env file in the server directory:
# Server Configuration
PORT=3000
NODE_ENV=development
# Database
MONGODB_URI=mongodb://localhost:27017/devhelp
# or for MongoDB Atlas:
# MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/devhelp
# JWT Secret
JWT_SECRET=your_super_secret_jwt_key_here
# ImageKit Configuration
IMAGEKIT_PUBLIC_KEY=your_imagekit_public_key
IMAGEKIT_PRIVATE_KEY=your_imagekit_private_key
IMAGEKIT_URL_ENDPOINT=https://ik.imagekit.io/your_imagekit_id/Create a .env file in the client directory:
# API Configuration
VITE_API_BASE_URL=http://localhost:3000/api
- Start Backend Server:
cd server
npm startServer will run on http://localhost:3000
- Start Frontend Development Server:
cd client
npm run devClient will run on http://localhost:5173
cd client
npm run build
npm run previewImport the provided Postman collection:
DevHelp_API_Collection.postman_collection.jsonDevHelp_Environment.postman_environment.json
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/register |
Register new user |
| POST | /api/auth/login |
User login |
| GET | /api/auth/me |
Get current user |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/doubts |
Create new doubt |
| GET | /api/doubts |
Get all doubts (with filters) |
| GET | /api/doubts/:id |
Get doubt by ID |
| PATCH | /api/doubts/:id |
Update doubt |
| DELETE | /api/doubts/:id |
Delete doubt |
| POST | /api/doubts/:id/resolve |
Mark doubt as resolved |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/comments/:doubtId |
Add comment to doubt |
| GET | /api/comments/:doubtId |
Get all comments for doubt |
| PATCH | /api/comments/:id |
Edit comment |
| DELETE | /api/comments/:id |
Delete comment |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/upload |
Upload file to ImageKit |
devhelp-doubt-tracker/
β
βββ client/ # Frontend React application
β βββ public/ # Static assets
β βββ src/
β β βββ assets/ # Images, icons, fonts
β β βββ components/ # Reusable React components
β β β βββ DashboardHeader.jsx
β β β βββ Header.jsx
β β β βββ MentorComments.jsx
β β β βββ SuspenseLoader.jsx
β β β βββ MiniLoader.jsx
β β β βββ ErrorBoundary.jsx
β β βββ context/ # React context providers
β β β βββ AuthContext.jsx
β β βββ hooks/ # Custom React hooks
β β β βββ useInfiniteScroll.js
β β β βββ usePagination.js
β β βββ pages/ # Page components
β β β βββ Home.jsx
β β β βββ Login.jsx
β β β βββ Register.jsx
β β β βββ StudentDashboard.jsx
β β β βββ MentorDashboard.jsx
β β β βββ CreateDoubt.jsx
β β βββ routes/ # Routing configuration
β β β βββ AppRoutes.jsx
β β β βββ RoleProtectedRoute.jsx
β β βββ utils/ # Utility functions
β β β βββ lazyUtils.js
β β β βββ safeToast.js
β β βββ api/ # API configuration
β β β βββ apiInstance.js
β β βββ App.jsx # Main App component
β β βββ main.jsx # Application entry point
β βββ index.html
β βββ package.json
β βββ tailwind.config.js
β βββ vite.config.js
β
βββ server/ # Backend Node.js application
β βββ config/ # Configuration files
β β βββ db.js # Database connection
β βββ controllers/ # Request handlers
β β βββ authController.js
β β βββ doubtController.js
β β βββ commentController.js
β βββ middlewares/ # Custom middleware
β β βββ authMiddleware.js
β β βββ rateLimiters.js
β βββ models/ # Database models
β β βββ User.js
β β βββ Doubt.js
β β βββ Comment.js
β βββ routes/ # API routes
β β βββ authRoutes.js
β β βββ doubtRoutes.js
β β βββ commentRoutes.js
β βββ utils/ # Utility functions
β βββ server.js # Main server file
β βββ package.json
β
βββ DevHelp_API_Collection.postman_collection.json
βββ DevHelp_Environment.postman_environment.json
βββ README.md
- Primary:
#F7418D(Pink) - Secondary: Various shades of gray and blue
- Success: Green tones
- Error: Red tones
- Warning: Yellow/Orange tones
- Headings: Cormorant Garamond (serif)
- Body: Open Sans (sans-serif)
- Mobile: < 640px
- Tablet: 640px - 1024px
- Desktop: > 1024px
- Use the provided Postman collection for API testing
- Test responsive design across different devices
- Verify authentication flows and role-based access
# Run ESLint
cd client
npm run lint
cd server
npm run lint- Lazy Loading: Code splitting for major components
- Infinite Scroll: Efficient data loading
- Image Optimization: ImageKit integration
- Caching: API response caching
- Hot Reload: Fast development with Vite
- Error Boundaries: Graceful error handling
- ESLint: Code quality assurance
- Modular Architecture: Easy to maintain and extend
cd client
npm run build
# Deploy the dist/ foldercd server
# Set environment variables on your platform
# Deploy with your chosen platform- Update API URLs to production endpoints
- Use secure JWT secrets
- Configure production database
- Set up production ImageKit environment
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow the existing code style
- Add comments for complex logic
- Test your changes thoroughly
- Update documentation if needed
This project is licensed under the MIT License. See the LICENSE file for details.
Gaurav Pratap Singh
- GitHub: @gauravsingh1281
- Email: gaurav@rentalog.in
Made with β€οΈ by the DevHelp Team