Skip to content

guyboireau/fullstack-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

36 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Fullstack Starter Dashboard

⚑ Fullstack Starter

Production-ready fullstack starter β€” React + NestJS + Supabase + PostgreSQL + Auth + CRUD. TypeScript everywhere.

React NestJS TypeScript Supabase PostgreSQL Docker MIT License


πŸš€ Getting Started

# 1. Clone the repo
git clone https://github.com/guyboireau/fullstack-starter.git && cd fullstack-starter

# 2. Install all dependencies
npm install

# 3. Configure environment variables
cp .env.example .env   # Then fill in your Supabase credentials

# 4. Start the dev servers
npm run dev

Frontend β†’ http://localhost:5173 Β |Β  API β†’ http://localhost:3000


πŸ—οΈ Architecture

fullstack-starter/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ web/          β†’ React 19 + Vite 6 + React Router 7
β”‚   └── api/          β†’ NestJS 11 (REST API)
β”œβ”€β”€ supabase/
β”‚   β”œβ”€β”€ migrations/   β†’ SQL migrations (profiles, items)
β”‚   └── seed.sql      β†’ Sample data
β”œβ”€β”€ docker-compose.yml
└── .github/workflows/ci.yml

How it works: The React frontend authenticates users via Supabase Auth (email/password). Authenticated requests hit the NestJS API, which validates JWTs using a custom SupabaseAuthGuard. All database operations go through Supabase's client library with Row Level Security (RLS) β€” each user can only access their own data. The API uses a user-scoped Supabase client that respects RLS policies automatically.


✨ Features

Feature Details
πŸ” Authentication Login, Register, Logout via Supabase Auth
πŸ“ CRUD Full Create, Read, Update, Delete on Items
πŸ›‘οΈ Auth Guard NestJS guard validates Supabase JWTs
πŸ”’ Row Level Security PostgreSQL RLS β€” users only see their own data
🎨 Modern UI Dark mode, glassmorphism, gradient accents
πŸ“Š Dashboard Stats overview + item management
βœ… Validation DTOs with class-validator on the API
🐳 Docker Compose One-command local dev environment
πŸ”„ CI/CD GitHub Actions: lint + typecheck on every PR
πŸ“¦ Monorepo npm workspaces β€” single npm install

πŸ—„οΈ Database Schema

profiles

Column Type Description
id UUID (PK) References auth.users
email TEXT User email
full_name TEXT Display name
avatar_url TEXT Profile picture URL
created_at TIMESTAMPTZ Auto-set

items

Column Type Description
id UUID (PK) Auto-generated
user_id UUID (FK) Owner reference
title TEXT Item title
description TEXT Optional details
status TEXT todo | in_progress | done
created_at TIMESTAMPTZ Auto-set

πŸ”‘ API Endpoints

All endpoints under auth require a Bearer token in the Authorization header.

Method Endpoint Auth Description
GET /auth/profile βœ… Current user profile
GET /users/me βœ… User profile from DB
GET /items βœ… List all items
GET /items/:id βœ… Get single item
POST /items βœ… Create item
PATCH /items/:id βœ… Update item
DELETE /items/:id βœ… Delete item

☁️ Deploy

Frontend β†’ Vercel

  1. Import the apps/web directory on Vercel
  2. Set the Root Directory to apps/web
  3. Add environment variables: VITE_SUPABASE_URL, VITE_SUPABASE_ANON_KEY
  4. Deploy πŸš€

Backend β†’ Railway / Render

  1. Create a new service on Railway or Render
  2. Set the Root Directory to apps/api
  3. Build command: npm run build
  4. Start command: node dist/main
  5. Add environment variables from .env.example

🧰 Supabase Setup

  1. Create a new project at app.supabase.com
  2. Go to SQL Editor and run the migration files in order:
    • supabase/migrations/00001_create_profiles.sql
    • supabase/migrations/00002_create_items.sql
  3. Copy your project URL + anon key from Settings β†’ API
  4. Paste them in your .env file

🐳 Docker (optional)

# Start all services (PostgreSQL + API + Web)
docker compose up -d

# View logs
docker compose logs -f

# Stop everything
docker compose down

πŸ† Built with this stack

This isn't a tutorial copy-paste β€” it's the production stack I use for real client projects:


πŸ“„ License

MIT β€” use it, fork it, build with it.

About

πŸš€ Production-ready fullstack starter β€” React + NestJS + Supabase + PostgreSQL + Auth + CRUD. TypeScript everywhere.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors