2026-05-23 13:45:02 -06:00
2026-05-22 14:32:15 -06:00
2026-05-20 23:01:55 -06:00
2026-04-29 19:24:50 -06:00
2026-05-23 16:52:18 -06:00
2026-05-22 15:50:33 -06:00
2026-05-22 13:30:47 -06:00
2026-05-22 15:50:33 -06:00
2026-05-22 13:50:55 -06:00
2026-05-23 13:45:02 -06:00
2026-05-22 15:50:33 -06:00
2026-04-04 22:20:02 -06:00
2026-05-22 15:50:33 -06:00
2026-05-19 22:16:08 -06:00
2026-01-26 15:58:08 -07:00
2026-05-22 13:30:47 -06:00
2026-05-23 13:30:34 -06:00
2026-05-23 16:47:47 -06:00
2026-04-04 22:56:32 -06:00
2026-05-23 14:29:34 -06:00
2026-05-23 14:29:34 -06:00
2026-05-23 16:52:18 -06:00
2026-04-29 07:20:16 -06:00
2026-05-23 14:29:34 -06:00
2026-05-23 16:52:18 -06:00
2026-04-18 14:12:49 -06:00
2026-05-23 16:52:18 -06:00
2026-01-26 08:19:49 -07:00
2026-04-18 14:12:49 -06:00

Community Rule

A Next.js application for community decision-making and governance documentation — author, browse, and share governance "rules" built from curated templates and a guided wizard.

Live at communityrule.info. Packaged as a Cloudron app for MEDLab; see docs/guides/ops-backend-deploy.md for the deployment handoff.

Requirements

  • Node.js 20+ (LTS)
  • npm 10+
  • Docker (for local Postgres and Mailhog)

Quick start

cp .env.example .env             # then set SESSION_SECRET (≥16 chars)
docker compose up -d postgres    # add `mailhog` for a local inbox
npm ci
npx prisma migrate dev
npm run dev

Open http://localhost:3000. Without CLOUDRON_MAIL_SMTP_* set, magic-link sign-in URLs are printed to the dev-server log instead of emailed.

Full local backend, API reference, and PR workflow: CONTRIBUTING.md.

Scripts

Command What it does
npm run dev Next.js dev server (Turbopack).
npm run build / npm start Production build / serve.
npm test Vitest unit + component tests with coverage.
npm run test:component Components only — faster inner loop.
npm run e2e Playwright E2E + visual regression.
npm run migrate:smoke Throwaway Postgres + prisma migrate deploy (Docker required).
npm run storybook Storybook on port 6006.
npm run knip Detect unused files / exports.
npm run lhci Lighthouse CI performance pass.

See package.json for the full list (visual regression, bundle analysis, seeding, etc.).

Project layout

app/             Next.js app router — route groups (marketing), (app),
                 (admin), (dev); shared components under app/components/;
                 admin-only widgets under app/(admin)/<route>/_components/
lib/             Shared library code (server, validation, create-flow logic)
prisma/          Schema, migrations, seed
messages/en/     Localized UI copy (single-locale today; English)
public/          Static assets
stories/         Storybook stories
tests/           Vitest + Playwright suites (mirror source paths)
docs/            Human-facing documentation — start at docs/README.md
.cursor/rules/   Per-file conventions (auto-loaded by Cursor)
scripts/         Build, release, and smoke-test scripts

Tech stack

Next.js 16 · React 19 · TypeScript · Tailwind CSS 4 · Prisma 6 · PostgreSQL · Vitest · Playwright · Storybook 10 · Lighthouse CI.

Documentation

License

Application source code is licensed under the GNU General Public License v3.0, the same license as the legacy GitLab project. Copyright (C) 2020 Media Enterprise Design Lab.

User-facing content (guides, template copy, marketing text) is licensed under CC BY-SA 4.0, as stated on communityrule.info/about.

S
Description
No description provided
Readme GPL-3.0 110 MiB
Languages
TypeScript 80.6%
JavaScript 16.7%
CSS 2.3%
Shell 0.3%
Dockerfile 0.1%