Loading repository data…
Loading repository data…
MrSaikatS / repository
A production-ready Next.js starter template for fullstack development with modern tooling and best practices out of the box. Built with TypeScript, Tailwind CSS v4, Next.js App Router, and complete database integration with Prisma and SQLite.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
A production-ready Next.js starter template for fullstack development with modern tooling and best practices out of the box. Built with TypeScript, Tailwind CSS v4, Next.js App Router, and complete database integration with Prisma and SQLite.
typedRoutes for better development experiencenext-themesclsx, tailwind-merge, and class-variance-authority for component stylingtw-animate-css for Tailwind CSS animations@base-ui/react primitives (not Radix) — unstyled, accessible headless componentssharp@generated/prisma/clientprisma.config.ts, not in schema.prismaNote: This project uses Next.js 16.2.7 with React 19.2.7, featuring stable Turbopack (2-5× faster builds), React Compiler for optimal development experience, complete database integration with Prisma and SQLite, and toast notifications with react-toastify for fullstack development.
Clone the repository:
git clone https://github.com/MrSaikatS/nextjs-starter-fullstack-node.git
cd nextjs-starter-fullstack-node
Set up environment variables:
cp .env.example .env
The default configuration uses SQLite with a local database file. You can modify the DATABASE_URL in .env if needed.
Install dependencies (using Bun is recommended for faster installation):
# Using Bun (recommended)
bun install
# Or using npm
npm install
Set up the database:
# Using Bun
bun migrate
# Or using npm
npm run migrate
This command will create the database schema and generate the Prisma client.
Start the development server:
# Using Bun (recommended for faster development)
bun dev
# Or using npm
npm run dev
Open http://localhost:3000 with your browser to see the result.
.env.example to .env and configure your database URLbun migrate to create the database schema and generate the Prisma clientbun dev for the fastest development experience with Turbopackbun studio to open Prisma Studio for visual database inspection (headless — copy the printed URL into your browser)bun lint before committing changesbun dev - Start the development server with Turbopack (2-5× faster builds, up to 10× faster Fast Refresh)bun build - Build for production with Prisma client generation and Turbopackbun start - Start production server (for production deployment)bun lint - Run ESLintbun prod - Test production locally (lint, build with Prisma generation, and start production server)bun migrate - Run Prisma migrations and generate clientbun studio - Open Prisma Studio for database management (headless — copy the printed URL into your browser)npm run dev - Start the development server with Turbopacknpm run build - Build for production with Prisma client generation and Turbopacknpm start - Start production server (for production deployment)npm run lint - Run ESLintnpm run prod - Test production locally (lint, build with Prisma generation, and start production server)npm run migrate - Run Prisma migrations and generate clientnpm run studio - Open Prisma Studio for database management (headless — copy the printed URL into your browser)src/
├── app/
│ ├── globals.css # Global styles with Tailwind CSS v4
│ ├── layout.tsx # Root layout with ThemeProvider and Header
│ └── page.tsx # Home page with main content
├── components/
│ ├── Buttons/
│ │ ├── ThemeToggleButton.tsx # Dark/light mode toggle
│ │ └── ToastButton.tsx # Toast notification demo button
│ ├── Header/
│ │ └── Header.tsx # Navigation header
│ ├── Providers/
│ │ ├── ThemeProvider.tsx # Theme configuration (next-themes)
│ │ └── ToastProvider.tsx # Toast notifications provider (react-toastify)
│ └── shadcnui/ # shadcn/ui components (Base UI primitives)
│ └── button.tsx # Button component (wraps @base-ui/react/button)
├── hooks/ # Reserved for custom React hooks
├── server/ # Reserved for server-only modules (server actions, "server-only")
├── lib/
│ ├── database/
│ │ └── dbClient.ts # Singleton Prisma client with libsql adapter
│ ├── env/ # Environment configuration
│ │ ├── clientEnv.ts # Client-side environment variables
│ │ └── serverEnv.ts # Server-side environment variables with Zod validation
│ ├── fonts.ts # Font configuration (Geist Sans)
│ └── utils.ts # Utility functions (cn helper)
prisma/
├── schema.prisma # Database schema definition (no datasource.url — see prisma.config.ts)
└── dev.db # SQLite database file (created after migration)
prisma.config.ts # Prisma 7 config — holds DATABASE_URL via env("DATABASE_URL")
.env.example # Environment variables template (committed)
.env # Local environment variables (gitignored)
generated/ # Generated Prisma client (gitignored) — @generated/prisma/client
This project uses Prisma 7 with SQLite for type-safe database operations:
prisma-client (not prisma-client-js) — outputs to generated/prismaprisma.config.ts via env("DATABASE_URL"); schema.prisma has no datasource.url lineprisma/migrations/@generated/prisma/client)bun studio — headless, copy the printed URL into your browser)generated/prisma/client directory (gitignored — do not hand-edit)The project uses a structured approach to environment variables:
.env.example: Template for required environment variables (committed).env: Local environment variables (gitignored)src/lib/env/clientEnv.ts: Client-side environment variables with type safetysrc/lib/env/serverEnv.ts: Server-side environment variables with Zod validation (e.g. DATABASE_URL must start with file:./)src/lib/database/dbClient.ts: Singleton Prisma client instance with libsql adapter# Create and run migrations
bun migrate # or npm run migrate
# Generate Prisma client (also run automatically by `migrate`, `build`, and `prod`)
prisma generate
# Open Prisma Studio for database management (headless — open the printed URL)
bun studio # or npm run studio
The current prisma/schema.prisma ships with just the generator and datasource db { provider = "sqlite" } — the DATABASE_URL is provided by prisma.config.ts (via env("DATABASE_URL")), not in schema.prisma. To define your database models:
prisma/schema.prisma to add your modelsbun migrate to create a new migration and regenerate the Prisma clientgenerated/prisma/client (gitignored)@generated/prisma/client in src/lib/database/dbClient.ts for type-safe database accessThis project uses next-themes for theme management with Tailwind CSS v4's modern theming system:
The theming system supports both light and dark modes with smooth transitions and is fully accessible.
This starter is pre-configured for shadcn/ui components:
@base-ui/react (not Radix or react-aria) — unstyled, accessible headless components@/components/shadcnui)prisma.config.ts@base-ui/react primitivesnext.config.ts@/* → ./src/*, @generated/* → ./generated/*@/components/shadcnui)prisma.config.tsgenerated/prisma/client (gitignored; do not hand-edit).env.example)The project uses a structured approach to environment configuration. Copy .env.example to .env and adjust as needed.
# Database (SQLite) — must start with "file:./"
DATABASE_URL=file:./prisma/dev.db
# Disable Prisma telemetry
CHECKPOINT_DISABLE=1