Files
consentos/Makefile
James Cottrill fbf26453f2 feat: initial public release
ConsentOS — a privacy-first cookie consent management platform.

Self-hosted, source-available alternative to OneTrust, Cookiebot, and
CookieYes. Full standards coverage (IAB TCF v2.2, GPP v1, Google
Consent Mode v2, GPC, Shopify Customer Privacy API), multi-tenant
architecture with role-based access, configuration cascade
(system → org → group → site → region), dark-pattern detection in
the scanner, and a tamper-evident consent record audit trail.

This is the initial public release. Prior development history is
retained internally.

See README.md for the feature list, architecture overview, and
quick-start instructions. Licensed under the Elastic Licence 2.0 —
self-host freely; do not resell as a managed service.
2026-04-14 09:18:18 +00:00

67 lines
2.3 KiB
Makefile

.PHONY: up down restart logs migrate seed test lint fmt check clean test-infra-up test-infra-down
# ── Development environment ──────────────────────────────────────────
up:
docker compose up -d
down:
docker compose down
restart:
docker compose restart
logs:
docker compose logs -f
logs-api:
docker compose logs -f api
# ── Database ─────────────────────────────────────────────────────────
migrate:
docker compose exec api alembic upgrade head
migrate-offline:
cd apps/api && DATABASE_URL=postgresql+asyncpg://consentos:consentos@localhost:5432/consentos alembic upgrade head
seed: migrate
docker compose exec api python -m src.cli.seed_known_cookies --clear
rollback:
docker compose exec api alembic downgrade -1
# ── Testing ──────────────────────────────────────────────────────────
test-infra-up:
docker compose -f docker-compose.test.yml up -d
docker compose -f docker-compose.test.yml exec -T postgres-test sh -c 'until pg_isready -U consentos_test; do sleep 1; done'
test-infra-down:
docker compose -f docker-compose.test.yml down -v
test:
cd apps/api && python -m pytest tests/ -v --tb=short
test-cov:
cd apps/api && python -m pytest tests/ -v --cov=src --cov-report=term-missing --tb=short
# ── Code quality ─────────────────────────────────────────────────────
lint:
cd apps/api && ruff check src/ tests/ alembic/
fmt:
cd apps/api && ruff check --fix src/ tests/ alembic/
cd apps/api && ruff format src/ tests/
check: lint test
# ── Cleanup ──────────────────────────────────────────────────────────
clean:
docker compose down -v
docker compose -f docker-compose.test.yml down -v
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -type d -name .pytest_cache -exec rm -rf {} + 2>/dev/null || true