Skip to content

Codebase

Learn about the codebase here.

We’d recommend looking at all of our issues and picking some you’d like to work on. The ones with good first issue and help wanted tags are good for getting started.

Feel free to ask questions on the Discord if you have problems with anything.

Codebase

Stack

  • Codebase
    • Node.js 22
    • Turborepo
    • pnpm
    • Prettier, ESLint, CSpell
  • Desktop app
    • Electron
    • Frontend - Fabric.js, React
    • State - Zustand, Tanstack Query
    • Database - SQLite, Drizzle ORM
    • Testing - Vitest, Playwright
  • Websites
    • Astro, React
  • Design system
    • React, Tailwind, Radix

Installing

  1. Download & install Node.js 22 (LTS) (also make sure to have pnpm)
  2. Clone/fork the repo (https://github.com/OpenMarch/OpenMarch)
  3. Install dependencies: pnpm install
    • Note there are some known issues developing on Ubuntu. Please reach out to us on Discord and help us complete this guide :)

Monorepo

Structure

This is the structure of our monorepo.

.
├── apps/
│ ├── desktop - The main desktop app
│ └── website - Our website (and the one you're looking at right now)
├── packages/
│ ├── core - Utilities and tools for the codebase
│ ├── ui - Our design system & playground
│ └── * - A handful of other packages we use for various utilities
└── package.json

Tasks

Tasks are our main commands in the codebase.

Terminal window
# Install packages
pnpm install
# Prepare electron app (this only needs to be run after test:prepare)
pnpm desktop app:prepare
# Run the desktop app dev server
pnpm desktop dev
# Run the website's astro dev server
pnpm site dev
# Run the design system playground
pnpm ui dev

Utilities

Terminal window
# Fix
pnpm fix
# or individually:
pnpm format
pnpm lint
pnpm spellcheck
# can also run tasks in specific packages
pnpm desktop lint

Testing

Terminal window
# Run all unit tests in the monorepo
pnpm test
# Test a specific file in the desktop app
cd apps/desktop
pnpm exec vitest path/to/the/file.test.ts
# Run end-to-end tests in the desktop app
cd apps/desktop
pnpm run e2e
# Generate more e2e test code
# See apps/desktop/e2e/README.md for more information
cd apps/desktop
pnpm run e2e:codegen