- TypeScript 94.7%
- JavaScript 2%
- CSS 1.8%
- Shell 0.5%
- Go Template 0.4%
- Other 0.6%
|
|
||
|---|---|---|
| .changeset | ||
| .cspell | ||
| .forgejo/workflows | ||
| apps | ||
| celilo | ||
| deploy | ||
| designs | ||
| docs | ||
| e2e | ||
| openspec | ||
| packages | ||
| plans | ||
| public | ||
| scripts | ||
| tests | ||
| .envrc | ||
| .gitignore | ||
| .mise.toml | ||
| .prettierignore | ||
| .prettierrc | ||
| AUTHENTIK_CONDUCTOR_INTEGRATION.md | ||
| bun.lock | ||
| CHANGELOG.md | ||
| CLAUDE.md | ||
| components.json | ||
| ecosystem.config.js | ||
| env-example | ||
| eslint.config.js | ||
| eslint.config.mjs | ||
| KNOWN_TEST_FAILURES.md | ||
| manifest.yml | ||
| mise.toml | ||
| nx.json | ||
| package.json | ||
| playwright.config.ts | ||
| README.md | ||
| tsconfig.base.json | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vitest.config.ts | ||
LunaCycle
Family task management with lunar rhythm integration. Deploys as a Bun API server with a React frontend, served through Caddy, authenticated via Authentik OIDC.
Development
bun install
bun run dev # web + server in parallel
bun run test:unit # unit tests
Building a Release Package (.netapp)
LunaCycle is deployed via Celilo as a .netapp module package.
bun run netapp
This runs celilo package . --output lunacycle.netapp, which:
- Stages source via
bun pm pack(respecting thefilesfield inpackage.json) - Runs the full build:
bun install && bun run build - Packages artifacts + Celilo module files into
lunacycle.netapp
When to rebuild: Any time you change server code, client code, Ansible roles, or Celilo hook scripts.
You do NOT need to rebuild the standard module netapps (namecheap, greenwave, iptables, caddy, authentik) — those are managed by the infra repo and baked into the @celilo/e2e Docker image.
E2E Deployment Tests
Tests run in a simulated Docker network (DNS, firewalls, ACME server, target machines) provided by @celilo/e2e.
Prerequisites
- Colima running:
colima start - Docker images built (once per machine, or after infra changes):
cele2e build
This packages the standard Celilo modules and bakes them into the management Docker image. Only needed again if you update @celilo/e2e or the infra repo's standard modules.
Running Tests
Fresh run (builds full network from scratch, ~10 min):
bun run netapp
cele2e run --keep deploy
Fast iteration (reuses existing network, ~2-3 min):
bun run netapp
cele2e run --keep --reuse deploy
Check if a reusable network exists:
cele2e status
Tear down when done:
cele2e down
What the deploy test covers
- Build —
lunacycle.netappexists (fail fast if you forgotbun run netapp) - Prerequisites — deploys the full supporting stack into the simulated network:
- namecheap (DNS registrar)
- greenwave + iptables (firewalls)
- caddy (reverse proxy / TLS)
- authentik (identity provider)
- Lunacycle deployment — Ansible installs binary + systemd service
- Infrastructure checks — binary present, service running, Caddy routes registered, static assets uploaded
- Authentication flow — full PKCE login:
config.jshas resolved URLs (catches$self:primary_domainregressions)- Authentik has the
lunacycle-webOIDC client registered - Test user
lunacycle_adminexists - Complete authorization code → token exchange → protected API call
Default test credentials
| Field | Value |
|---|---|
| Username | lunacycle_admin |
| Password | lunacycle-rules |
| Domain | iamtheinternet.org (simulated) |
| Caddy | https://www.iamtheinternet.org |
| Authentik | https://auth.iamtheinternet.org |
These are e2e-only test credentials — not used in production.
Updating the standard module images
If you change something in the infra repo's standard modules (caddy, authentik, etc.) and need to test it:
cd ~/hobby/infra/packages/e2e
cele2e build # rebuilds all images with updated netapps
Or publish a new @celilo/e2e version from infra and pnpm install here.
Celilo Module Structure
manifest.yml — Celilo module manifest
celilo/
scripts/
setup-web.ts — on_install: registers Caddy routes, uploads assets, registers OIDC client
health-check.ts — health_check: SSH checks on the deployed container
backup.ts — on_backup: database backup
restore.ts — on_restore: database restore
terraform/
main.tf.tpl — LXC container definition
outputs.tf.tpl — Terraform outputs
ansible/
playbook.yml.tpl — Ansible playbook
roles/lunacycle/ — Server install + migration roles
e2e/
tests/deploy.test.ts — Deployment + auth integration tests
Production Deployment
Deployed and managed via Celilo on the home lab. See the infra repo for architecture details.
# On the ops machine:
celilo module deploy lunacycle