mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
docs: Update README.md for clarity on Phase 2 status and developer guidance
Fixes for accuracy and completeness:
- Update DBAL usage example from old getAdapter() to new getDBALClient() pattern
- Clarify Phase 2 is TypeScript-only (C++ daemon is Phase 3, future work)
- Fix rate limiting claim - mark as in-progress (TD-2) instead of implemented
- Add developer routing section at top ("For Different Audiences")
- Restructure "Learn More" section with clear categories and links to all key docs
- Add "Current Status" section showing Phase 2 completion % and current tech debt
- Link prominently to AGENTS.md, CLAUDE.md, and TECH_DEBT.md for developers
- Note about TypeScript DBAL being current approach in development workflow
Now README serves both end users (setup, concepts) and developers (guidance, status, task list).
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
106
README.md
106
README.md
@@ -6,6 +6,14 @@ No hardcoded routes, no component imports, no assumptions. The entire applicatio
|
||||
|
||||
---
|
||||
|
||||
## For Different Audiences
|
||||
|
||||
> **👤 End Users?** → See Quick Start below
|
||||
> **👨💻 Developers?** → Read [AGENTS.md](/AGENTS.md) + [CLAUDE.md](/CLAUDE.md)
|
||||
> **🤖 AI Assistants?** → Read `/AGENTS.md` first, then check [TECH_DEBT.md](/TECH_DEBT.md) for tasks
|
||||
|
||||
---
|
||||
|
||||
## Table of Contents
|
||||
|
||||
1. [Core Concept](#core-concept)
|
||||
@@ -482,22 +490,29 @@ model InstalledPackage {
|
||||
|
||||
### DBAL (Database Abstraction Layer)
|
||||
|
||||
**Why?** Credentials never touch the frontend. All database operations go through the DBAL daemon.
|
||||
**Why?** Credentials never touch the frontend. All database operations go through the DBAL abstraction.
|
||||
|
||||
**Architecture**:
|
||||
- **TypeScript SDK** (`dbal/development/`) - Development, fast iteration
|
||||
- **C++ Daemon** (`dbal/production/`) - Production, credential protection
|
||||
- **Phase 2 (Current)**: TypeScript SDK (`dbal/development/`) - Development, fast iteration
|
||||
- **Phase 3 (Planned)**: C++ Daemon (`dbal/production/`) - Production, credential isolation & security hardening
|
||||
|
||||
**Usage**:
|
||||
**Usage** (Phase 2 - Current):
|
||||
```typescript
|
||||
import { getAdapter } from '@/lib/db/core/dbal-client'
|
||||
import { getDBALClient } from '@/dbal'
|
||||
|
||||
const adapter = getAdapter()
|
||||
const result = await adapter.list('InstalledPackage', {
|
||||
filters: { enabled: true }
|
||||
})
|
||||
const db = getDBALClient()
|
||||
const packages = await db.packages.list({ enabled: true })
|
||||
const user = await db.users.findOne({ id: 'user-123' })
|
||||
const newPost = await db.posts.create({ title: 'My Post', content: '...' })
|
||||
```
|
||||
|
||||
**Entity Operations Available**:
|
||||
- `db.users.list()`, `findOne()`, `create()`, `update()`, `delete()`
|
||||
- `db.pageConfigs.list()`, `findOne()`, `create()`, `update()`, `delete()`
|
||||
- `db.sessions.list()`, `findOne()`, `create()`
|
||||
- `db.packages.list()`, `findOne()`
|
||||
- And more - all type-safe with schema validation
|
||||
|
||||
### Database Commands
|
||||
|
||||
```bash
|
||||
@@ -542,15 +557,12 @@ brew install cmake ninja conan
|
||||
cd frontends/nextjs
|
||||
npm run dev
|
||||
|
||||
# Terminal 2: DBAL daemon (optional, TypeScript version)
|
||||
cd dbal/development
|
||||
npm install
|
||||
npm run dev
|
||||
|
||||
# Terminal 3: PostgreSQL (via Docker)
|
||||
# Terminal 2: PostgreSQL (via Docker)
|
||||
docker run -p 5432:5432 -e POSTGRES_PASSWORD=dev postgres:16
|
||||
```
|
||||
|
||||
> **Note**: Phase 2 is TypeScript-only. The C++ DBAL daemon (`dbal/production/`) is for Phase 3 (planned). Currently all database operations use the TypeScript DBAL in `/dbal/development/`.
|
||||
|
||||
### Code Conventions
|
||||
|
||||
**CRITICAL RULES**:
|
||||
@@ -887,11 +899,15 @@ All errors follow a consistent format:
|
||||
|
||||
### Rate Limiting
|
||||
|
||||
API endpoints are rate-limited to prevent abuse:
|
||||
- **Authenticated users**: 1000 requests per hour
|
||||
- **Public endpoints**: 100 requests per hour per IP
|
||||
⏳ **Status**: In Progress (TD-2)
|
||||
|
||||
Rate limit information is included in response headers:
|
||||
Rate limiting is currently being implemented. See [TECH_DEBT.md](TECH_DEBT.md) for implementation details.
|
||||
|
||||
When complete, API endpoints will be rate-limited to prevent abuse:
|
||||
- **Authenticated users**: 1000 requests per hour (planned)
|
||||
- **Public endpoints**: 100 requests per hour per IP (planned)
|
||||
|
||||
Rate limit information will be included in response headers:
|
||||
```
|
||||
X-RateLimit-Limit: 1000
|
||||
X-RateLimit-Remaining: 999
|
||||
@@ -1185,10 +1201,56 @@ MIT License - See LICENSE file
|
||||
|
||||
## Learn More
|
||||
|
||||
- [Deployment Guide](deployment/DEPLOYMENT_GUIDE.md) - Detailed deployment documentation
|
||||
### 🚀 For Getting Started
|
||||
- [Quick Start](#quick-start) - Setup in minutes
|
||||
- [Architecture](#architecture) - System overview
|
||||
- [Deployment](#deployment) - How to deploy
|
||||
|
||||
### 👨💻 For Developers
|
||||
- **[AGENTS.md](/AGENTS.md)** - ⭐ **START HERE** - Development guide for all subsystems
|
||||
- **[CLAUDE.md](/CLAUDE.md)** - Comprehensive project instructions and architecture
|
||||
- **[TECH_DEBT.md](/TECH_DEBT.md)** - Bot-actionable tech debt tasks (TD-1 through TD-13)
|
||||
- [ROADMAP.md](/ROADMAP.md) - Project vision, phases, and status
|
||||
- [ARCHITECTURE.md](/ARCHITECTURE.md) - Detailed system architecture and data flow
|
||||
- [DBAL_REFACTOR_PLAN.md](/DBAL_REFACTOR_PLAN.md) - Phase 2 cleanup implementation (TD-1)
|
||||
- [TESTING.md](/TESTING.md) - E2E testing guide
|
||||
|
||||
### 📦 For Packages & Components
|
||||
- [Package Structure](packages/README.md) - How to create packages
|
||||
- [DBAL Documentation](dbal/docs/) - Database abstraction layer
|
||||
- [Prisma Schema](prisma/schema.prisma) - Database schema reference
|
||||
- [Package Schemas](/schemas/package-schemas/) - JSON schema definitions
|
||||
- [Seed Data](/seed/) - Bootstrap configuration
|
||||
|
||||
### 🗄️ For Database & DBAL
|
||||
- [DBAL Documentation](/dbal/shared/docs/) - Database abstraction layer guides
|
||||
- [YAML Schemas](/dbal/shared/api/schema/) - Database entity definitions (source of truth)
|
||||
- [Prisma Schema](prisma/schema.prisma) - Generated database schema
|
||||
|
||||
### 📊 For Status & Planning
|
||||
- [ROADMAP.md](/ROADMAP.md) - What's done, in progress, and planned
|
||||
- [TECH_DEBT.md](/TECH_DEBT.md) - Current tech debt with explicit instructions
|
||||
|
||||
---
|
||||
|
||||
## Current Status
|
||||
|
||||
**Phase**: Phase 2 (Backend Integration) - **90% Complete**
|
||||
|
||||
**Done**:
|
||||
- ✅ Core architecture (Next.js, Prisma, DBAL, Multi-tenant)
|
||||
- ✅ Authentication & authorization
|
||||
- ✅ CRUD operations
|
||||
- ✅ Package system (52 packages)
|
||||
- ✅ Generic component renderer
|
||||
- ✅ Infrastructure (Docker, PostgreSQL, Redis, Nginx)
|
||||
- ✅ Test suite (464 tests, 100% pass rate)
|
||||
|
||||
**In Progress**:
|
||||
- 🔄 DBAL Refactoring (TD-1) - Move database logic from frontend to DBAL
|
||||
- ⏳ Rate limiting (TD-2)
|
||||
- ⏳ API documentation / Swagger (TD-3)
|
||||
- ⏳ Error handling docs (TD-4)
|
||||
|
||||
**See [TECH_DEBT.md](/TECH_DEBT.md) for detailed task instructions.**
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user