Next.jsReactStarter

full-stack-fastapi-template-nextjs — Next.js Starter Template

By nemanjam

A Next.js fork of the official fastapi/full-stack-fastapi-template, rewriting the frontend with Next.js server components and HttpOnly cookie authentication, while the backend remains FastAPI.

Explore the design

Compare the page layouts and mobile experience. Open any screenshot for a closer look.

1 previews
Author preview
Author-provided preview

Preview provided in the project README.

One original preview is available. Open the full image to inspect the design.

Screenshots show visual appearance; interactive behavior may differ.

Recorded 2026-10-03View source

What stands out

A quick read of the recorded project description.

01

Next.js fork of the official FastAPI full-stack template, with the frontend switched to server components and server actions

02

HttpOnly cookie authentication, supporting server-side rendering

03

Turborepo monorepo, frontend uses TailwindCSS and ShadcnUI, environment variables validated with Zod

04

Two deployment paths: Docker (main branch) and Vercel (vercel-deploy branch)

05

Several items remain unfinished in the repository Todo, such as Playwright test migration, Vitest unit tests, SEO and analytics

Template Details

This is a starter template maintained by nemanjam, based on the official fastapi/full-stack-fastapi-template, with the frontend replaced by Next.js. The repository description explicitly lists: use of server components, React Hook Form with server actions for form handling, HttpOnly cookie authentication to support SSR, Hey Api's client-next, Suspense and error boundaries, Turborepo monorepo, TailwindCSS and ShadcnUI, Zod for environment variable validation, and a simplified local development environment and Docker production configuration.

For deployment, two paths are provided: Docker uses the main branch, and Vercel uses the vercel-deploy branch. The Vercel approach requires creating two projects, pointing to the backend and frontend/apps/web directories respectively, and identifying each other via SITE_URL and API_URL; deployment can be done with the Vercel button or Vercel CLI, environment variables must be configured manually, and database migrations and seed data must also be run manually. The repository's Todo list shows that Playwright test migration, Vitest unit tests, Docker image tagging, API sorting parameters, email and Sentry support, API internationalization, SEO and analytics, etc., are not yet completed, so these capabilities should not be considered present.

Installation and running details are in docs/running.md, and there are separate documents for Vercel frontend and backend deployment. The project uses the MIT license, and the free scope is the code of this version; third-party assets such as demo images, fonts, and icons, as well as external services such as domains, hosting, and databases, need to be checked separately.

Next.jsStarter

Is it right for your project?

Use Cases

  • Want to build a full-stack project skeleton with FastAPI as the backend and Next.js as the frontend
  • Need a reference for a login flow with HttpOnly cookie authentication and SSR
  • Want to deploy frontend and backend as two separate projects on Vercel and connect to Postgres
  • Run a complete local development environment with frontend, backend, and database using Docker

Suitable For

  • Developers familiar with FastAPI and Next.js who want to use an existing full-stack template directly
  • Teams that need a Turborepo monorepo structure to manage frontend and backend code
  • Developers planning to deploy this template on Vercel or Docker

Getting started & customization

Use these recorded setup notes alongside the repository instructions for your chosen version.

  1. 1

    Installation and running steps are in the repository's docs/running.md

  2. 2

    Docker deployment uses the main branch, Vercel deployment uses the vercel-deploy branch

  3. 3

    Vercel requires creating two projects, pointing to backend and frontend/apps/web respectively, and configuring them with SITE_URL and API_URL

  4. 4

    The Vercel wizard does not automatically write environment variables; they must be configured manually, and database migrations and seed data must be run

  5. 5

    Third-party assets such as demo images and external services must be checked according to their respective licenses and fees

Read repository instructions

License & source material

Usage conditions & limitations

Free to use · keep license notice

This entry covers the free version under the MIT license in the public repository; the free scope is the code of this version and does not mean external services or third-party assets are free.

Must comply with when using

  • Permits free use, modification, commercial use, and distribution of this version's code.
  • When distributing copies or substantial portions of the code, retain the original author's copyright notice and the full MIT license notice.
  • The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.

