Files
marco/doc/dev/development.md
raucao 6ed067a973
CI / Lint (pull_request) Successful in 57s
CI / Test (pull_request) Canceled after 1m26s
Mention PWA installation and mark the kosmos deployment legacy
2026-11-29 16:40:23 +04:00

2.5 KiB

Development

How to collaborate on Marco, or just build and deploy it for yourself.

Scope: local setup, running, tests, linting, builds and deployment. For subsystem deep dives see the other documents in this directory, and for Nostr-related design notes see doc/nostr/.

Prerequisites

You will need the following things properly installed on your computer.

Installation

  • git clone https://gitea.kosmos.org/raucao/marco.git
  • cd marco
  • pnpm install

Running / Development

Code Generators

Make use of the many generators for code, try pnpm ember help generate for more details

Running Tests

  • pnpm test

Linting

  • pnpm lint
  • pnpm lint:fix

Building

  • pnpm vite build --mode development (development)
  • pnpm build (production)

App Icon

  • pnpm build:icons generates PNGs of all sizes from public/icons/icon.svg

To run the script, you need imagemagick and librsvg installed:

  • Arch Linux: pacman -S imagemagick librsvg
  • Ubuntu/Debian: apt install imagemagick librsvg2-bin

Deploying

Marco is deployed to two domains from two branches, both serving the committed release/ directory:

The branches differ only in .env.production (app origin + OSM OAuth client ID); everything else is identical. Prepare a release on master, then sync the kosmos branch and push both:

pnpm version patch        # bumps version, runs lint/tests, rebuilds release/
git push origin master && git push 5apps master

./scripts/sync-kosmos.sh  # merges master into kosmos and rebuilds release/
git push origin kosmos && git push 5apps-old kosmos:master

Both 5apps Deploy apps use release/ as their build directory.

  • Or deploy release/ to any static file host (ideally routing all 404s to index.html for launching with client-side routes to work)