Files
collective-lists/Justfile
Oier Bravo Urtasun ce1bcfb7a6 feat(design): apply Monolith Editorial design system to all Fase 1 screens
- Remove all 1px border separators (sidebar border-r, page header border-b,
  section border-t, member list divide-y, invite card border). Separation is
  now achieved via background color shifts and whitespace per the "No-Line" rule.
- Fix sidebar: bg-surface-raised vs bg-background creates tonal separation.
- Correct dark background to #020617 (slate-950) per spec.
- Add surface-container-low, text-primary/secondary/muted, destructive tokens.
- Fix CSS variable color space: all tokens are RGB triplets; switch Tailwind
  config and app.css from hsl() to rgb() to prevent yellow/warm color bleed.
- Replace emoji nav icons with Lucide icons at 16px / 1.5 stroke-width.
- Apply Masthead typography (uppercase Label-MD + Title-LG) to all page headers
  and section labels across lists, tasks, notes, search, settings, manage.
- Destructive action (sign out) uses bg-destructive per spec.
- Add `just serve` command: builds and runs the prod Node server at :3000
  against the dev Docker stack for production build testing.
- Add nav_collective i18n key (en + es).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 22:09:25 +02:00

117 lines
3.9 KiB
Makefile

# Colectivo — task runner
# Requires: just, docker, pnpm
set dotenv-load := true
# Alias: docker compose with correct project root so .env is always found
dc_dev := "docker compose --env-file .env -f infra/docker-compose.dev.yml"
dc_prod := "docker compose --env-file .env -f infra/docker-compose.prod.yml"
# ── Setup ─────────────────────────────────────────────────────────────────────
# First-time (and idempotent) local environment setup
setup:
bash setup.sh
# ── Dev ───────────────────────────────────────────────────────────────────────
# Start full local stack (Docker services + SvelteKit dev server)
dev:
{{dc_dev}} up -d
pnpm --filter @colectivo/web dev
# Stop all services (Docker stack + SvelteKit dev server)
stop:
{{dc_dev}} down
-pkill -f "vite" 2>/dev/null || true
# Stop local Docker stack
dev-stop:
{{dc_dev}} down
# Stop and remove all volumes (full reset)
dev-clean:
{{dc_dev}} down -v
# ── Database ──────────────────────────────────────────────────────────────────
# Drop, migrate, and seed the dev database
db-reset:
supabase db reset
# Apply pending migrations
db-migrate:
supabase db push
# Apply dev seed data
db-seed:
docker exec -i colectivo-dev-db-1 psql -U postgres < supabase/seed.sql
# Regenerate TypeScript types from Supabase schema
db-types:
supabase gen types typescript --local > packages/types/src/database.ts
echo "Types written to packages/types/src/database.ts"
# Open Supabase Studio
db-open:
open http://localhost:54323
# ── Keycloak ──────────────────────────────────────────────────────────────────
# Export Keycloak realm to keycloak/realm-export.json
kc-export:
{{dc_dev}} exec keycloak \
/opt/keycloak/bin/kc.sh export \
--realm colectivo \
--users realm_file \
--file /tmp/realm-export.json
{{dc_dev}} cp keycloak:/tmp/realm-export.json keycloak/realm-export.json
echo "Exported to keycloak/realm-export.json"
# Open Keycloak Admin Console
kc-open:
open http://localhost:8080/admin
# ── Build ─────────────────────────────────────────────────────────────────────
# Build all packages
build:
pnpm turbo run build
# Run the production build locally against the dev Docker stack (port 3000)
serve: build
{{dc_dev}} up -d
PORT=3000 node apps/web/build/index.js
# Type-check all packages
check:
pnpm turbo run check
# Lint all packages
lint:
pnpm turbo run lint
# Run tests
test:
pnpm turbo run test
# ── Backup & Restore ──────────────────────────────────────────────────────────
# Take a manual backup of a service (e.g. just backup supabase)
backup service:
infra/scripts/backup.sh {{service}}
# Restore a backup file (e.g. just restore supabase backups/2024-01-01.dump)
restore service file:
infra/scripts/restore.sh {{service}} {{file}}
# ── Production ────────────────────────────────────────────────────────────────
# Deploy to production via SSH
deploy:
infra/scripts/deploy.sh
# Stream production Docker logs
logs:
{{dc_prod}} logs -f