Additional costs & items to verify

  • Deployment method is tied to the branch: Docker deployment must use the main branch, Vercel deployment must use the vercel-deploy branch, and the same branch cannot be used for both.
  • Vercel deployment requires creating two independent projects to host the frontend and backend separately; deployment cannot be completed with a single project.
  • The Vercel deployment wizard does not automatically write environment variables; after completing the wizard, variables such as SITE_URL and API_URL must be configured manually.
  • Vercel deployment relies on the Postgres database integration provided by Neon; the integration target must be selected as the backend project, and database migrations and seed data initialization must be run manually.
  • Demo images, fonts, icons, and other third-party assets must be checked according to their respective licenses and cannot be judged solely by the code's MIT license.
  • External services such as domains, hosting, databases, payments, or AI may incur additional charges.
View Original Text Basis

Permission is hereby granted, free of charge

Original License Text

If you want to deploy with Docker, use the `main` branch. If you want to deploy with Vercel, use the `vercel-deploy` branch.

Original README

you also need two separate deployments in Vercel to deploy the frontend and backend

Original README

No environment variables will be set automatically, you will need to configure them manually after the wizard completes.

Original README

you will be prompted to add the Neon integration for a Postgres database. Make sure to select the **backend** project as the integration target. Finally, you will need to run the database migrations and seed the newly provisioned database.

Original README
https://github.com/nemanjam/full-stack-fastapi-template-nextjs/blob/main/LICENSEhttps://github.com/nemanjam/full-stack-fastapi-template-nextjs/blob/main/README.md

Compiled by DeepSeek based on repository license and README ·2026-10-03. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.

Project checks & description sources

Template Information

Source platforms
GitHub
Documentation and maintenance reference score
More documented · 87 / 100
Technologies
Next.js · React
Website type
Starter
How this score is calculated

Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.

What to verify for this project

Repository update recorded
2026-06-03
Screenshot last checked
2026-10-03

A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.

The catalog identifies Next.js as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.

Use a selection guide →

How this description was prepared

AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.

Review declaration: [email protected] · 2026-10-04

Inspect the recorded source material

SHA-256: 887a786e5a02194906ed277e352572d8815ec2bb560067275b49aa56cb0e1f1e

2026-10-03T13:54:16.169Z

Source file / repository
# Full stack FastAPI template Next.js

