Thriving Thriving TypeScript TS
↑ 35 ?
Monolith Ekoda/Monolith

A starting point for rapid web development - a full-stack monolith using Next.js, Prisma, and SQLite.

HEALTH ? 80 / Healthy
// solo builder// hidden gem fullstackfullstack-developmentmonolithmonoreponextjsrapid-developmentsqlitetemplatetypescript ?

// readme

Monolith

A full-stack starter for shipping an idea as a single app: Next.js (pages router) for the frontend and API, PostgreSQL + Prisma for data, NextAuth for sign-in, and MUI with a token-driven theme for the UI. Frontend, backend and database schema live in one repository and deploy as one unit.

Stack: Next.js · React · TypeScript · Prisma · PostgreSQL · NextAuth · MUI · Jest

Quick start

You need Node 20+ and Docker (for the local database).

bash setup.sh
npm run dev

setup.sh installs dependencies, writes .env.local, starts Postgres in Docker, runs the migrations and asks for your Google OAuth keys (you can skip those). Then open http://localhost:3000.

  1. npm install
  2. Create .env.local:
    DATABASE_URL=postgresql://monolith:monolith@localhost:5432/monolith
    NEXTAUTH_URL=http://localhost:3000
    NEXTAUTH_SECRET=   # openssl rand -base64 32
    GOOGLE_ID=
    GOOGLE_SECRET=
    
  3. npm run db:up to start Postgres, then npm run migrate:dev to apply the migrations.
  4. npm run dev

Google sign-in

The app runs without it: every page is public unless it asks for a signed-in user. To turn…