Skip to content
This repository was archived by the owner on Sep 4, 2025. It is now read-only.

Commit b271b36

Browse files
committed
refactor: Migrate to pnpm monorepo with clean 3-layer architecture
- Implement Ports and Adapters pattern with full separation of concerns - Split codebase into three packages: * @starfleet/data-core: Pure business logic with zero Node.js dependencies * @starfleet/data-host-node: Node.js adapters implementing core ports * @starfleet/data-cli: Thin presentation layer with composition root - Migrate from npm to pnpm for monorepo management - Add workspace configuration with pnpm-workspace.yaml - Configure .npmrc for optimal pnpm workspace behavior - Implement runtime port validation with ensurePort - Use workspace:* protocol for local package dependencies - Add proper package exports with /* patterns for directory mapping - Establish clean dependency injection via composition root - Ensure all tests pass with new architecture
1 parent d13a770 commit b271b36

File tree

12 files changed

+122
-91
lines changed

12 files changed

+122
-91
lines changed

.npmrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
strict-peer-dependencies=true
2+
prefer-workspace-packages=true
3+
save-workspace-protocol=true
4+
auto-install-peers=false
5+
public-hoist-pattern[]=*eslint*
6+
public-hoist-pattern[]=@types/*
7+
public-hoist-pattern[]=*prettier*
8+
public-hoist-pattern[]=*vitest*

docs/README.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Welcome to the D.A.T.A. (Database Automation, Testing, and Alignment) documentat
88
## 📚 Documentation Structure
99

1010
### 🚀 [Features](/docs/features/)
11+
1112
User-facing feature documentation and guides
1213

1314
- **[Edge Functions Integration](features/edge-functions.md)** - Deploy and manage Supabase Edge Functions alongside migrations
@@ -16,6 +17,7 @@ User-facing feature documentation and guides
1617
- Production safety features
1718

1819
### ⚙️ [Configuration](/docs/configuration/)
20+
1921
How to configure D.A.T.A. for your project
2022

2123
- **[Testing Configuration](configuration/testing.md)** - Configure test execution, coverage, and automation
@@ -24,6 +26,7 @@ How to configure D.A.T.A. for your project
2426
- Watch mode and auto-compilation settings
2527

2628
### 🔮 [Roadmap](/docs/roadmap/)
29+
2730
Future plans and vision for D.A.T.A.
2831

2932
- **[Ideas and Future Features](roadmap/ideas-and-future.md)** - The grand vision for D.A.T.A.'s evolution
@@ -32,6 +35,7 @@ Future plans and vision for D.A.T.A.
3235
- AI-assisted migration intelligence
3336

3437
### 🔧 [Technical](/docs/technical/)
38+
3539
Implementation details and architecture documentation
3640

3741
- **[Memory Management](technical/memory-management.md)** - How D.A.T.A. handles large test suites
@@ -45,34 +49,39 @@ Implementation details and architecture documentation
4549
- Migration generation
4650

4751
### 🎯 [Decisions](/docs/decisions/)
52+
4853
Architecture Decision Records (ADRs)
4954

5055
- **[CLI Framework](decisions/cli-framework.md)** - Why Commander.js was chosen
5156
- **[Event Architecture](decisions/event-architecture.md)** - Event-driven command pattern
5257
- **[Testing Strategy](decisions/testing-strategy.md)** - pgTAP and Vitest integration
5358

5459
### 📋 [Tasks](/docs/TASKS/)
60+
5561
Task management and project tracking
5662

5763
- **[System Tasks](TASKS/system.md)** - Core system improvements and features
5864
- **[Test Tasks](TASKS/test.md)** - Testing infrastructure and coverage
5965
- **[Migration Tasks](TASKS/migration.md)** - Migration system enhancements
6066

6167
### 🔍 [Audits](/docs/audits/)
68+
6269
Code quality and security audits
6370

6471
- Repository structure audits
6572
- Security review documentation
6673
- Performance analysis reports
6774

6875
### 👀 [Code Reviews](/docs/code-reviews/)
76+
6977
Code review templates and guidelines
7078

7179
- Review checklists
7280
- Best practices documentation
7381
- Common patterns and anti-patterns
7482

7583
### 🖖 [Fun](/docs/fun/)
84+
7685
Star Trek references and easter eggs
7786

7887
- **[Bridge Crew Personalities](fun/personalities.md)** - Different personality modes for D.A.T.A.
@@ -82,35 +91,41 @@ Star Trek references and easter eggs
8291
## 🗺️ Quick Navigation Guide
8392

8493
### For New Users
94+
8595
1. Start with [Edge Functions Integration](features/edge-functions.md) to understand core features
8696
2. Review [Testing Configuration](configuration/testing.md) to set up your project
8797
3. Check the main [README](/README.md) for quick start instructions
8898

8999
### For Contributors
100+
90101
1. Read relevant [Architecture Decisions](decisions/) to understand design choices
91102
2. Review [Technical Documentation](technical/) for implementation details
92103
3. Check [Tasks](TASKS/) for current work items
93104
4. Follow [Code Review Guidelines](code-reviews/) for contributions
94105

95106
### For System Architects
107+
96108
1. Study the [Golden SQL Compilation Algorithm](technical/golden-sql-compilation-algorithm.md)
97109
2. Review [Memory Management](technical/memory-management.md) architecture
98110
3. Explore [Ideas and Future Features](roadmap/ideas-and-future.md) for roadmap planning
99111

100112
## 📖 Documentation Standards
101113

102114
### File Naming
115+
103116
- Use kebab-case for all documentation files
104117
- Be descriptive but concise (e.g., `memory-management.md` not `mm.md`)
105118
- Group related docs in appropriate directories
106119

107120
### Content Structure
121+
108122
- Start with a clear title and overview
109123
- Use hierarchical headings (H2 for main sections, H3 for subsections)
110124
- Include code examples where relevant
111125
- Add cross-references to related documentation
112126

113127
### Maintenance
128+
114129
- Keep documentation synchronized with code changes
115130
- Archive outdated documentation rather than deleting
116131
- Date significant updates in document headers
@@ -134,12 +149,12 @@ When adding new documentation:
134149

135150
## 🔗 External Resources
136151

137-
- [Main Repository](https://github.com/starfleet/supa-data)
138-
- [Issue Tracker](https://github.com/starfleet/supa-data/issues)
152+
- [Main Repository](https://github.com/flyingrobots/DATA)
153+
- [Issue Tracker](https://github.com/flyingrobots/DATA/issues)
139154
- [Supabase Documentation](https://supabase.com/docs)
140155
- [pgTAP Documentation](https://pgtap.org/)
141156

142157
---
143158

144159
*"The complexity of our documentation structure is directly proportional to the sophistication of our system. Both are... fascinating."*
145-
— Lt. Commander Data, Chief Documentation Officer
160+
— Lt. Commander Data, Chief Documentation Officer

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"description": "🖖 D.A.T.A. - Database Automation, Testing, and Alignment for PostgreSQL/Supabase",
55
"type": "module",
66
"private": true,
7+
"packageManager": "[email protected]",
78
"workspaces": [
89
"starfleet/*"
910
],

pnpm-workspace.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
packages:
2+
- "starfleet/*"

0 commit comments

Comments
 (0)