This is a monorepo containing three main components:
| Component | Technology | Purpose | Status |
|---|---|---|---|
| Backend | FastAPI + Python | AI API & Voice Processing | π§ Development |
| Frontend | Next.js + React | Chat Interface & UI | π§ Development |
| Landing | Static HTML/CSS/JS | Marketing & Branding | β Deployed |
Diana_Backend/pyproject.toml)The landing page is automatically deployed to GitHub Pages:
π Live Site: https://nomanayeem.github.io/diana/
# Navigate to backend
cd Diana_Backend
# Install dependencies (choose one method)
uv sync # Recommended: using uv
# OR
python -m venv .venv && source .venv/bin/activate && pip install fastapi uvicorn python-dotenv
# Run development server
uvicorn main:app --reload --host 0.0.0.0 --port 8000
API Endpoints:
GET / - Health messageGET /health - Health checkPOST /query - Send user queriesBackend will be available at: http://localhost:8000
Notes:
http://localhost:3000. Adjust in Diana_Backend/main.py if your frontend origin differs, or make it env-driven for production.# Navigate to frontend
cd diana_frontend
# Install dependencies
npm install
# Run development server
npm run dev
Useful scripts:
- `npm run build` β production build
- `npm run start` β run production build
- `npm run export` β static export (supports GitHub Pages via `NEXT_PUBLIC_BASE_PATH`)
Frontend will be available at: http://localhost:3000
# Terminal 1: Backend
cd Diana_Backend
uvicorn main:app --reload --port 8000
# Terminal 2: Frontend
cd diana_frontend
npm run dev
# Terminal 3: Landing (optional)
cd diana_landing
# Open index.html in browser for local testing
Diana/
βββ π Diana_Backend/ # FastAPI Backend
β βββ π main.py # Main application
β βββ π pyproject.toml # Python dependencies
β βββ π .env # Environment variables
βββ π diana_frontend/ # Next.js Frontend
β βββ π src/
β β βββ π app/ # App Router pages
β β βββ π components/ # Reusable components
β β βββ π config/ # Configuration files
β βββ π package.json # Node dependencies
β βββ π tailwind.config.js # Tailwind configuration
βββ π diana_landing/ # GitHub Pages Landing
β βββ π index.html # Main landing page
β βββ π .github/workflows/ # GitHub Actions
β βββ π README.md # Landing page docs
βββ π .github/workflows/ # GitHub Actions
β βββ π deploy-landing.yml # Landing page deployment
βββ π .gitignore # Git ignore rules
βββ π README.md # This file
Dianaβs UI/UX is inspired by modern AI chat interfaces, incorporating design patterns from:
Backend (Diana_Backend/.env):
# Add your environment variables here
API_KEY=your_api_key_here
DEBUG=True
Frontend (diana_frontend/.env.local):
# Next.js environment variables
NEXT_PUBLIC_API_URL=http://localhost:8000
# Optional when hosting under a subpath (e.g., GitHub Pages):
# NEXT_PUBLIC_BASE_PATH=/diana
npm run export) and hosting under a subpath (e.g., GitHub Pages), set NEXT_PUBLIC_BASE_PATH so links and assets resolve correctly. The next.config.mjs already adapts basePath/assetPrefix when this is set.NEXT_PUBLIC_API_URL is publicly reachable by the static site (client-side fetch).Diana_Backend/tests/FROM python:3.12-slim
WORKDIR /app
COPY Diana_Backend/ .
RUN pip install fastapi uvicorn python-dotenv
EXPOSE 8000
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
npm run build.nextnpm run export β out/ (useful for GitHub Pages)We welcome contributions! Hereβs how to get started:
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.