FastAPI Nextjs Clerk Starter
Next.js plus FastAPI with Clerk: sign-in in the browser, JWT-checked APIs on the server
This project shows Clerk handling sign-up and sign-in in a Next.js client, then passing Clerk-issued JWTs to a FastAPI backend that exposes public and protected routes. The dashboard demonstrates fetching a token, calling both kinds of endpoints, and handling unauthorized errors, with light/dark UI and route protection as described in the README.
When it is useful
You want a minimal full-stack reference for BFF-style patterns with a hosted auth vendor, you are onboarding a team to split client and Python API repos, or you need a Docker Compose layout to run both sides together. You supply the Clerk project and env files for client and backend.
What you can do
- Complete the Clerk flows in the web app and see personalized responses when the API accepts your token.
- Inspect how JWT verification is wired on the FastAPI side versus open routes.
- Run the stack with Docker Compose and extend either client or backend using the nested READMEs linked from the main GitHub repository.
Limits
- This is a demonstration template, not a finished product; billing, roles, and audits are yours to add.
- Security posture depends on your secrets handling, HTTPS, and Clerk settings; the repo documents wiring, not penetration-test results.
- Anything beyond the documented features (caching, multi-region, orgs) is custom work.










