Monorepo for the Sprytno web: a Next.js frontend (apps/front) connected to a local Supabase stack for data and authentication, powered by Turborepo and pnpm.
- Next.js App Router (
apps/front) - React, Tailwind CSS 4, HeroUI
- Supabase (Postgres, Auth) via local CLI
- Turborepo for task orchestration
- pnpm as the package manager
apps/front– main Next.js applicationsrc/app– app router pages and layoutssrc/components– shared UI componentssrc/actions– server actions (auth, tasks, participations, users)src/hooks– React hooks for data fetching and statesrc/lib– parsers, repositories, utils, validationsrc/providers– React providers (theme, query client, etc.)src/types– shared TypeScript types
supabase– local Supabase projectconfig.toml– Supabase local configurationschemas/*.sql– database schema and functionsmigrations/*.sql– generated migration filesseed.sql– seed data for local development
- Node.js >= 18
pnpm(seepackageManagerinpackage.json)supabaseCLI installed and authenticated
Also you have to set the follow env variables:
SUPABASE_AUTH_EXTERNAL_GOOGLE_CLIENT_ID- Google Auth Client IDSUPABASE_AUTH_EXTERNAL_GOOGLE_SECRET- Google Auth Secret
For apps/front:
NEXT_APP_URL- example http://localhost:3000NEXT_PUBLIC_SUPABASE_URL- example http://localhost:54321NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY- Supabase public keyGOOGLE_MAPS_API_KEY- Google Maps API KeyGOOGLE_MAPS_MAP_ID- Google Maps Map ID
The Google's credentials you can find in your Google Console. The Supabase's credentials you can find in your Supabase Dashboard.
From the repo root:
pnpm installpnpm dev:frontThis command will start Supabase (if not already running) and then run front#dev via Turborepo.
- Open the app in your browser:
- Frontend: http://localhost:3000
- Supabase Studio: http://localhost:54323
- Database schemas are defined under
supabase/schemas/*.sql. - Migrations live under
supabase/migrations/*.sqland are managed by the Supabase CLI. - Seed data for local development is in
supabase/seed.sql.
To create migration:
supabase stop
supabase db diff -f MIGRATION_FILE_NAMETo reset the local database and apply all migrations:
supabase start
supabase db reset