Supasheet.

Self-Hosting Overview

Deploy Supasheet on your own infrastructure

Why Self-Host?

Self-hosting Supasheet gives you complete control:

  • Full Control — Own your data and infrastructure
  • Customisation — Modify the codebase to fit your domain
  • Privacy — Keep sensitive data inside your perimeter
  • Cost-Effective — No platform fees beyond Supabase and your hosting bill
  • Compliance — Easier path to regulatory requirements (SOC 2, HIPAA, etc.)

Tech Stack

LayerStack
AppReact 19.2 + Vite 7
RoutingTanStack Router (file-based, type-safe)
Data fetchingTanStack Query 5
FormsTanStack Form
TablesTanStack Table 8 + react-data-grid
StylingTailwind CSS 4
UIshadcn/ui (Base UI variant)
IconsLucide React
Rich textLexical
ChartsRecharts
Drag & dropdnd-kit
Tree view@headless-tree/react
BackendSupabase (Auth, Postgres, Storage, Edge Functions)
Build outputStatic SPA in dist/

Project Structure

supasheet/
├── src/
│   ├── routes/                 # TanStack Router file-based pages
│   │   ├── __root.tsx          # Root layout & context
│   │   ├── index.tsx           # Entry redirect
│   │   ├── init.tsx            # Multi-project init flow (localStorage credentials)
│   │   ├── auth/               # Sign-in, sign-up, MFA, password reset
│   │   ├── account/            # Profile, security, identities, roles & permissions
│   │   ├── core/               # Users, user_roles, role_permissions, audit_logs, notifications
│   │   ├── storage/            # File browser per bucket
│   │   └── $schema/            # Dynamic schema: resource, dashboard, chart, report, template, sql-editor
│   ├── components/             # Feature modules
│   │   ├── ui/                 # shadcn/ui primitives
│   │   ├── layouts/            # App shell, sidebar, header, notifications
│   │   ├── resource/           # CRUD: forms, cells, fields, detail, sheets, comments, audit, list/tree
│   │   ├── data-table/         # TanStack Table wrapper
│   │   ├── data-grid/          # react-data-grid wrapper
│   │   ├── chart/              # Recharts widgets (area, bar, line, pie, radar)
│   │   ├── dashboard/          # Dashboard widget renderers
│   │   ├── report/             # Report tables
│   │   ├── editor/             # Lexical rich-text editor
│   │   ├── template/           # Template selector & apply dialog
│   │   ├── storage/            # File browser, upload, rename
│   │   ├── users/              # Admin users UI
│   │   ├── user-roles/         # Role assignments
│   │   └── role-permissions/   # Permission matrix
│   ├── hooks/                  # Permissions, user, data-table, mobile, etc.
│   ├── lib/                    # Utilities + types
│   │   ├── supabase/           # Client + per-domain data functions
│   │   ├── database-meta.types.ts  # TableMetadata, ColumnMetadata, view types
│   │   └── database.types.ts   # GENERATED — supabase gen types
│   ├── integrations/           # TanStack Query provider/devtools
│   └── config/                 # Constants (METADATA_COLUMNS, filter operators, …)
├── supabase/
│   ├── migrations/             # Ordered SQL (meta, users, roles, audit, storage, notifications, templates, comments…)
│   ├── functions/              # Deno edge functions (admin-*)
│   └── examples/               # 12 reference domains (desk, crm, hr, finance, inventory, …)
└── public/                     # Static assets

Deployment Options

Supasheet builds to a static SPA — anywhere that can serve static files with SPA fallback works:

TargetNotes
VercelOne-click static site, env vars in dashboard
NetlifyBuilt-in SPA redirect support
Cloudflare PagesEdge-deployed, free tier generous
Render / Railway / FlyStatic or container deployment
Docker + nginxSelf-managed container or k8s
VPS + nginx / CaddyPlain npm run build and serve dist/
S3 + CloudFront / GCS + Cloud CDNStandard cloud static hosting

The Supabase backend (Auth, Postgres, Storage, Edge Functions) runs on Supabase Cloud or your self-hosted Supabase stack.

Prerequisites

  • Supabase project — cloud or self-hosted
  • Node.js 18+ — for building the SPA
  • Supabase CLInpm install -g supabase (used for migrations and type generation)
  • Git — to clone the repo

Quick Start

git clone https://github.com/supasheet/supasheet.git
cd supasheet

npm install

# 1. Environment
cp .env.example .env
# Edit .env with VITE_SUPABASE_URL + VITE_SUPABASE_PUBLISHABLE_KEY

# 2. (Optional) local Supabase
npx supabase start

# 3. Apply migrations
npx supabase db push                # cloud
# or
npx supabase db reset               # local — drops & re-applies

# 4. Regenerate types after schema changes
npx supabase gen types typescript --local \
  --schema public --schema supasheet \
  > src/lib/database.types.ts

# 5. Dev server
npm run dev

Available Scripts

npm run dev         # Start Vite dev server on port 3000
npm run build       # Production build → dist/
npm run preview     # Preview the production build locally
npm run typecheck   # tsc --noEmit
npm run lint        # ESLint
npm run format      # Prettier --check
npm run check       # Prettier --write + ESLint --fix
npm run test        # Vitest

npx supabase start  # Boot the local Supabase stack
npx supabase stop   # Tear it down

Next Steps

On this page