No description
Find a file
Randall Stillwell 9c1aaaa61f Bootstrap agent-context pipeline (L1 + L2 + L3)
Installs a 3-layer Cursor-aligned agent pipeline so future agent
sessions can orient quickly and stay inside guard rails:

L1 — context for any agent reading the repo:
  - AGENTS.md (top-level orientation, conventions, no-go zones)
  - .cursor/rules/ (no-go-zones, api-routes, prisma, prisma-schema-map)
  - .cursor/skills/ (add-api-route, add-prisma-model)
  - docs/SCHEMA_MAP.md generated from prisma/schema.prisma
  - scripts/generate-schema-map.ts (regenerate the map; wired up as
    `npm run schema:map`)

L2 — subagent roles for the 9-stage idea-to-feature pipeline:
  - .cursor/agents/role-*.md (conductor, architect, ia-architect,
    design-system-auditor, implementer, reviewer, ux-reviewer,
    a11y-auditor, doc-writer) with explicit multitask annotations.

L3 — pipeline scaffolding:
  - .github/CODEOWNERS, PR template, and CI workflows (ci.yml,
    preview-smoke.yml, visual-diff.yml, pr-health-rollup.yml).
    Test job is intentionally disabled until Playwright is wired up.
  - .convoys/ folder for per-feature run notes + scripts/log-convoy-event.sh.
  - scripts/wt.sh worktree helper.
  - src/lib/flags/index.ts simple env-driven feature flag wrapper.
  - tests/smoke/app.smoke.spec.ts (Playwright smoke; excluded from
    tsc until @playwright/test is installed — see tsconfig change).

Also writes .agent-context-manifest.yml so the sync-agent-context
skill can detect drift and offer selective updates from upstream.

Follow-ups (not in this commit):
  - Install @playwright/test and re-enable the test job in ci.yml.
  - Review .cursor/agents/role-*.md and trim any roles that don't
    apply to this codebase.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-23 14:55:18 -05:00
.convoys Bootstrap agent-context pipeline (L1 + L2 + L3) 2026-05-23 14:55:18 -05:00
.cursor Bootstrap agent-context pipeline (L1 + L2 + L3) 2026-05-23 14:55:18 -05:00
.github Bootstrap agent-context pipeline (L1 + L2 + L3) 2026-05-23 14:55:18 -05:00
docs Bootstrap agent-context pipeline (L1 + L2 + L3) 2026-05-23 14:55:18 -05:00
prisma Add change password to profile, persist all profile fields to DB 2026-04-17 15:35:24 -05:00
public Add OG/Twitter sharing metadata and screenshot for all marketing pages 2026-04-16 20:34:26 -05:00
scripts Bootstrap agent-context pipeline (L1 + L2 + L3) 2026-05-23 14:55:18 -05:00
src Bootstrap agent-context pipeline (L1 + L2 + L3) 2026-05-23 14:55:18 -05:00
tests/smoke Bootstrap agent-context pipeline (L1 + L2 + L3) 2026-05-23 14:55:18 -05:00
.agent-context-manifest.yml Bootstrap agent-context pipeline (L1 + L2 + L3) 2026-05-23 14:55:18 -05:00
.dockerignore Build Echo OCR app: full-stack response card scanner 2026-03-10 07:17:45 -05:00
.env.example Add in-app Contact Support dialog and Help Center docs 2026-04-24 15:10:56 -05:00
.gitignore Bootstrap agent-context pipeline (L1 + L2 + L3) 2026-05-23 14:55:18 -05:00
AGENTS.md Bootstrap agent-context pipeline (L1 + L2 + L3) 2026-05-23 14:55:18 -05:00
components.json feat: initial commit 2026-03-09 15:31:45 -05:00
docker-compose.yml Build Echo OCR app: full-stack response card scanner 2026-03-10 07:17:45 -05:00
Dockerfile Lower build memory ceiling to 1024MB and clean npm cache in deps layer 2026-04-07 23:14:09 -05:00
eslint.config.mjs Initial commit from Create Next App 2026-03-09 15:31:21 -05:00
next.config.ts Add SFTP support: replace FTP-only TLS toggle with protocol selector 2026-04-17 15:12:54 -05:00
package-lock.json Add SFTP support: replace FTP-only TLS toggle with protocol selector 2026-04-17 15:12:54 -05:00
package.json Bootstrap agent-context pipeline (L1 + L2 + L3) 2026-05-23 14:55:18 -05:00
postcss.config.mjs Initial commit from Create Next App 2026-03-09 15:31:21 -05:00
prisma.config.ts Build Echo OCR app: full-stack response card scanner 2026-03-10 07:17:45 -05:00
README.md Build Echo OCR app: full-stack response card scanner 2026-03-10 07:17:45 -05:00
start.sh Remove --skip-generate flag from prisma db push 2026-03-10 14:03:20 -05:00
tsconfig.json Bootstrap agent-context pipeline (L1 + L2 + L3) 2026-05-23 14:55:18 -05:00
vercel.json Migrate to Vercel + Supabase + Upstash production stack 2026-04-15 23:51:44 -05:00

Echo OCR

OCR-powered response card scanner and management tool for Echo Life Church.

Scans front/back of paper response cards (PDF or images), extracts structured data using a local Ollama vision model, stores results in PostgreSQL, and serves them through a modern filterable table UI.

Stack

  • Next.js 15 (App Router) + Tailwind CSS v4 + shadcn/ui
  • TanStack Table for data tables with filtering, sorting, pagination
  • Prisma + PostgreSQL for data storage
  • Ollama (local LLM) for OCR via vision models (LLaVA 7B recommended)
  • MinIO (S3-compatible) for PDF/image storage
  • Docker for deployment via Coolify

Local Development

Prerequisites

  • Node.js 18+
  • Docker + Docker Compose (for PostgreSQL + MinIO)
  • Ollama running locally with a vision model (ollama pull llava:7b)
  • GraphicsMagick (brew install graphicsmagick) for PDF-to-image conversion

Setup

# Install dependencies
npm install

# Start local PostgreSQL + MinIO
docker compose up -d postgres minio

# Create MinIO bucket (visit http://localhost:9001, login minioadmin/minioadmin)

# Push database schema
npm run db:push

# Start dev server
npm run dev

Open http://localhost:3000.

Environment Variables

Copy .env.example to .env and configure:

cp .env.example .env

Deployment (Coolify)

See the deployment section in the project plan for step-by-step Coolify setup instructions including PostgreSQL, MinIO bucket creation, Ollama configuration, and Traefik routing.

API Endpoints

Method Path Description
GET /api/cards List cards (filters, pagination, search)
POST /api/cards Create a card
GET /api/cards/[id] Get card with presigned image URLs
PUT /api/cards/[id] Update card fields
DELETE /api/cards/[id] Delete card and images
POST /api/cards/[id]/export Mark card as exported
POST /api/upload Upload PDF/images for OCR
GET /api/jobs List processing jobs
GET /api/stats Card count statistics
GET/PUT /api/settings App settings
POST /api/watch Start/stop folder monitoring
GET /api/images/[...path] Proxy images from MinIO