Files
admin 9d80f95d4b Merge pull request #59 from Alpaq92/legalwork-ui
Console on the family's ui/v1 look (legalwork)
2026-10-19 16:49:29 +02:00

6.4 KiB
Raw Permalink Blame History

Credits & licenses

Counsel Scorecard is built on permissive open-source software and takes design inspiration from a handful of open-source projects. This file lists what we actually depend on (with what each piece is for and its license) and the design inspirations (with where they show up and their licenses).

The project itself is licensed Apache-2.0 — see LICENSE and NOTICE.

The CI license gate (backend/scripts/license_gate.py, run via pip-licenses) is the machine-authoritative check: it fails the build on any GPL/AGPL/SSPL dependency. The SPDX identifiers below are each project's published license; regenerate the live list with pip-licenses --format=markdown in the backend venv.


Runtime dependencies (Python backend)

From backend/requirements.txt.

Library What it's for License
FastAPI HTTP framework — routers, dependency-injected RBAC, OpenAPI docs MIT
Uvicorn ([standard]) ASGI server that runs the FastAPI app BSD-3-Clause
Pydantic Request/response schema validation and serialization MIT
pydantic-settings Loads/validates configuration from .env MIT
SQLAlchemy 2 ORM — entities, constraints, indexes, the DML session MIT
Alembic Database migrations (the frozen 0001 explicit-DDL migration) MIT
pg8000 Pure-Python PostgreSQL driver — no libpq/LGPL system dependency BSD-3-Clause
argon2-cffi Argon2id password hashing for login MIT
opentelemetry-sdk Telemetry SDK (traces, metrics, logs) Apache-2.0
opentelemetry-exporter-otlp-proto-grpc Exports telemetry over OTLP/gRPC to the collector Apache-2.0
opentelemetry-instrumentation-fastapi Auto-instruments FastAPI request handling Apache-2.0
opentelemetry-instrumentation-sqlalchemy Auto-instruments SQLAlchemy queries Apache-2.0

The frontend (frontend/index.html) ships no third-party runtime library — it is hand-written vanilla HTML/CSS/JS with no build step, no framework, and no bundled package. It does embed two attributed third-party design assets as inline data (icon path data and palette values) — see Embedded design assets below.

Database & infrastructure

Component What it's for License
PostgreSQL 16 Primary datastore; full-text search (tsvector + GIN) and pg_trgm fuzzy fallback PostgreSQL License
Docker + Docker Compose Orchestrates postgres → migrate → backend (the backend is its own edge; no reverse proxy) Apache-2.0
Python 3.12 Backend language/runtime (python base image) PSF License

Observability (opt-in)

Component What it's for License
OpenTelemetry Collector Receives OTLP from the backend, forwards to the store Apache-2.0
ClickHouse Columnar store for traces/logs/metrics Apache-2.0
HyperDX Unified UI over ClickHouse (metrics + logs + traces) MIT

Dev & CI tooling

Tool What it's for License
pytest Test runner (DB-free unit tests + Postgres integration suite) MIT
pytest-cov Coverage reporting in CI (term-missing; reported, not gated) MIT
httpx Test client used by the integration tests BSD-3-Clause
pip-licenses Powers the CI license gate (deny GPL/AGPL/SSPL) MIT

Embedded design assets (frontend)

Incorporated directly into frontend/index.html as inline data — no package, no build step — and credited here per their licenses.

Asset What it's for License
Open Color The entire color palette. The light + dark CSS custom properties (:root / [data-theme="dark"]) use Open Color values — the gray ramp for neutrals, indigo accent, and green/yellow/red/pink for status. Switched from a Tailwind-neutral palette on 2026-06-12 using the closest Open Color value for each token. MIT
Tabler Icons (@tabler/icons) Every icon. The ICN / TH_ICN maps and inline <svg>s embed Tabler 24×24 outline path data, rendered with stroke:currentColor (2px, round caps/joins) by the svg() helper. Replaced the hand-drawn Lucide-style icons on 2026-06-12. MIT
legalwork The look: colour, shape, type and motion values read from its code (HEAD 8255eba9) into the family's shared frontend/ui/v1/tokens.css, which the :root block maps Counsel's own names onto. No legalwork code is included. MIT
Inter The console font, frontend/ui/v1/InterVariable.woff2 beside its licence (LICENSE-Inter.txt), served from this origin. SIL OFL 1.1

Open Color, Tabler Icons and legalwork are MIT-licensed and Inter is SIL OFL 1.1 — all permissive, and all clear the CI license gate.

The app icon (assets/icon.svg, with a rasterized assets/icon.png) composes Tabler's filled square and percentage glyphs in Open Color — an orange-7 square with an orange-0 percentage.


Design inspirations

These shaped the look and feel of the admin console UX. No code from the projects below is vendored — the UX was re-implemented by hand. (Third-party assets that are embedded — icons and palette — are credited under Embedded design assets above.) The guiding principle was inspired, not copied — small differences are intentional.

Inspiration Where it shows up here License
Open Mercato The whole admin shell in frontend/index.html: the ~240px collapsible sidebar with grouped nav + icon rail, the ~60px topbar with breadcrumbs and command palette, the color system, and the light/dark theming approach are modeled on Open Mercato's backend AppShell. Audit notes in ../Counsel-Scorecard/open-mercato-like_ux_spec.md. MIT
shadcn/ui (and the Radix UI primitives it wraps) Component styling conventions — button/input/card radii, focus rings, badge/status-dot patterns — reimplemented as plain CSS. MIT

Fonts. The frontend uses the native system-ui font stack — no web font is shipped. (Open Mercato uses the Geist typeface, SIL OFL 1.1; we deliberately did not adopt it.)