A production-grade AI platform with specialized agents for coding, career guidance, and general assistance.
- Coding Agent: Expert programming assistance with best practices and optimization
- Resume Agent: Professional resume review and career guidance
- General Agent: Conversational AI for general knowledge and information
- β¨ Futuristic animated background with particle effects
- π¨ Glass-morphism UI components with Tailwind CSS
- π¬ Smooth animations powered by Framer Motion
- π± Fully responsive design (mobile, tablet, desktop)
- β‘ Lightning-fast performance with optimized rendering
- π JWT authentication with secure password hashing
- π‘οΈ Rate limiting and security headers (Helmet)
- π Structured logging with Winston
- β Input validation with Joi
- π Comprehensive error handling
- π RESTful API with v1 versioning
- π€ Seamless Ollama integration
- π§ Context-aware conversations
- π Message history tracking
- π Persistent session management
devsphere-ai/
βββ backend/ # Node.js Express API
β βββ src/
β β βββ controllers/ # Route handlers
β β βββ services/ # Business logic
β β βββ models/ # MongoDB schemas
β β βββ middleware/ # Express middleware
β β βββ routes/ # API routes
β β βββ utils/ # Utilities & helpers
β β βββ config/ # Configuration files
β β βββ index.js # Entry point
β βββ package.json
β
βββ devsphere-frontend/ # React + Vite
β βββ src/
β β βββ components/
β β β βββ ui/ # Base UI components
β β β βββ chat/ # Chat-specific components
β β β βββ layout/ # Layout components
β β β βββ animations/ # Animated components
β β βββ pages/ # Page components
β β βββ services/ # API services
β β βββ hooks/ # Custom React hooks
β β βββ utils/ # Utility functions
β β βββ App.jsx # Root component
β β βββ main.jsx # Entry point
β βββ vite.config.js
β βββ tailwind.config.js
β βββ package.json
β
βββ docs/ # Documentation
βββ .env.example # Environment template
βββ README.md # This file
βββ package.json # Root package.json
- React 19 - UI library
- Vite - Build tool & dev server
- Tailwind CSS - Utility-first CSS
- Framer Motion - Animation library
- Lucide React - Icon library
- Axios - HTTP client
- React Router v7 - Navigation
- Node.js - Runtime
- Express 5 - Web framework
- MongoDB - NoSQL database
- Mongoose - ODM
- JWT - Authentication
- Ollama - AI Model integration
- Winston - Logging
- Joi - Validation
- Helmet - Security
- Nodemon - Development auto-reload
- ESLint - Code linting
- Git - Version control
Before running the project, ensure you have:
- Node.js: v18 or higher (Download)
- npm: v9 or higher
- MongoDB: Local or Atlas instance (Get Started)
- Ollama: For AI model execution (Download)
ollama pull gemma:2b
# or other models like: neural-chat, mistral, etc.git clone https://github.com/hardikkaurani/devsphere-ai.git
cd devsphere-aicp .env.example .envEdit .env with your configuration:
# Database
MONGO_URI=mongodb://localhost:27017/devsphere-ai
# Server
PORT=5000
NODE_ENV=development
# JWT
JWT_SECRET=your-super-secret-key-change-in-production
JWT_EXPIRE=7d
# CORS
CORS_ORIGIN=http://localhost:5173
# Ollama AI
OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_MODEL=gemma:2b
# Logging
LOG_LEVEL=info# Install root dependencies
npm install
# Frontend dependencies
cd devsphere-frontend && npm install && cd ..
# Backend dependencies (if needed)
cd backend && npm install && cd ..Terminal 1 - Backend:
npm run start:backend
# or
cd backend && npm run devTerminal 2 - Frontend:
cd devsphere-frontend && npm run devnpm run dev:all- Frontend: http://localhost:5173
- Backend API: http://localhost:5000
- API Docs Endpoint: http://localhost:5000/health
POST /api/v1/auth/register- User registrationPOST /api/v1/auth/login- User loginPOST /api/v1/auth/logout- User logout
POST /api/v1/agent/message- Send message to AI agentGET /api/v1/agent/sessions- Get user's chat sessionsGET /api/v1/agent/sessions/:id- Get session details
GET /health- Server status
curl -X POST http://localhost:5000/api/v1/agent/message \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-d '{
"message": "How do I optimize this React component?",
"agentType": "coding"
}'{
"success": true,
"message": "Message processed",
"reply": "Here's how to optimize your React component...",
"sessionId": "session_123"
}npm testcd devsphere-frontend && npm run lintnpm run buildThis creates:
- Frontend build:
devsphere-frontend/dist/ - Backend: Ready to run with
npm start
backend/src/
βββ controllers/ # Handle HTTP requests & responses
βββ services/ # Implement business logic
βββ models/ # Define data schemas
βββ middleware/ # Authentication, error handling, etc.
βββ routes/ # Define API endpoints
βββ utils/ # Helper functions & classes
βββ config/ # Configuration utilities
βββ index.js # Application startup
devsphere-frontend/src/
βββ components/
β βββ ui/ # Button, Card, Input, etc.
β βββ chat/ # ChatWindow, MessageBubble, etc.
β βββ layout/ # MainLayout, Sidebar, etc.
β βββ animations/ # AnimatedBackground, etc.
βββ pages/ # LandingPage, Dashboard
βββ services/ # API integration
βββ hooks/ # Custom React hooks
βββ utils/ # Helper functions
βββ constants/ # Constants & config
- User registers with email/password
- Backend validates and stores password hash
- JWT token issued on successful login
- Token included in Authorization header for protected routes
- Backend verifies token on each request
The API includes comprehensive error handling:
{
"success": false,
"message": "User already exists",
"statusCode": 409,
"errors": {
"email": "Email is already in use"
}
}Logs are stored in logs/ directory:
combined.log- All logserror.log- Error logs only
View logs in real-time during development via console output.
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create your 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 Airbnb JavaScript style guide
- Use meaningful variable/function names
- Add comments for complex logic
- Keep functions small and focused
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by modern AI platforms like OpenAI, Vercel, and Linear
- Built with β€οΈ for developers and AI enthusiasts
- Special thanks to the open-source community
- π¨ Email: hardikkaurani2@gmail.com
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
- User authentication & profiles
- Conversation history & export
- Custom agent creation
- Team collaboration features
- API rate limiting dashboard
- Advanced analytics
- Mobile app (React Native)
- WebSocket real-time support
Made with β€οΈ by Hardik Kaurani | Visit Website | View Demo