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.gitcd marcopnpm install
Running / Development
pnpm start- Visit your app at http://localhost:4200.
- Visit your tests at http://localhost:4200/tests.
Code Generators
Make use of the many generators for code, try pnpm ember help generate for more details
Running Tests
pnpm test
Linting
pnpm lintpnpm lint:fix
Building
pnpm vite build --mode development(development)pnpm build(production)
App Icon
pnpm build:iconsgenerates PNGs of all sizes frompublic/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:
master→ https://marco.earth (git push 5apps master)kosmos→ https://marco.kosmos.org (git push 5apps-old kosmos:master), legacy and kept only for the existing deployment
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 toindex.htmlfor launching with client-side routes to work)