Skip to main content

Project layout (high-level)

Code
.
├── convex/                    # Convex schema + functions
├── src/
│   ├── app/                   # Next.js app router
│   ├── components/
│   │   ├── editor/            # Editor + markdown preview
│   │   ├── shell/             # App shell: views, spotlight, graph, whiteboard
│   │   └── ui/                # shadcn/ui + Radix components
│   └── lib/                   # Store, sync logic, utilities
├── scripts/                   # Build scripts (Tauri helpers, etc)
├── components.json            # shadcn/ui config
└── package.json

Common scripts

  • npm run dev — run Next.js and Convex in parallel
  • npm run dev:next — run Next.js only
  • npm run dev:convex — run Convex dev only
  • npm run build — deploy Convex and build Next.js
  • npm run start — run production Next.js server
  • npm run lint — run ESLint
  • npm run tauri:dev — run Tauri dev + Convex dev
  • npm run tauri:build — build desktop app via Tauri
  • npm run build:tauri — custom Tauri build script
Use npm run dev:next if you’re iterating only on UI/server pages and not touching Convex schema/functions.

Working with Convex

  • Convex stores users, tabs (notes/whiteboards/mindmaps), workspaces, and sharing metadata.
  • Run the Convex local dev server with npx convex dev (or via npm run dev which does this for you).
  • When updating the Convex schema or functions, test locally with npx convex dev before deploying.

Authentication (WorkOS AuthKit)

  • WorkOS handles SSO/OAuth identity. Provide valid WorkOS credentials in .env.local.
  • The app uses WorkOS AuthKit for Next.js; follow the official WorkOS/AuthKit docs for provider-specific setup (SSO providers, redirect URIs, cookie/session secrets).

Desktop (Tauri)

  • Tauri support is optional. To develop desktop builds:
    • Install Rust and the Tauri toolchain.
    • Use npm run tauri:dev to run the desktop app against the local Convex dev server.
    • Use npm run tauri:build or npm run build:tauri to produce release artifacts.
  • Tauri mode supports local filesystem sync for .md, .canvas, and .mindmap files.

Sync & Offline notes

  • App state hydrates from Convex when authenticated.
  • Local edits can continue while offline; changes flush when connectivity returns.
  • In Tauri mode you can enable local folder sync to persist files on disk.

Linting & Formatting

  • ESLint is configured. Run:
bash
npm run lint
  • Follow the code style configured in eslint.config.mjs and tsconfig.json.

Testing & CI

  • There are no explicit test scripts in the repository root. Add unit or integration tests and CI jobs per your team standards.
  • Vercel configuration is available in vercel.json for deployment behaviour.

Deploy Checklist

  • Ensure Convex is deployed and the deployed URL is set in NEXT_PUBLIC_CONVEX_URL.
  • Add WorkOS credentials to your hosting provider’s environment variables.
  • Build the Next.js app and verify pages and shared-note viewers work in production.