A comprehensive platform where developers can create profiles, share knowledge, bookmark resources, and connect through real-time chat.
- Authentication & Authorization: JWT-based login/signup with protected routes
- Multi-step Profile Wizard: Comprehensive profile creation with progress tracking
- Post Feed: Infinite scroll with markdown support for code snippets
- Nested Comments: Hierarchical comment system with optimistic updates
- Resource Bookmarking: Save trending repositories with offline sync
- Private Chat: Real-time messaging with typing indicators
- Analytics Dashboard: Track your activity and engagement
- Dark/Light Theme: Toggle between themes with system preference detection
- Responsive Design: Mobile-first design that works on all devices
- User Management: JWT authentication with refresh tokens
- Post & Comment System: Rich-text support with nested comments
- RapidAPI Integration: Fetch trending GitHub repositories
- Real-time Chat: Socket.io for private messaging
- Caching: Redis for API responses and chat messages
- Security: Rate limiting, input sanitization, IP blocking
- Analytics: User activity tracking and insights
- Frontend: React, TypeScript, Redux Toolkit, Tailwind CSS, Socket.io Client
- Backend: Node.js, Express, TypeScript, Socket.io
- Database: MongoDB with Mongoose
- Cache: Redis
- Authentication: JWT with refresh tokens
- Real-time: Socket.io
- Styling: Tailwind CSS with dark mode support
- Node.js (v16 or higher)
- MongoDB (local or cloud)
- Redis (local or cloud)
- npm or yarn
git clone <repository-url>
cd devhubcd backend
npm installCreate .env file in backend directory:
NODE_ENV=development
PORT=5000
MONGO_URI=mongodb://localhost:27017/devhub
REDIS_URI=redis://localhost:6379
JWT_SECRET=your_jwt_secret_key_here
REFRESH_SECRET=your_refresh_secret_key_here
SMTP_HOST=smtp.gmail.com
SMTP_USER=your_email@gmail.com
SMTP_PASS=your_app_password
RAPIDAPI_KEY=your_rapidapi_key_here
FRONTEND_URL=http://localhost:5173Start the backend:
npm run devcd frontend
npm installCreate .env file in frontend directory:
VITE_API_BASE_URL=http://localhost:5000Start the frontend:
npm run dev- Frontend: http://localhost:5173
- Backend API: http://localhost:5000
devhub/
βββ backend/
β βββ config/ # Database and Redis configuration
β βββ controllers/ # Route handlers
β βββ middleware/ # Custom middleware
β βββ models/ # MongoDB schemas
β βββ routes/ # API routes
β βββ server.ts # Express server setup
βββ frontend/
β βββ src/
β β βββ components/ # React components
β β βββ slices/ # Redux slices
β β βββ types/ # TypeScript types
β β βββ store.ts # Redux store
β βββ public/ # Static assets
βββ README.md
POST /api/auth/signup- User registrationPOST /api/auth/login- User loginPOST /api/auth/refresh- Refresh access tokenPOST /api/auth/logout- User logoutGET /api/auth/profile- Get user profilePUT /api/auth/profile- Update user profile
GET /api/posts/feed- Get post feed with paginationPOST /api/posts- Create new postPUT /api/posts/:id- Update postDELETE /api/posts/:id- Delete postGET /api/posts/:id- Get single postPOST /api/posts/comment- Add commentGET /api/posts/user/:userId- Get user's posts
GET /api/resources/trending- Get trending repositoriesPOST /api/bookmarks- Bookmark resourceGET /api/bookmarks- Get user bookmarks
GET /api/users/search- Search usersGET /api/chat/rooms- Get chat roomsGET /api/chat/messages/:chatId- Get chat messages
GET /api/analytics- Get user analyticsGET /api/analytics/global- Get global analytics
cd backend
npm testcd frontend
npm test- Create account on Render
- Connect your repository
- Set environment variables
- Deploy
- Create account on Vercel
- Connect your repository
- Set build command:
cd frontend && npm run build - Set output directory:
frontend/dist - Deploy
- Create account on Upstash
- Create Redis database
- Update
REDIS_URIin environment variables
- JWT authentication with refresh tokens
- Input sanitization to prevent XSS/SQL injection
- Rate limiting per user and IP
- IP blocking for suspicious activity
- CORS configuration
- Password hashing with bcrypt
The application is fully responsive and optimized for:
- Mobile phones (320px+)
- Tablets (768px+)
- Desktop (1024px+)
- Clean, modern developer-focused design
- Dark/Light theme toggle
- Smooth animations and transitions
- Loading states and error handling
- Intuitive navigation
- Mobile-friendly chat interface
- Progress indicators for multi-step forms
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
This project is licensed under the MIT License.
For support, email support@devhub.com or create an issue in the repository.
Built with β€οΈ by the DevHub Team