4 Commits
Author SHA1 Message Date
Moheeb Zara 5047aef0da ci: run DB-backed integration + Playwright e2e with a Supabase service
Adds an integration-e2e job to ci.yml alongside the fast hermetic check job. It
brings up the Supabase CLI stack, applies the canonical scripts/schema.sql +
seed.sql, then runs the integration suite (psql-driven shipped-SQL: RPCs / RLS /
triggers / constraints) and the Playwright e2e suite (chromium) against the app
wired to that stack (env sourced from `supabase status`).

The integration suite self-skips when no DB is reachable, so a missing DB could
pass silently. Two guards prevent that: an explicit `select 1` reachability
check, and a post-run assertion that fails the job when the suite executed 0
tests (parsed from the vitest json reporter).

Auto-seed is disabled for the ephemeral CI checkout (seed.sql needs tables that
schema.sql creates outside the migration path); schema + seed are applied
explicitly. Local dev is unaffected.

Validated locally: integration suite (58 tests) and both e2e specs (53 tests,
chromium) pass against the real local stack.
2026-08-04 22:53:48 -07:00
Moheeb ZaraandClaude Opus 4.8 f571001ac2 ci: add a checks-only workflow (typecheck + lint + unit tests)
Runs on every PR and on main after merge, fully separate from deploy.yml so it
can never affect deploys. Catches type/lint/test regressions that previously
had no CI at all. Integration + e2e (which need a DB service) are a follow-up.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-08-02 04:10:57 -07:00
Moheeb Zara 8ad1ca44b7 feat: open-source release prep, audit fixes, and deploy hardening
Production deploy completed (DigitalOcean Droplet, self-hosted Supabase,
Caddy + Let's Encrypt, GitHub Actions auto-deploy on push to main, daily
pg_dumpall backups). This commit lands the work that came out of the
deep audit pass and the open-source release prep.

Audit fixes:
- Webhook signing secret is now displayed in the settings UI with
  show/hide and copy-to-clipboard; the broken external docs.hackerspace.sh
  link is replaced with a link to the new local docs.
- Settings updateSpaceSettings parameter type now includes
  mission_statement so the field persists.
- members page enforces member_directory_visibility for non-admin viewers
  (admin_only, board_visible, members_visible).
- Mobile responsiveness pass: Projects Kanban grid, Members + Payments
  tables (column hiding on small screens), Proposal tally + voting
  buttons (2-col on mobile).

Open-source release scaffolding:
- LICENSE (MIT).
- CONTRIBUTING.md with dev setup, conventions, PR flow.
- SECURITY.md with disclosure policy.
- CHANGELOG.md.
- docs/WEBHOOKS.md with Node and Python signature verification examples.
- README.md rewritten for an open-source audience.

Removed v0/Vercel references:
- @vercel/analytics dependency removed.
- app/layout.tsx no longer imports Analytics, drops generator: 'v0.app'.
- Canonical deployment docs (docs/DEPLOYMENT.md, docs/README.md,
  docs/ARCHITECTURE.md, DATABASE.md, CLAUDE.md, README.md) now describe
  the self-hosted Droplet target only.
- e2e console-error check no longer filters [v0] noise.

Landing page:
- GitHub icon link to the public repo in the nav and footer.
2026-05-14 16:28:16 -07:00
Moheeb Zara b8cd36abc3 ci: GitHub Actions auto-deploy to production droplet on push to main
Workflow SSHes into the production droplet as `deploy` and runs
`/opt/hackerspace-ops/deploy.sh` which:
  - git fetches and resets to origin/main
  - rebuilds the app image with NEXT_PUBLIC_* baked in from .env.local
  - applies any new scripts/0NN_*.sql migrations not in the
    public._migrations_applied tracking table
  - hot-swaps the app container with `docker compose up -d --no-deps app`
  - prunes dangling images

Repo secrets DROPLET_HOST and DEPLOY_SSH_PRIVATE_KEY are configured.

Concurrency group `deploy-prod` with cancel-in-progress=false so two
pushes in quick succession queue rather than racing.

Also gitignores `secrets/` and `*.pem` so production credentials never
get committed.
2026-05-14 15:41:33 -07:00