Skip to content
 
 

Repository files navigation

This is a Next.js + FastAPI starter enhanced with auth and a Gemini chat proxy.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open 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.

Backend (FastAPI)

Run the Python API for auth and Gemini chat proxy.

Setup

  1. Install Python 3.10+
  2. 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
  1. Environment variables (create .env or set in shell):
GEMINI_API_KEY=<your_api_key>
SECRET_KEY=<change-me>
ACCESS_TOKEN_EXPIRES_MINUTES=60
CORS_ALLOW_ORIGINS=http://localhost:3000
  1. Start the server:
uvicorn backend.main:app --reload --port 8000

API:

  • 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

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages