Resguardo Escolar
End-to-end school safety and discipline management, legally sound.
SaaS platform that lets Chilean schools manage misconduct reports, disciplinary procedures and student-safety protocols in line with national regulations, with deadlines, full traceability and tamper-proof case files.
- traced legal rules
- 140+
- SQL migrations
- 131
- test suites
- 450+
- user roles
- 13
The problem
Schools handle sensitive cases (bullying, violence, child-rights violations) on spreadsheets and paper. One missed deadline or skipped step can invalidate an entire procedure before the education regulator.
The solution
A rules engine that encodes the regulations as rules traceable to their legal source, each one covered by tests. Cases move through a database-level state machine with an append-only audit log, and closed cases become immutable.
My role
Founder, architect and sole developer: product, legal domain, frontend, database, infrastructure, DevOps and the agentic pipeline.
How it's built
Legal rules engine
Every rule has an id, its legal source and at least one test. The legal domain is the source of truth and specs are corrected against it.
Security by design
Row Level Security on every table, explicit grants, an isolated schema for sensitive data about minors, and two-factor authentication.
Agentic development
A planner agent turns requests into approved specs and an executor agent implements, verifies and opens the PR. A guard script blocks any command aimed at production.
CI/CD with a safety brake
Every PR runs deployment-gate e2e tests plus a full suite sharded in 4. Production only deploys on merge to main.
Highlights
- Case state machine in a single SQL function: no state changes outside of it.
- Append-only audit log and exportable case files for regulatory audits.
- AI knowledge base built on top of the legal domain documentation.
- Tests at every layer: pgTAP in the database, Vitest, and Playwright e2e selected by what changed.
- Transactional email system with typed templates and delivery webhooks.
- Infrastructure built from scratch: DNS, email, hosting, Edge Functions and automated deployment.
- Custom design system on top of Nuxt UI, with generated tokens and accessibility built in (states shown with words and icons, not just color).
Next project
GreenPod