This project is a Multi-Turn AI Chatbot System developed using LLaMA 3 as the core conversational AI engine. The chatbot supports multi-turn conversations, user authentication, feedback collection, analytics, and local AI inference.
Phase 1 focuses on building the complete system foundation including:
- Frontend Chat Interface
- Backend API Server
- Google OAuth Authentication
- LLaMA 3 Integration
- Database Connectivity
- Feedback Collection System
- Analytics Module Initialization
I'm facing difficulty running LLaMA 3 locally due to limited hardware resources So I'm using grok or openRouter api
This project uses an upgraded modern stack while maintaining all required functionality.
| Technology | Purpose |
|---|---|
| Python | Backend development |
| FastAPI / Flask | Backend APIs |
| Next.js | Frontend framework |
| Ollama | Local LLaMA serving |
| Supabase | Database |
Built using Next.js.
Responsible for:
- Login/signup pages
- Google authentication
- Chat dashboard
- Chat interface
- Feedback collection
Responsible for:
- API routing
- Session management
- Authentication
- AI request handling
- Database communication
Responsible for:
- Generating chatbot responses
- Processing prompts locally
- Maintaining conversational context
Built using supabase.
Stores:
- User accounts
- Sessions
- Chat history
- Feedback data
- Analytics data
Responsible for:
- Feedback analysis
- Usage analytics
- Topic classification
- Graph generation
- docker
- supabase cli
- Python > 3.8
- Next.js 16.2.6 stable version
- uv (Python package manager)
Follow these steps to set up and run the project locally:
git clone <repository-url>
cd MultiturnAiChatbotWithLlama3Ensure Docker is running on your system, navigate to the frontend directory, and start the Supabase local environment:
cd frontend
supabase startNote: This will provide you with several URLs and keys. You will need these for the next steps.
Copy the example environment file and update it with your local Supabase credentials:
# Assuming you are still in the frontend directory
cp .env.example .env.localEdit .env.local and fill in the values provided by the supabase start command:
NEXT_PUBLIC_SUPABASE_URL(usuallyhttp://127.0.0.1:54321)NEXT_PUBLIC_SUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEYGROQ_API_KEY(if using Groq)OPENROUTER_API_KEY(if using OpenRouter)
Install dependencies and run:
npm install
npm run devThe frontend will be available at http://localhost:3000.
Open a new terminal window:
cd MultiturnAiChatbotWithLlama3/backend
cp ../frontend/.env.local .envInstall dependencies using uv and start the server:
uv pip install -r requirements.txt # Or run directly:
uv run python app.pyThe backend API will be available at http://localhost:5000.