docs: enterprise refactor plan with ralph specs
This commit is contained in:
59
CLAUDE.md
Normal file
59
CLAUDE.md
Normal file
@@ -0,0 +1,59 @@
|
||||
# CLAUDE.md — Contexto para Claude Code
|
||||
|
||||
## Qué es ABE
|
||||
ABE (Autonomous Bug Explorer) es una plataforma enterprise self-hosted de
|
||||
descubrimiento autónomo de bugs en aplicaciones web.
|
||||
|
||||
## Estado actual
|
||||
Fases 1-11 originales implementadas. Ahora refactorizando hacia arquitectura
|
||||
modular hexagonal enterprise. Ver `.ralph/PROMPT.md` para detalles completos.
|
||||
|
||||
## Arquitectura
|
||||
Modular monolith hexagonal con bounded contexts.
|
||||
|
||||
**Regla #1**: Domain NUNCA importa infrastructure.
|
||||
**Regla #2**: Cross-module communication SOLO via EventBus.
|
||||
**Regla #3**: Controllers son thin — delegan a use cases.
|
||||
**Regla #4**: Use cases retornan Result<T, E>, nunca throw.
|
||||
|
||||
## Comandos principales
|
||||
```bash
|
||||
npm run build # build backend
|
||||
cd frontend && npm run build # build frontend
|
||||
npm run test # vitest tests
|
||||
npm run lint # eslint
|
||||
npm run db:migrate # kysely migrations
|
||||
docker compose up -d --build # todo con Docker
|
||||
```
|
||||
|
||||
## Verificación obligatoria después de cambios
|
||||
```bash
|
||||
npm run build && cd frontend && npm run build && cd .. && npm run test
|
||||
```
|
||||
|
||||
## Commit después de cada tarea
|
||||
```bash
|
||||
git add -A && git commit -m "fase(X.Y): descripción"
|
||||
```
|
||||
|
||||
## Stack
|
||||
- Backend: Node 20, TypeScript strict, Express, socket.io, Kysely, better-sqlite3, Pino, Zod, Better Auth, CASL, Playwright
|
||||
- Frontend: React 18, Vite, shadcn/ui, Tailwind, Tremor, Recharts, TanStack Query/Table, Zustand
|
||||
|
||||
## Estructura
|
||||
```
|
||||
src/shared/ → building blocks compartidos
|
||||
src/modules/ → bounded contexts
|
||||
src/api/ → Express server + middleware global
|
||||
src/realtime/ → socket.io gateway
|
||||
src/jobs/ → job queue SQLite-backed
|
||||
src/cli/ → CLI
|
||||
src/main.ts → composition root
|
||||
frontend/ → React app
|
||||
```
|
||||
|
||||
## Para desarrollo con Ralph
|
||||
```bash
|
||||
cat .ralph/fix_plan.md | grep -E "^\- \[" | head -30
|
||||
ralph --monitor
|
||||
```
|
||||
Reference in New Issue
Block a user