data-modeling
Data modeling - entities, relationships, schemas. Use when designing data structures.
When & Why to Use This Skill
This Claude skill provides a comprehensive framework for conceptual data modeling, focusing on entities, relationships, and domain boundaries. it helps developers design robust data structures that ensure data integrity, scalability, and security by enforcing server-side truth and audit trails, specifically optimized for modern stacks like Next.js, Drizzle ORM, and PostgreSQL.
Use Cases
- Initial Schema Design: Defining entities and their relationships when starting a new project or feature to ensure a solid architectural foundation.
- Scalability Assessment: Evaluating existing data models to identify potential bottlenecks or implicit assumptions that might fail as the product scales.
- Security & Compliance: Implementing non-negotiable server-enforced authorization and audit trails for high-value data mutations.
- Domain Refactoring: Re-evaluating domain boundaries and entity relationships to reduce system complexity and improve code maintainability.
| name | data-modeling |
|---|---|
| description | Data modeling - entities, relationships, schemas. Use when designing data structures. |
Data Modeling Guideline
Tech Stack
- API: tRPC
- Framework: Next.js (with Turbopack)
- Database: Neon (Postgres)
- ORM: Drizzle
Non-Negotiables
- All authorization must be server-enforced (no client-trust)
- Platform is source of truth — third-party services sync FROM platform
- UI must never contradict server-truth
- High-value mutations must have audit trail (who/when/why/before/after)
Context
Data modeling is conceptual — entities, relationships, domain boundaries. Physical implementation (indexes, migrations, query performance) lives in database.
Consider: what are the real-world entities? How do they relate? What invariants must hold? What will break when requirements change?
Driving Questions
- If we were designing this from scratch, what would be different?
- Where will the current model break as the product scales?
- What implicit assumptions are waiting to cause bugs?
- Where is complexity hiding that makes the system hard to reason about?
- What domain boundaries are we violating?