An intelligent, full-stack virtual assistant built to make everyday interactions simpler through conversational AI and a modern web experience.
Built with React, Node.js, Express, MongoDB, and Google Gemini AI.
Overview • Features • Tech Stack • Architecture • Installation • Roadmap
Virtual Assistant is a full-stack application that integrates AI-powered assistance into an interactive web experience.
Built with React on the frontend and Node.js with Express on the backend, the project explores how modern web technologies can be combined with generative AI to create an intelligent personal assistant.
The application integrates Google Gemini AI and uses a backend architecture designed to support authentication, database operations, and external services.
The goal is to create a foundation for natural human-computer interaction while exploring the practical implementation of AI-powered applications.
- Integrate generative AI into a full-stack web application.
- Build an intuitive interface for interacting with an AI assistant.
- Explore voice-driven interactions and conversational experiences.
- Implement backend APIs and database connectivity.
- Develop a modular architecture that supports additional assistant capabilities.
- Apply practical concepts in authentication, API integration, and application development.
Google Gemini AI integration provides the foundation for intelligent conversational interactions.
- Natural-language interactions with an AI model.
- AI-generated responses to user queries.
- An extensible foundation for additional AI capabilities.
Explore voice-driven interaction to make communication with the assistant more natural.
The application can be extended with speech recognition and text-to-speech functionality, depending on the browser APIs and services implemented.
Built with React and Vite for a modern frontend development experience.
- Component-based architecture.
- Client-side navigation with React Router.
- Utility-first styling using Tailwind CSS.
- Icon integration with React Icons.
- HTTP requests through Axios.
The backend includes dependencies for authentication and account-related functionality.
- JWT-based authentication.
- Password hashing with bcrypt.
- Cookie handling with cookie-parser.
- Cross-origin request configuration using CORS.
The exact authentication flows depend on the implemented routes and middleware.
MongoDB and Mongoose provide the foundation for persistent data storage.
The backend can define structured data models and interact with stored application data through database operations.
Cloudinary is included as a dependency for cloud-based media management.
This provides a foundation for integrating image uploads and other supported media operations.
The Express backend provides a foundation for:
- REST API development.
- Request and response handling.
- Authentication middleware.
- Database operations.
- External API integration.
- Additional AI-powered functionality.
| Category | Technologies |
|---|---|
| Frontend | React 19, JavaScript |
| Build Tool | Vite |
| Styling | Tailwind CSS 4 |
| Routing | React Router |
| Icons | React Icons |
| HTTP Client | Axios |
| Backend | Node.js, Express 5 |
| Database | MongoDB |
| ODM | Mongoose |
| Authentication | JWT, bcrypt |
| AI Integration | Google Gemini AI |
| Media Services | Cloudinary |
| Environment Configuration | dotenv |
| Development Tools | npm, Nodemon, ESLint |
The application follows a frontend-backend architecture.
┌───────────────────────────────┐
│ │
│ React Frontend │
│ │
│ User Interface │
│ React Components │
│ Client-side Routing │
│ API Requests │
│ │
└───────────────┬───────────────┘
│
│ HTTP / REST
▼
┌───────────────────────────────┐
│ │
│ Express Backend │
│ │
│ API Routes │
│ Application Logic │
│ Authentication │
│ │
└──────────┬───────────┬────────┘
│ │
▼ ▼
┌──────────────┐ ┌──────────────┐
│ │ │ │
│ MongoDB │ │ Gemini AI │
│ │ │ │
└──────────────┘ └──────────────┘
- The user interacts with the React frontend.
- The frontend sends an HTTP request to the backend when required.
- Express processes the request and executes the relevant application logic.
- The backend communicates with MongoDB or an external service when necessary.
- The response is returned to the frontend.
- React updates the interface based on the response.
The diagram represents the high-level architecture. Actual request flows depend on the implemented routes and service integrations.
The repository separates the frontend and backend into independent applications.
virtualAssistant/
│
├── frontend/
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Application pages
│ │ ├── assets/ # Static assets
│ │ ├── App.jsx # Main application component
│ │ └── main.jsx # Frontend entry point
│ │
│ ├── public/ # Public assets
│ ├── package.json
│ └── vite.config.js
│
├── backend/
│ ├── index.js # Backend entry point
│ ├── package.json
│ └── ... # Routes, models and services
│
└── README.md
Adjust individual filenames and directories to match the actual repository structure.
Follow these steps to run the project locally.
Ensure that you have the following installed:
- Node.js
- npm
- MongoDB, if required by the application
- A Google Gemini API key, if using the Gemini integration
- A Cloudinary account, if using its media services
git clone https://github.com/siddharth07-code/virtualAssistant.git
cd virtualAssistant
Navigate to the backend directory:
cd backend
Install the dependencies:
npm install
Create a .env file inside the backend directory.
Example configuration:
PORT=5000
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_secure_random_secret
GEMINI_API_KEY=your_gemini_api_key
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
Important: These environment variable names are illustrative. Verify the actual variable names used in your source code and configure only the values your application requires.
Never commit API keys, database credentials, or other secrets to GitHub.
Start the backend:
npm start
The backend's start script uses Nodemon to execute index.js.
Open a new terminal and navigate to the frontend directory from the project root:
cd virtualAssistant/frontend
If you are already inside the project root, simply run:
cd frontend
Install the dependencies:
npm install
Start the development server:
npm run dev
Vite will display the local development URL in your terminal.
Open that URL in your browser to access the application.
After starting both applications:
- Open the frontend in your browser.
- Confirm that the interface loads correctly.
- Test the implemented assistant features.
- Verify that frontend API requests reach the backend.
- Confirm that the database and external services are configured correctly.
If the frontend cannot communicate with the backend, check the API base URL, CORS configuration, server port, and browser console.
Keep sensitive configuration outside your source code.
| Variable | Purpose |
|---|---|
PORT |
Backend server port |
MONGODB_URI |
MongoDB connection string |
JWT_SECRET |
Secret used for JWT signing or verification |
GEMINI_API_KEY |
Google Gemini API credential |
CLOUDINARY_CLOUD_NAME |
Cloudinary account identifier |
CLOUDINARY_API_KEY |
Cloudinary API credential |
CLOUDINARY_API_SECRET |
Cloudinary API secret |
Configure only the environment variables required by your implementation.
For production deployments, use your hosting provider's secret-management facilities.
Run these commands from the frontend directory.
| Command | Description |
|---|---|
npm run dev |
Start the Vite development server |
npm run build |
Generate a production build |
npm run preview |
Preview the production build locally |
npm run lint |
Run ESLint |
Run these commands from the backend directory.
| Command | Description |
|---|---|
npm start |
Start the backend using Nodemon |
Security is essential when building AI-powered applications.
- Store API keys and database credentials in environment variables.
- Use strong, randomly generated JWT secrets.
- Hash passwords before storing them.
- Validate and sanitize user input on the backend.
- Restrict CORS to trusted frontend origins in production.
- Avoid exposing sensitive server errors to clients.
- Protect private endpoints with appropriate authentication and authorization.
- Consider rate limiting AI endpoints to reduce abuse and unexpected API costs.
The actual security guarantees depend on the protections implemented in the application.
Potential directions for further development include:
- Improve voice interaction and speech-response handling.
- Add persistent conversation history.
- Introduce contextual memory for longer conversations.
- Expand assistant capabilities through modular tools.
- Improve loading states and error handling.
- Add automated tests for API endpoints and user flows.
- Introduce rate limiting and AI usage monitoring.
- Improve production deployment and configuration.
- Add screenshots and a demonstration video.
- Document API endpoints and application workflows.
These are potential improvements rather than claims about existing functionality.
Contributions, suggestions, and bug reports are welcome.
- Fork the repository.
- Create a branch for your changes.
- Implement and test your changes.
- Commit your changes with a descriptive message.
- Push the branch to your fork.
- Open a pull request explaining your contribution.
Example:
git checkout -b feat/improve-assistant
git add .
git commit -m "feat: improve assistant interaction"
git push origin feat/improve-assistant
Keep contributions focused and ensure that existing functionality continues to work as expected.
Computer Science Engineering student interested in full-stack development, artificial intelligence, machine learning, and building practical AI-powered applications.
The backend package declares the ISC license.
Before distributing the project, ensure that an appropriate root-level LICENSE file exists and that its terms accurately reflect the licensing of the complete application.