Database/Schema Cleanup
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
- Issue type
- Refactor
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- javascript, sqlite
Research direction
Start by inventorying the schema, database clients, migrations, and seeds under sites/student-site and sites/teacher-site, then review the proposed @autonomy/db package boundary. The issue is an epic with no specific file or sub-issue selected. Done requires an agreed implementation scope covering centralization, multi-tenancy, curriculum versioning, privacy controls, and production database hardening.
Written by the indexing model from the issue text.
Description
Context & Objectives
The current database schema was rapidly prototyped using LibSQL (Turso) and Drizzle ORM to support initial feature validation. While functional for local testing, the current schema is split across two applications (sites/student-site and sites/teacher-site), lacks relational normalization, exhibits dual-migration drift, and does not support the multi-tenant organizational structure required for deployment in public high schools and CTE districts.
This epic tracks the complete overhaul of the database layer to achieve enterprise readiness, data integrity, FERPA compliance, and support for multi-educator cohort analytics.
Architectural Pillars
- Single Source of Truth: Centralize all database definitions, client instances, migrations, and seeds into a shared monorepo package (
@autonomy/db). - Educational Multi-Tenancy: Structure data across Districts, Schools, Cohorts (Class Periods), and Enrollments.
- Curriculum Immutability & Versioning: Support drafting, publishing, and archiving of curriculum without mutating active student submissions.
- Student Psychological Privacy (FERPA / COPPA): Isolate sensitive behavioral self-audits, reflection journals, and restorative practice entries with tenant scoping and audit logging.
- Production Engine Hardening: Standardize on UUIDv7 keys, enforce strict foreign key constraints in LibSQL, optimize indexing for query telemetry, and implement reproducible database seeds.
Sub-Issue Breakdown
- Dominant language
- JavaScript
- Stars
- 2
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from webrune-tim/The-Autonomy-Protocol
-
curriculum help wanted site-content
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
database enhancement good first issue hacktoberfest help wanted
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
database hacktoberfest help wanted
Difficulty 5/5 Over a week Newbie friendliness 28/100
-
database enhancement hacktoberfest help wanted
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
database hacktoberfest help wanted
Difficulty 4/5 3-5 days Newbie friendliness 48/100
All issues in webrune-tim/The-Autonomy-Protocol
Similar issues
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100