Next Fastify Template is a pragmatic full-stack scaffold for teams that love the ergonomics of Next.js on the front end and the speed of Fastify on the backend. The project ships with a clean separation between the UI and API layers while still sharing types and utilities across both.
What you get
- Next.js App Router, Tailwind CSS, and React Query for modern UI development
- Fastify server with zod-based validation, JWT authentication hooks, and structured logging
- Docker Compose setup that boots the entire stack (Next.js, Fastify, PostgreSQL) with a single command
- Shared TypeScript types published from the backend to the frontend for end-to-end type safety
- Ready-to-run example modules (auth, users, health-check) to copy when building new features
Developer experience
- ESLint, Prettier, and Husky pre-commit hooks keep the codebase consistent
- Vitest and Supertest cover critical backend flows and UI components
- GitHub Actions workflow that lints, tests, and builds on every push
Use it as the foundation for dashboards, admin tools, or SaaS products whenever you need the flexibility of a Fastify backend with a polished Next.js interface.