LanternlyDocs

Help

Contributing

Bug reports, fixes, docs and new plugins are all welcome. For anything bigger than a small fix, open an issue first so we can agree on the approach.

Local setup

git clone https://github.com/thiyagarajanshankar13/lanternly.git
cd lanternly
cp .env.example .env.local   # DEPLOYER_SECRET_KEY, DEPLOYER_SETUP_TOKEN, DEPLOYER_FAKE_ENGINE=1
npm install
npm run dev                  # http://localhost:3100/admin

Before you send a pull request

npm run typecheck
npm test
npx next build
  • Add or change tests with the code. Tests live in tests/, a plugin's in tests/plugins/<id>/.
  • tests/contract.test.ts snapshots every clubctl call and the settings sent with it. A changed snapshot changes what live servers receive: update it only on purpose (npx vitest run -u), with the matching change to agent/clubctl, and say so in the pull request.
  • Every server action and admin API route must call an access check (requireOwner, requireSite and friends in src/lib/guards.ts). tests/access.test.ts fails otherwise.
  • Database changes are a new entry at the end of MIGRATIONS in src/lib/db.ts. Never edit an existing one.
  • Keep on-screen text plain and short. A screenshot helps for changes to how a page looks.

Repo map

PathWhat's there
src/app/admin/The console's pages and server actions
src/lib/Operations queue, SSH runner, access rules, backups, monitoring, Postgres, apps
src/plugins/Plugin registry and the AWS plugin
agent/clubctl, its SSH wrapper, the services VM setup and Compose files
deploy/Deployer VM setup and its Compose file
scripts/backup-tool.mjs, export-core.mjs
.github/workflows/CI, app builds, Set up a VM, Deploy the deployer

Sign your commits

We use the Developer Certificate of Origin instead of a CLA. Add a Signed-off-by line to each commit:

git commit -s -m "Fix the backup retry"

By contributing you agree your work is released under the GNU AGPL v3.

Improving these docs

The docs are plain HTML on the gh-pages branch. Each page's text is a fragment in docs-src/pages/; the menu, search index and page frame are added by a small script with no dependencies:

git checkout gh-pages
# edit docs-src/pages/<page>.html
node docs-src/build.mjs
# open docs/index.html in a browser, then commit docs-src/ and docs/

Every page has an Edit this page on GitHub link at the bottom.

Edit this page on GitHub