Skip to main content

Clone Templates

Scaffold a full-stack app in seconds using built-in clone templates. No network required.

ɳSelf ships six full-stack clone templates embedded in the CLI binary. Each template gives you a working Postgres schema with RLS policies, Hasura metadata, seed data, and a Flutter UI starter, ready to run in under a minute.

No network access is required. Clone templates work on air-gapped machines and are free with every ɳSelf install.

Available templates

Template What it builds Required plugins
airbnb-clone Property rental marketplace with listings, bookings, and reviews auth, notify, photos
discord-clone Real-time messaging platform with servers, channels, and roles chat, realtime, auth, moderation
notion-clone Collaborative note-taking with workspaces, pages, and blocks cms, auth, realtime
slack-clone Team messaging with threads, reactions, and voice/video chat, livekit, realtime, auth, notify
substack-clone Newsletter platform with subscriber tiers and post publishing cms, notify, auth
zoom-clone Video meeting platform with lobby, recording, and participant management livekit, recording, auth, notify

Quick start

# 1. Scaffold the template
nself init --template airbnb-clone ./my-rentals

# 2. Install the required plugins
cd my-rentals
nself plugin install auth notify photos

# 3. Start the stack
nself start
nself db migrate
nself hasura metadata apply --file hasura/metadata.json

# 4. Open the Flutter app
cd flutter && flutter run

Scaffold flags

Flag Description
--no-seed Skip seed data. Only the schema (001_schema.sql) is applied.
--dry-run Print the files that would be written without writing them.
--force Overwrite the destination directory if it is not empty.
# Schema only, skip demo data
nself init --template notion-clone --no-seed ./my-notes

# Preview what would be written
nself init --template slack-clone --dry-run

# Overwrite an existing directory
nself init --template zoom-clone ./existing-dir --force

What gets scaffolded

Each template writes the following structure into the destination directory:

<dest>/
  migrations/
    001_schema.sql: CREATE TABLE np_* with RLS policies and indexes
    002_seed.sql, demo INSERT data (skipped with --no-seed)
  hasura/
    metadata.json, permissions and relationships for the Hasura console
  flutter/
    pubspec.yaml: Flutter package manifest
    lib/main.dart, starter app with GraphQL client and skeleton screens
  nself.yml, project config listing the required plugins
  .env.example, environment variable template
  README.md, getting started instructions

Listing templates

nself template list shows bundled templates first (no network), then marketplace templates:

nself template list
Bundled templates (6):
  airbnb-clone     v1.0.0  Property rental marketplace
  discord-clone    v1.0.0  Real-time messaging platform
  notion-clone     v1.0.0  Collaborative note-taking
  slack-clone      v1.0.0  Team messaging with voice/video
  substack-clone   v1.0.0  Newsletter platform
  zoom-clone       v1.0.0  Video meeting platform

Marketplace templates:
  ...

Template details

airbnb-clone

A property rental marketplace. Includes listing search, booking calendar, review system, and photo management.

Tables: np_listings, np_bookings, np_reviews Plugins: auth, notify, photos

nself init --template airbnb-clone ./my-rentals
cd my-rentals
nself plugin install auth notify photos
nself start
nself db migrate
nself hasura metadata apply --file hasura/metadata.json
cd flutter && flutter run

discord-clone

A real-time messaging platform with servers, text channels, roles, and member management.

Tables: np_servers, np_channels, np_messages, np_members, np_roles Plugins: chat, realtime, auth, moderation

nself init --template discord-clone ./my-discord
cd my-discord
nself plugin install chat realtime auth moderation
nself start
nself db migrate
nself hasura metadata apply --file hasura/metadata.json
cd flutter && flutter run

notion-clone

A block-based collaborative editor with workspaces, pages, and granular member access control.

Tables: np_workspaces, np_pages, np_blocks, np_page_members Plugins: cms, auth, realtime

nself init --template notion-clone ./my-notes
cd my-notes
nself plugin install cms auth realtime
nself start
nself db migrate
nself hasura metadata apply --file hasura/metadata.json
cd flutter && flutter run

slack-clone

A team messaging platform with channels, threads, reactions, voice/video via LiveKit, and notifications.

Tables: np_workspaces, np_channels, np_messages, np_threads, np_reactions Plugins: chat, livekit, realtime, auth, notify

nself init --template slack-clone ./my-slack
cd my-slack
nself plugin install chat livekit realtime auth notify
nself start
nself db migrate
nself hasura metadata apply --file hasura/metadata.json
cd flutter && flutter run

substack-clone

A newsletter platform with paid subscriber tiers, post publishing, and email delivery.

Tables: np_newsletters, np_posts, np_subscribers, np_tiers Plugins: cms, notify, auth

nself init --template substack-clone ./my-newsletter
cd my-newsletter
nself plugin install cms notify auth
nself start
nself db migrate
nself hasura metadata apply --file hasura/metadata.json
cd flutter && flutter run

zoom-clone

A video meeting platform with meeting lobby, participant management, video grid, and recording playback.

Tables: np_meetings, np_participants, np_recordings Plugins: livekit, recording, auth, notify

nself init --template zoom-clone ./my-meetings
cd my-meetings
nself plugin install livekit recording auth notify
nself start
nself db migrate
nself hasura metadata apply --file hasura/metadata.json
cd flutter && flutter run

Schema conventions

All clone template tables follow ɳSelf naming conventions:

  • Table prefix: np_ (ɳSelf project)
  • Every table has id UUID PRIMARY KEY DEFAULT gen_random_uuid()
  • Every table has created_at TIMESTAMPTZ DEFAULT now()
  • Row-level security is enabled on every table with appropriate policies
  • Foreign key relationships use ON DELETE CASCADE where appropriate

Applying migrations manually

If you prefer to apply migrations outside of the CLI:

# Apply schema only
psql $DATABASE_URL -f migrations/001_schema.sql

# Apply seed data
psql $DATABASE_URL -f migrations/002_seed.sql
  • nself init: Full init command reference including all flags
  • nself template list: Browse bundled and marketplace templates
  • Plugin management: Installing and managing plugins
  • Hasura setup: Configuring Hasura permissions