A PoC for local-first replicated tree synchronization using PowerSync and Supabase.
- Framework: Next.js 15
- Authentication: Supabase
- Sync Engine: PowerSync
- Database: Supabase (& PowerSync buckets for download)
- Styling: TailwindCSS
- State Management: MobX
- Install dependencies:
pnpm install
- Set up environment variables:
cp .env.example .env.local
-
Fill in the environment variables in
.env.local
: -
Run the development server:
pnpm watch
src/app
: Next.js app router pagessrc/components
: Reusable React componentssrc/library
: Core business logicauth
: Authentication servicespowersync
: Database and sync functionality
src/stores
: MobX state management
pnpm watch
: Start development serverpnpm build
: Production buildpnpm start
: Run production serverpnpm lint
: Run linting
src/
├── app/ # Next.js pages
├── components/
│ ├── Header.tsx # Main navigation
│ ├── TreeView/ # Tree visualization
│ └── providers/ # React context providers
├── library/
│ ├── auth/ # Authentication logic
│ └── powersync/ # Sync handling
└── stores/ # MobX state management