Styler is a modern salon management dashboard focused on a clean, mobile-first UX. It provides appointment insights, customer and staff management, payments, and analytics scaffolding, with secure auth and a scalable data model.
- Appointments overview and quick navigation
- Customers and staff sections
- Payments and Analytics (scaffolded)
- Google Sign-In with NextAuth (Prisma Adapter)
- Mobile-optimized layout and KPIs
- Next.js 15 (App Router, Turbopack), React 19, TypeScript
- Tailwind CSS v4, Radix UI, Lucide icons
- Firebase (client auth) and Firebase Admin (server)
- NextAuth with Prisma Adapter
- Prisma (PostgreSQL)
app/— routes and pages (e.g.,app/login/page.tsx,app/(app)/onboarding/page.tsx)components/— shared UI (e.g.,components/ui/button.tsx)lib/— core services (firebase.ts,firebaseAdmin.ts,auth.ts,db.ts)prisma/— schemas and migrationsscripts/— prisma build helpers
- Node.js 18+
- PostgreSQL database
- Firebase project (Web app + OAuth with Google)
- Google Cloud Service Account (for Admin SDK)
Create a .env.local with:
-
Client Firebase
NEXT_PUBLIC_FIREBASE_API_KEYNEXT_PUBLIC_FIREBASE_AUTH_DOMAINNEXT_PUBLIC_FIREBASE_PROJECT_IDNEXT_PUBLIC_FIREBASE_APP_IDNEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID(optional)NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET(optional)NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID(optional)
-
NextAuth
NEXTAUTH_URL=http://localhost:3000NEXTAUTH_SECRET=your-strong-secretGOOGLE_CLIENT_ID=...GOOGLE_CLIENT_SECRET=...
-
Database
DATABASE_URL=postgresql://USER:PASSWORD@HOST:PORT/DB?schema=public
-
Firebase Admin (Application Default Credentials)
GOOGLE_APPLICATION_CREDENTIALS_PATH=/absolute/path/to/service-account.json- Note: Prefer platform secret managers; do not commit JSON secrets.
Install dependencies:
npm installGenerate Prisma client and run dev migrations:
npm run prisma:generate
npm run prisma:migrateRun the dev server:
npm run dev
# http://localhost:3000- Secrets are ignored via
.gitignore(e.g.,styler-1d75b-firebase-adminsdk.json). - If a secret was committed, rotate it and rewrite history (e.g.,
git filter-repo).
- Vercel recommended. Configure all env vars (Database, NextAuth, Firebase, Admin credentials) in the platform.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.