The Production-Ready Next.js Template
A scalable, feature-based architecture with authentication, database ORM, and code quality tooling already configured. Stop boilerplating, start building.
$ git clone https://github.com/MicrowebPG/nextjs-template.git$ npm install$ npm run devTech Stack
Everything you need, nothing you don't
A carefully curated set of tools and libraries that work together seamlessly, so you can focus on building your product.
Next.js 16
Latest App Router with Turbopack for blazing-fast builds and HMR.
Better Auth
Email/password auth with role-based access control and session management.
Prisma ORM
Type-safe MySQL database access with custom client generation and migrations.
Tailwind CSS v4
Utility-first CSS framework with enhanced performance and design tokens.
Shadcn UI
Beautiful, accessible React components with New York styling variant.
TypeScript
Full type safety across the stack with strict mode enabled.
Husky + Commitlint
Enforced conventional commits and pre-commit hooks for code quality.
ESLint 9
Flat config with Next.js Core Web Vitals and Prettier integration.
Architecture
Feature-based, scalable by design
Each feature is self-contained with its own components, types, constants, and business logic. Easy to maintain, easy to scale.
Self-Contained Features
Each feature module encapsulates its own components, library code, types, and constants. Add or remove features without touching the rest of the app. The auth module is a perfect reference implementation.
Role-Based Access Control
Three built-in roles—User, Admin, and Developer—with fine-grained access control powered by Better Auth's admin plugin. Permissions are centralized and easy to extend.
From Template to Production, Faster
With authentication, database ORM, and a scalable architecture already set up, you can focus on building your unique features instead of boilerplate. Get to market faster with a solid foundation.
Authentication
Auth that just works
Better Auth is pre-configured with email/password login, session management, and a role system. Here is exactly what ships out of the box.
import { betterAuth } from 'better-auth'import { prismaAdapter } from 'better-auth/adapters/prisma'
export const auth = betterAuth({ database: prismaAdapter(prisma, { provider: 'mysql' }), session: { expiresIn: 7 days, updateAge: 1 day }, emailAndPassword: { enabled: true }, user.roles: [USER, ADMIN, DEVELOPER], plugins: [admin({ ac, roles })]
}Default role for all new signups. Standard access to app features.
Full administrative access. Can manage users, roles, and settings.
Admin-level access with development permissions and tooling.
Database
Prisma ORM with MySQL
A fully typed database layer with custom client generation, migrations support, and models designed around authentication and user management.
User
Relations: Sessions, Accounts
Session
Relations: User
Account
Relations: User
Verification
Relations: None
Role Enum
Enum-based user roles
Setup
Up and running in minutes
Five steps from zero to a fully functional development environment with auth, database, and code quality tooling.
Clone the repository
$ git clone https://github.com/MicrowebPG/nextjs-template.gitInstall dependencies
$ npm installConfigure your environment
$ cp .env.example .envSet your DATABASE_URL and auth secrets
Set up the database
$ npx prisma generate && npx prisma migrate deployStart building
$ npm run devTurbopack dev server at http://localhost:3000