This is a Next.js + FastAPI starter enhanced with auth and a Gemini chat proxy.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses the system UI for chat and a monospace sans-serif elsewhere.
Run the Python API for auth and Gemini chat proxy.
- Install Python 3.10+
- In a terminal from the project root:
cd backend
python -m venv .venv
.venv/Scripts/activate # Windows PowerShell: .venv\Scripts\Activate.ps1
pip install -r requirements.txt- Environment variables (create
.envor set in shell):
GEMINI_API_KEY=<your_api_key>
SECRET_KEY=<change-me>
ACCESS_TOKEN_EXPIRES_MINUTES=60
CORS_ALLOW_ORIGINS=http://localhost:3000
- Start the server:
uvicorn backend.main:app --reload --port 8000API:
- POST
/auth/register{ email, name, password } - POST
/auth/login(form fields: username=email, password) - GET
/auth/me(Bearer token) - POST
/chat{ message, history? } (Bearer token) → proxies Gemini
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.