Phase 9: REST API Vision¶
Document Type: Vision Statement
Phase: 9 - Auto-Generated REST API
Status: Active
Goal¶
Provide automatic REST API generation from database schema, inspired by PostgREST, while preserving AeroDB's determinism and explicit control principles.
Philosophy¶
Core Principles¶
- Schema-Driven: API endpoints derived from schema, not hand-coded
- Deterministic: Same query params → Same results
- Bounded: All queries must be bounded (no unbounded scans)
- Secure: RLS enforcement at query level, not middleware
- Explicit: No hidden magic, predictable behavior
Non-Goals¶
- GraphQL (Phase 17+)
- Auto-migrations on schema change
- Automatic relationship detection
Target Experience¶
# After creating a schema, REST endpoints are available immediately
POST /rest/v1/posts
GET /rest/v1/posts?author_id=eq.123&order=created_at.desc&limit=10
Success Criteria¶
- Zero-config REST API from any schema
- Full CRUD operations
- PostgREST-compatible query syntax
- RLS enforcement on all endpoints
- <10ms overhead vs direct queries