An open API service indexing awesome lists of open source software.

https://github.com/maty-millien/boilerplate-next.js

A modern starter template for full-stack applications with Next.js 15, Google authentication, PostgreSQL (via Prisma), and a complete UI component library based on shadcn/ui. Pre-configured for rapid development with authentication, database integration, theming, and accessible UI.
https://github.com/maty-millien/boilerplate-next.js

auth boilerplate dark-mode fullstack google-oauth nextjs nextjs-app-router postgresql prisma react shadcn-ui starter-template tailwind-css typescript ui-components

Last synced: 5 months ago
JSON representation

A modern starter template for full-stack applications with Next.js 15, Google authentication, PostgreSQL (via Prisma), and a complete UI component library based on shadcn/ui. Pre-configured for rapid development with authentication, database integration, theming, and accessible UI.

Awesome Lists containing this project

README

          

# ⚡ Boilerplate Next.js

[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
[![Next.js](https://img.shields.io/badge/Next.js-15-black?logo=next.js)](#)
[![PostgreSQL](https://img.shields.io/badge/PostgreSQL-14-blue?logo=postgresql)](#)
[![Tailwind CSS](https://img.shields.io/badge/TailwindCSS-3.3-blue?logo=tailwind-css)](#)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.1-blue?logo=typescript)](#)
[![Prisma](https://img.shields.io/badge/Prisma-v4-blue?logo=prisma)](#)
[![Bun](https://img.shields.io/badge/Bun-0.6-black?logo=bun)](#)
[![Node.js](https://img.shields.io/badge/Node.js-20-green?logo=node.js)](#)
[![Build](https://img.shields.io/badge/build-passing-brightgreen)](#)

A modern starter template for full-stack applications with **Next.js 15**, Google authentication, PostgreSQL (via Prisma), and a complete UI component library based on **shadcn/ui**. Pre-configured for rapid development with authentication, database integration, theming, and accessible UI.

## ✨ Features

- ⚡ **Next.js 15** with App Router
- 🔐 **Google Authentication** via better-auth
- 🗄️ **PostgreSQL Database** using Prisma ORM
- 🖌️ **Prebuilt UI Components** using shadcn/ui and Tailwind CSS
- 🌗 **Light/Dark Theme Toggle** with state persistence
- 🔔 **Toast Notifications**

## 🚀 Usage

Run the setup script via curl to scaffold a new project. The script will prompt you for the app name interactively (you don't need to pass it on the command line):

```bash
curl -sSL https://raw.githubusercontent.com/maty-millien/boilerplate/main/setup.sh | sh
```

When you run the script it will:

- Download the latest boilerplate from GitHub
- Prompt you for an app name and copy the boilerplate into a folder with that name
- Replace all instances of `"boilerplate"` with your app name
- Initialize a new Git repository
- Install dependencies with **bun**

After setup, enter your new project directory and follow the next steps.

## 🛠️ Getting Started

### 1. Install dependencies

```bash
bun install
```

### 2. Configure environment variables

Create a `.env` file in the root:

```env
DATABASE_URL=postgresql://USER:PASSWORD@HOST:PORT/DATABASE
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
```

### 3. Set up the database

```bash
npx prisma migrate deploy
```

## 📝 Scripts

- `bun run dev` – Start development server
- `bun run build` – Build for production
- `bun start` – Run production server

## 💻 Tech Stack

- **Frontend:** Next.js 15, React 19, Tailwind CSS, shadcn/ui
- **Backend:** Prisma ORM, PostgreSQL
- **Auth:** Google OAuth (better-auth)

## 🎨 Theming

- Light/dark mode toggle
- Theme state persisted across sessions

## 🔑 Authentication

- Sign in with Google