Nextjs Prisma boilerplate

Homepage Nextjs Prisma boilerplate

Overview

Full stack boilerplate with Next.js and Prisma.

Goals

Make a solid foundation for a modern full stack Next.js server side rendered app. Get practical experience configuring everything from scratch, especially code structure, testing and automation.

Tech stack

Features

Implementation details

It is a boilerplate project that aims to establish good practices from the beginning. Frontend code is organized into the following layers pages -> layouts -> views -> components suitable for unit and integration testing. Similarly backend code is organized into controllers -> middleware -> services layers for easy testing. Styling code uses BEM and Tailwind. Theming and dark mode are implemented as Tailwind plugin. React Query is used for data fetching along with Suspense and ErrorBoundary.

Frontend tests are done with Jest, Testing Library, Mock Service Worker, backend tests use Supertest client, E2E tests are done with Cypress. All tests are configured to run locally on the host, in Docker and in Github Actions.

App is built as a Docker image inside Github Actions and deployed to VPS behind the Traefik reverse proxy.

You can find more implementation details in the Documentation section on Github.

Lessons learned