Files
hackerspace.sh/CHANGELOG.md
T
Moheeb Zara de51000584 feat: forum, polymorphic comments, custom tiers, multi-invite, secrets encryption
Big feature batch driven by the super-audit findings and the user's
follow-up requests.

Schema migration 021 (folded into schema.sql Section 13):
- forum_threads + polymorphic comments table keyed on (entity_type,
  entity_id). Entity types: forum_thread, proposal, incident, policy.
  Trigger maintains forum_threads.comment_count and last_comment_at.
- space_tiers per-space with monthly_price_cents, billing_cadence,
  is_system, sort_order. Trigger seeds plus/basic/associate on every
  space INSERT and backfills existing spaces. space_members.tier_id FK
  added and backfilled from the legacy enum value.
- space_role_labels (rename/recolor built-in roles per space).
  space_custom_roles + space_member_custom_roles for non-privileged
  extra labels. RLS gates by admin/board.
- space_invites: multi-code invites with expires_at, max_uses,
  uses_count, is_enabled. Legacy spaces.invite_code backfilled as a
  permanent enabled invite.
- secrets.encrypted_value bytea + encryption_version. Secrets RLS
  tightened. New comms_channels INSERT policy: any member can create;
  default channels are protected from deletion.
- knowledge_base.render_markdown boolean (default true).

Secrets encryption-at-rest:
- AES-256-GCM in lib/secrets/crypto.ts. Master key from
  SECRETS_ENCRYPTION_KEY env (64 hex chars).
- New revealSecret(id) server action: only path to plaintext, writes
  secret.revealed to activity_log.
- /ops/page.tsx no longer selects value or encrypted_value on the list
  endpoint - the original screenshot bug where ciphertext was already
  in the page bundle before "Reveal" is fixed.

UI:
- /forum index, /forum/new, /forum/[id]. Pin/lock/delete actions for
  admin/board.
- CommentThread component embedded on /proposals/[id], /incidents/[id],
  /policies/[slug]. Markdown rendering via react-markdown + remark-gfm.
- /comms sidebar: inline "+ New channel" form.
- /ops KB: row click opens markdown-rendering viewer modal.
- /settings: new Tiers tab and Invites tab. Inline price edit and
  archive/delete on tiers; copy/enable/disable/delete on invites.
- AtlasLogo replaces the terminal icon on the landing nav and footer.
  public/logo.svg wired as the favicon in app/layout.tsx metadata.
- Sidebar has a Forum nav link.

Server actions added:
- lib/actions/forum.ts, comms.ts, tiers.ts, roles.ts, invites.ts.
- lib/actions/secrets.ts rewritten with updateSecret + revealSecret.

Auth flow:
- joinSpace honors codes from space_invites first (enabled, expiry,
  use cap), falls back to legacy spaces.invite_code, increments
  uses_count on success.

Env:
- SECRETS_ENCRYPTION_KEY documented in .env.example and set on the
  Droplet's /opt/hackerspace-ops/.env.production.

README: live site link added (https://hackerspace.sh).

266/266 unit tests pass. Production build clean. Migration 021 will be
applied on the next deploy via /opt/hackerspace-ops/deploy.sh's
idempotent migration runner.
2026-05-14 17:47:52 -07:00

3.8 KiB

Changelog

All notable changes to this project are documented here. Format follows Keep a Changelog and the project loosely follows Semantic Versioning.

[Unreleased]

Added

  • Forum at /forum: top-level discussion threads with categories, pinning, locking. Author or admin/board can edit; admin can delete.
  • Polymorphic comment threads on proposals, incidents, and policies. New comments table keyed on (entity_type, entity_id). Renders markdown.
  • User-creatable chat channels: inline "+ New channel" form in /comms (name, description, type). RLS now allows any member to create; default channels stay protected.
  • Custom membership tiers with prices: new space_tiers table per space. Settings -> Tiers tab to list, create, edit (including inline price edit), archive, and delete custom tiers. Built-in plus/basic/associate tiers seed on space creation and on existing spaces via backfill. space_members.tier_id FK backfilled from the legacy enum.
  • Customizable role labels and custom org roles: space_role_labels (rename/recolor built-ins per space) and space_custom_roles (non-privileged extra labels) with member m2m. Server actions wired; UI surface pending in a follow-up.
  • Multi-code invites: space_invites with per-code expiry, max-use cap, and enable/disable. Legacy spaces.invite_code backfilled as a permanent enabled invite. Settings -> Invites tab to manage. joinSpace honors any valid invite and increments uses_count.
  • Knowledge base markdown rendering: clicking a KB entry opens a modal that renders content as markdown via react-markdown + remark-gfm.
  • AtlasLogo as the brand mark: replaces the terminal icon on the landing nav and footer; public/logo.svg is the favicon.
  • Live site link in README.md: https://hackerspace.sh.

Changed

  • Secrets vault is now encrypted at rest: AES-256-GCM with a per-secret IV using a SECRETS_ENCRYPTION_KEY env var. The /ops list endpoint no longer sends plaintext or ciphertext to the client. A new revealSecret(id) server action is the only path to plaintext and writes a secret.revealed row to activity_log. Existing legacy plaintext rows continue to work.

Added (continued)

  • Production deployment to a self-hosted DigitalOcean Droplet with automatic HTTPS via Caddy and Let's Encrypt.
  • GitHub Actions workflow that pushes a deploy on every commit to main. Migrations are applied automatically via _migrations_applied tracking.
  • Daily encrypted pg_dumpall backup cron, retained 14 days, written to the persistent block volume.
  • Resend SMTP integration for transactional email (GoTrue).
  • Open-source release scaffolding: LICENSE (MIT), CONTRIBUTING.md, SECURITY.md, CHANGELOG.md, refreshed README.md, docs/WEBHOOKS.md.
  • GitHub repository link on the landing page.
  • Webhook signing secret is now displayed in the settings UI with show/hide and copy-to-clipboard.

Changed

  • Mobile responsiveness pass on the Kanban board, members table, payments table, proposal voting grids, and the landing mini board preview.
  • members directory now respects the member_directory_visibility space setting for non-admin viewers.
  • lib/actions/settings.ts now persists mission_statement alongside the rest of the space metadata.

Removed

  • @vercel/analytics dependency and all references to Vercel hosting. The project is self-hosted on a Droplet.
  • Dead v0 codegen artifacts.

Fixed

  • Auth container crash-loop on first boot caused by an empty DISABLE_SIGNUP env value.
  • Kong port-binding race that left supabase.hackerspace.sh returning 502 after a fresh stack bring-up.

[0.1.0] - 2026-03-10

Initial pre-production cut. See docs/HANDOFF.md for the full session-by-session history of work prior to the open-source release.