A full-stack Generative AI application featuring a Flask-based backend with multiple AI agents and a Next.js frontend for interactive visualization.
- Backend (Flask API): Provides REST endpoints for various AI agents including:
- Agent 0: Chat functionality
- Agent 1: Resume screening
- Agent 2-4: Additional agents (placeholders for future implementation)
- Frontend (Next.js): Interactive web interface with 3D pipeline visualization using Three.js and Tailwind CSS.
Before running this project, ensure you have the following installed on your system:
- Python 3.8 or higher
- Node.js 18 or higher (includes npm)
- Git (for cloning the repository)
If you haven't already, clone the repository or navigate to the project folder:
cd /Users/ishikadutta/Desktop/ishika\ codes\ 2025/Gen-AI-
Navigate to the Backend directory:
cd Backend -
Create a virtual environment (recommended):
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Python dependencies:
pip install -r requirements.txt
-
Set up environment variables:
- Copy the
.envfile or create one if it doesn't exist. - Add your API keys (see Environment Variables section below).
- Copy the
-
Run the Flask server:
python3 main.py
The backend will start on
http://localhost:5000(default Flask port).
-
Open a new terminal and navigate to the frontend directory:
cd ../gen-ai-frontend -
Install Node.js dependencies:
npm install
-
Start the development server:
npm run dev
The frontend will be available at
http://localhost:3000.
The backend requires the following environment variables in the .env file:
GROQ_API_KEY: Your Groq API key for AI model accessMODEL_NAME: The name of the AI model (e.g., 'qwen-2.5-32b')MODEL_ID: The ID of the AI model (same as MODEL_NAME)EXA_API_KEY: Your Exa API key for web search functionality
Important: Never commit your .env file to version control. Get your own API keys from:
-
Ensure both backend and frontend servers are running:
- Backend:
http://localhost:5000 - Frontend:
http://localhost:3000
- Backend:
-
Open your browser and go to
http://localhost:3000to access the application. -
The frontend will communicate with the backend API to interact with the AI agents.
The backend provides the following endpoints:
GET /: Health checkPOST /api/agent0/chat: Chat with Agent 0POST /api/agent1/screen: Resume screening with Agent 1GET /api/agent1/logs: Get Agent 1 logs
- Backend fails to start: Check if all dependencies are installed and API keys are set correctly.
- Frontend build errors: Ensure Node.js version is 18+ and run
npm installagain. - CORS errors: The backend has CORS enabled, but ensure both servers are running on the correct ports.
- Python import errors: Make sure you're in the correct directory and virtual environment is activated.
Gen-AI/
├── Backend/
│ ├── main.py # Flask API server
│ ├── requirements.txt # Python dependencies
│ ├── .env # Environment variables (not committed)
│ ├── Agents/ # AI agent implementations
│ │ ├── Agent0/
│ │ ├── Agent1/
│ │ └── ...
│ └── templates/ # HTML templates
├── gen-ai-frontend/
│ ├── package.json # Node.js dependencies
│ ├── src/
│ │ ├── app/ # Next.js app directory
│ │ └── components/ # React components
│ └── public/ # Static assets
└── setup.bat # Windows setup script (for reference)
- Fork the repository
- Create a feature branch
- Make your changes
- Test both backend and frontend
- Submit a pull request
This project is for educational purposes. Please check individual component licenses.