Clone Templates
هذا المحتوى غير متوفر بلغتك بعد.
Clone Templates
Section titled “Clone Templates”ɳ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
Section titled “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
Section titled “Quick start”# 1. Scaffold the templatenself init --template airbnb-clone ./my-rentals
# 2. Install the required pluginscd my-rentalsnself plugin install auth notify photos
# 3. Start the stacknself startnself db migratenself hasura metadata apply --file hasura/metadata.json
# 4. Open the Flutter appcd flutter && flutter runScaffold flags
Section titled “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 datanself init --template notion-clone --no-seed ./my-notes
# Preview what would be writtennself init --template slack-clone --dry-run
# Overwrite an existing directorynself init --template zoom-clone ./existing-dir --forceWhat gets scaffolded
Section titled “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 instructionsListing templates
Section titled “Listing templates”nself template list shows bundled templates first (no network), then marketplace templates:
nself template listBundled 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
Section titled “Template details”airbnb-clone
Section titled “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-rentalscd my-rentalsnself plugin install auth notify photosnself startnself db migratenself hasura metadata apply --file hasura/metadata.jsoncd flutter && flutter rundiscord-clone
Section titled “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-discordcd my-discordnself plugin install chat realtime auth moderationnself startnself db migratenself hasura metadata apply --file hasura/metadata.jsoncd flutter && flutter runnotion-clone
Section titled “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-notescd my-notesnself plugin install cms auth realtimenself startnself db migratenself hasura metadata apply --file hasura/metadata.jsoncd flutter && flutter runslack-clone
Section titled “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-slackcd my-slacknself plugin install chat livekit realtime auth notifynself startnself db migratenself hasura metadata apply --file hasura/metadata.jsoncd flutter && flutter runsubstack-clone
Section titled “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-newslettercd my-newsletternself plugin install cms notify authnself startnself db migratenself hasura metadata apply --file hasura/metadata.jsoncd flutter && flutter runzoom-clone
Section titled “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-meetingscd my-meetingsnself plugin install livekit recording auth notifynself startnself db migratenself hasura metadata apply --file hasura/metadata.jsoncd flutter && flutter runSchema conventions
Section titled “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 CASCADEwhere appropriate
Applying migrations manually
Section titled “Applying migrations manually”If you prefer to apply migrations outside of the CLI:
# Apply schema onlypsql $DATABASE_URL -f migrations/001_schema.sql
# Apply seed datapsql $DATABASE_URL -f migrations/002_seed.sqlRelated
Section titled “Related”- 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