A sophisticated full-stack AI assistant application built using the MERN stack, delivering advanced voice interactions, intelligent responses, and a suite of smart services tailored for professional and personal productivity.
- Advanced Conversational AI: Seamless conversations powered by Google Gemini.
- Voice Recognition & Speech Synthesis: Natural and responsive voice interactions.
- Multi-language Support: Communicate in multiple languages and dialects.
- Context-Aware Responses: Maintains context for smarter replies.
- Personality Customization: Adjustable AI personality to suit your preferences.
- Weather Integration: Real-time weather updates and forecasts.
- News Feed: Stay updated with the latest news across categories.
- Email Management: Mock email interface for demonstration.
- Smart Home Dashboard: Virtual controls for smart home devices.
- Advanced Analytics: Gain insights into user interactions.
- Modern Design: Glassmorphism effects and smooth animations.
- Responsive Layout: Fully optimized for all device sizes.
- Dark Theme: Experience a sleek and professional dark mode.
- Interactive Dashboard: Comprehensive and intuitive control center.
- Voice Visualizations: Real-time indicators for voice activity.
- JWT Authentication: Secure user authentication.
- Rate Limiting: API protection against abuse.
- Input Validation: Comprehensive data validation to enhance security.
- Error Handling: Graceful and user-friendly error management.
- Security Headers: Production-ready security measures.
- React 19: Leveraging the latest features of React.
- Vite: Fast build tool and development server.
- Tailwind CSS: Utility-first CSS framework for rapid styling.
- Framer Motion: Advanced animations for a polished UI.
- Axios: HTTP client for API requests.
- React Router: Efficient client-side routing.
- Node.js: Robust JavaScript runtime environment.
- Express.js: Lightweight and flexible web application framework.
- MongoDB: NoSQL database with Mongoose ODM.
- JWT: JSON Web Token for secure authentication.
- Cloudinary: Cloud-based image upload and management.
- Natural: Natural language processing library.
- Helmet: Security middleware for enhanced protection.
- Google Gemini AI: Advanced conversational AI model.
- OpenWeatherMap API: Real-time weather data (optional).
- Web Speech API: Voice recognition and synthesis.
MyAssistant/
βββ backend/ # Node.js backend
β βββ config/ # Configuration files
β βββ controllers/ # Route controllers
β βββ middlewares/ # Custom middleware
β βββ models/ # Database models
β βββ routes/ # API routes
β βββ services/ # Business logic services
β βββ public/ # File uploads
β βββ .env.example # Environment template
β βββ README.md # Backend documentation
β βββ package.json # Backend dependencies
βββ frontend/ # React frontend
β βββ src/
β β βββ components/ # Reusable components
β β βββ pages/ # Page components
β β βββ context/ # React context API
β β βββ assets/ # Static assets
β β βββ styles/ # CSS styles
β βββ public/ # Public assets
β βββ package.json # Frontend dependencies
βββ FEATURES.md # Detailed features documentation
βββ .gitignore # Git ignore rules
βββ README.md # This file
- Node.js (>=18.0.0)
- MongoDB database (local or Atlas)
- Git version control
-
Clone the repository
git clone https://github.com/its-pratyushpandey/MyAssistant.git cd MyAssistant
-
Setup Backend
cd backend npm install cp .env.example .env # Edit .env with your configuration npm run dev
-
Setup Frontend (in a new terminal)
cd frontend npm install npm run dev
-
Access the application
- Frontend: http://localhost:5173
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/api/docs
Create a .env
file in the backend directory:
# Required
MONGODB_URL=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
GEMINI_API_URL=your_gemini_api_url_with_key
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
# Optional
WEATHER_API_KEY=your_weather_api_key
NODE_ENV=development
PORT=8000
- Sign Up: Create a new account.
- Customize Assistant: Choose an AI avatar and name.
- Configure Settings: Adjust voice and AI preferences.
- Start Chatting: Use voice or text to interact.
- "Hey [Assistant Name]": Wake up the assistant.
- Weather queries: "What's the weather like?"
- General questions: Ask anything you want to know.
- System controls: "Open dashboard", "Show features".
- Weather Widget: Current weather and 5-day forecast.
- News Feed: Latest news from various categories.
- Email Interface: Mock email management.
- Smart Home: Virtual device controls.
- Analytics: Usage statistics and insights.
cd backend
npm run dev # Start development server
npm start # Start production server
npm test # Run tests (when available)
cd frontend
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
- Health Check:
GET /api/health
- API Docs:
GET /api/docs
- Authentication:
POST /api/auth/signup
,POST /api/auth/signin
- User Operations:
GET /api/user/current
,POST /api/user/update
- AI Chat:
POST /api/user/asktoassistant
- Set
NODE_ENV=production
. - Configure the production MongoDB URL.
- Set strong JWT secrets.
- Deploy to your preferred platform (Heroku, Railway, Render, etc.).
- Update the API URL for production.
- Build the project:
npm run build
. - Deploy to Vercel, Netlify, or a similar platform.
- 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.
This project is licensed under the ISC License - see the LICENSE file for details.
Pratyush Pandey
- GitHub: @its-pratyushpandey
- Google Gemini AI for intelligent responses.
- OpenWeatherMap for weather data.
- Cloudinary for image management.
- MongoDB for database services.
- All open-source contributors.
For support and questions:
- Create an issue on GitHub.
- Check the API documentation.
- Review the Features documentation.
β Star this repository if you found it helpful!