Next.js v16 fork of the official [fastapi/full-stack-fastapi-template](https://github.com/fastapi/full-stack-fastapi-template) template. Server components, server actions, HttpOnly cookie auth, ShadcnUI with TailwindCSS v4, simplified local development environment and Docker production.

## Demo

**Docker: [https://full-stack-fastapi-template-nextjs.arm1.nemanjamitic.com](https://full-stack-fastapi-template-nextjs.arm1.nemanjamitic.com)**

**Vercel: [https://full-stack-fastapi-template-nextjs.vercel.app](https://full-stack-fastapi-template-nextjs.vercel.app)**

## Screenshot

![Frontend screenshot](docs/screenshots/frontend-screenshot-1200x630.png)

## Credits

- The original repository: [fastapi/full-stack-fastapi-template](https://github.com/fastapi/full-stack-fastapi-template)
- Next.js client side rendered PR: https://github.com/fastapi/full-stack-fastapi-template/pull/1733
- HttpOnly cookie PR: https://github.com/fastapi/full-stack-fastapi-template/pull/1606

## Features

- [x] Next.js v16, server components
- [x] React Hook Form and server actions for forms
- [x] HttpOnly cookie auth, enables SSR
- [x] Hey Api with client-next
- [x] Suspense, error boundaries
- [x] Turborepo monorepo, TailwindCSS v4, ShadcnUI
- [x] Validated env vars with Zod
- [x] Simple local dev environment, simplified Docker production

## Todo

- [x] Register page, Github login
- [ ] Migrate Playwright tests
- [ ] Unit tests with Vitest, Testing Library
- [ ] Tag Docker images
- [ ] API sort params
- [ ] Support emails, Sentry from the original repo
- [ ] no-monorepo branch
- [x] Runtime only env vars, reusable build
- [x] Env vars with [alizeait/next-public-env](https://github.com/alizeait/next-public-env)
- [ ] Versioning with [changesets/changesets](https://github.com/changesets/changesets) or [semantic-release/semantic-release](https://github.com/semantic-release/semantic-release)
- [ ] API internationalization
- [ ] Update Python
- [ ] Open graph, SEO, analytics
- [ ] Tailscale Github Actions
- [ ] Integration tests frontend and backend
- [x] Deploy with Vercel

## Installation and running

Docs: [docs/running.md](docs/running.md)

## Deploy to Vercel

If you want to deploy with Docker, use the `main` branch. If you want to deploy with Vercel, use the `vercel-deploy` branch.

```bash
# Docker
git checkout main

# Vercel
git checkout vercel-deploy
```
Similarly to how you need two separate containers to deploy the app with Docker, you also need two separate deployments in Vercel to deploy the frontend and backend. You will configure them to be aware of each other using `SITE_URL` and `API_URL`, which they use to communicate with each other.

You can deploy to Vercel either using "Vercel button" or Vercel CLI method.

### Vercel button

[![Deploy to Vercel](https://vercel.com/button)](https://vercel.com/new/clone?demo-description=Build%20full-stack%20apps%20with%20Next.js%20and%20FastAPI.&demo-image=https%3A%2F%2Fgithub.com%2Fnemanjam%2Ffull-stack-fastapi-template-nextjs%2Fraw%2Fmain%2Fdocs%2Fscreenshots%2Ffrontend-screenshot-1200x630.png&demo-title=Full%20stack%20FastAPI%20template%20with%20Next.js&demo-url=https%3A%2F%2Ffull-stack-fastapi-template-nextjs.vercel.app&project-name=Full%20stack%20FastAPI%20template%20with%20Next.js&repository-name=full-stack-fastapi-template-with-next-js&repository-url=https%3A%2F%2Fgithub.com%2Fnemanjam%2Ffull-stack-fastapi-template-nextjs%2Ftree%2Fvercel-deploy&project-names=full-stack-fastapi-frontend%2Cfull-stack-fastapi-backend&root-directories=frontend%2Fapps%2Fweb%2Cbackend&monorepo=1&totalProjects=2&skippable-integrations=1&products=%5B%7B%22type%22%3A%22integration%22%2C%22protocol%22%3A%22storage%22%2C%22productSlug%22%3A%22neon%22%2C%22integrationSlug%22%3A%22neon%22%7D%5D)

Clicking the "Deploy" button above will take you to the Vercel deployment wizard. It will create a **single GitHub repository** and **two separate Vercel projects**, pointing to the `/backend` and `/frontend/apps/web` directories for the backend and frontend, respectively. 

No environment variables will be set automatically, you will need to configure them manually after the wizard completes. During setup, you will be prompted to add the Neon integration for a Postgres database. Make sure to select the **backend** project as the integration target. Finally, you will need to run the database migrations and seed the newly provisioned database.

### Vercel CLI

You can also deploy to Vercel from you local development environment using Vercel CLI. 

### Documentation

You can find more details about deploying using both "Vercel button" and Vercel CLI methods in the documentation linked bellow.

Frontend docs: [docs/vercel-deployment-frontend.md](docs/vercel-deployment-frontend.md)

Backend docs: [docs/vercel-deployment-backend.md](docs/vercel-deployment-backend.md)

## Routes

```bash
# Frontend
http://localhost:3000
https://full-stack-fastapi-template-nextjs.arm1.nemanjamitic.com

# Backend
http://localhost:8000/docs
https://api-full-stack-fastapi-template-nextjs.arm1.nemanjamitic.com/docs

# openapi.json
http://localhost:8000/api/v1/openapi.json
https://api-full-stack-fastapi-template-nextjs.arm1.nemanjamitic.com/api/v1/openapi.json
```

## License

MIT license: [License](LICENSE)
Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.