Monorepo with Next.js (frontend) and FastAPI (backend).
bro-founder/
├── .github/
│ └── workflows/
│ └── ci.yml
├── frontend/ # Next.js (App Router)
│ ├── app/
│ ├── public/
│ ├── next.config.js
│ ├── tailwind.config.js
│ ├── postcss.config.js
│ ├── package.json
│ └── tsconfig.json
├── backend/ # FastAPI
│ ├── api/
│ │ └── v1/
│ ├── core/
│ ├── models/
│ ├── schemas/
│ ├── main.py
│ ├── requirements.txt
│ └── database.py
├── .gitignore
└── README.md
- Node.js 18+ (or 20+)
- Python 3.11+
- Install dependencies:
cd frontendnpm install
- Run dev server:
npm run dev
- Open:
http://localhost:3000
Tailwind is preconfigured (see frontend/tailwind.config.js, frontend/postcss.config.js, and frontend/app/globals.css).
- Create a virtualenv and install deps:
cd backendpython -m venv .venvsource .venv/bin/activate(Windows:.\.venv\Scripts\activate)pip install -r requirements.txt
- Run API locally:
uvicorn main:app --reload
- Endpoints:
- Health:
GET http://localhost:8000/health - Ping (v1):
GET http://localhost:8000/api/v1/ping
- Health:
Default CORS allows the Next.js dev server at http://localhost:3000.
- Database URL (optional): set
DATABASE_URL(defaults tosqlite:///./app.db).
GitHub Actions workflow (.github/workflows/ci.yml) builds the frontend and verifies the backend imports on pushes and PRs.
- This is a minimal scaffold. Add models, schemas, and routes under
backend/as your API grows. - In the frontend, add components under
frontend/components/and pages infrontend/app/.