Initial Ralph scaffold
This commit is contained in:
27
agent_docs/code_patterns.md
Normal file
27
agent_docs/code_patterns.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Code Patterns
|
||||
|
||||
## Project Conventions
|
||||
|
||||
|
||||
### TypeScript Guidelines
|
||||
|
||||
- Use strict mode
|
||||
- No `any` types
|
||||
- Use interfaces for object shapes
|
||||
- Use type guards for narrowing
|
||||
- Export types from `types/index.ts`
|
||||
|
||||
### API Patterns
|
||||
|
||||
- Use middleware for cross-cutting concerns
|
||||
- Validate all input
|
||||
- Return consistent error responses
|
||||
- Use proper HTTP status codes
|
||||
- Log all requests
|
||||
|
||||
## Error Handling
|
||||
|
||||
- Always catch and handle errors
|
||||
- Log errors with context
|
||||
- Return user-friendly messages
|
||||
- Never expose internal details
|
||||
51
agent_docs/tech_stack.md
Normal file
51
agent_docs/tech_stack.md
Normal file
@@ -0,0 +1,51 @@
|
||||
# Tech Stack Decisions
|
||||
|
||||
# Tech Stack
|
||||
|
||||
- **Language**: TypeScript
|
||||
- **Runtime**: Node.js 20
|
||||
- **Framework**: NestJS 10
|
||||
- **Testing**: Jest (backend), Vitest (frontend)
|
||||
- **Build Tool**: Docker Compose, pnpm workspaces, tsup
|
||||
|
||||
## Libraries
|
||||
|
||||
- TypeORM
|
||||
- PostgreSQL
|
||||
- @nestjs/jwt
|
||||
- @nestjs/passport
|
||||
- @nestjs/websockets
|
||||
- @nestjs/platform-socket.io
|
||||
- @nestjs/schedule
|
||||
- @nestjs/config
|
||||
- class-validator
|
||||
- class-transformer
|
||||
- bcrypt
|
||||
- date-fns
|
||||
- ical.js
|
||||
- node-caldav
|
||||
- @microsoft/microsoft-graph-client
|
||||
- imap
|
||||
- axios
|
||||
- bull
|
||||
- ioredis
|
||||
- helmet
|
||||
- express-rate-limit
|
||||
- React 18
|
||||
- Vite 5
|
||||
- React Router
|
||||
- TanStack Query (React Query)
|
||||
- Zustand
|
||||
- FullCalendar
|
||||
- react-beautiful-dnd
|
||||
- socket.io-client
|
||||
- date-fns
|
||||
- React Hook Form
|
||||
- Zod
|
||||
- TailwindCSS
|
||||
- Radix UI
|
||||
|
||||
|
||||
## Rationale
|
||||
|
||||
TypeScript provides type safety across full stack for complex scheduling logic and GTD workflows. NestJS offers robust REST API structure, dependency injection for external integrations (CalDAV, ConnectWise, IMAP, Microsoft Graph), scheduled jobs for recurring reviews, and WebSocket support. React with a calendar library (FullCalendar or react-big-calendar) handles the interactive drag-drop week view. PostgreSQL over SQLite for better concurrency with multiple capture sources and complex scheduling queries. Docker Compose orchestrates backend, database, and frontend nginx container for simple self-hosted deployment.
|
||||
41
agent_docs/testing.md
Normal file
41
agent_docs/testing.md
Normal file
@@ -0,0 +1,41 @@
|
||||
# Testing Guide
|
||||
|
||||
## Framework
|
||||
|
||||
Jest (backend), Vitest (frontend)
|
||||
|
||||
## Test Structure
|
||||
|
||||
```
|
||||
tests/
|
||||
├── unit/ # Unit tests
|
||||
├── integration/ # Integration tests
|
||||
└── e2e/ # End-to-end tests
|
||||
```
|
||||
|
||||
## Running Tests
|
||||
|
||||
|
||||
```bash
|
||||
# Run all tests
|
||||
npm run test
|
||||
|
||||
# Run with coverage
|
||||
npm run test -- --coverage
|
||||
|
||||
# Run specific test file
|
||||
npm run test -- path/to/test.ts
|
||||
```
|
||||
|
||||
## Coverage Requirements
|
||||
|
||||
- Minimum 80% coverage
|
||||
- All public APIs must be tested
|
||||
- All error paths must be tested
|
||||
|
||||
## Test Patterns
|
||||
|
||||
- Arrange-Act-Assert pattern
|
||||
- One assertion per test when possible
|
||||
- Descriptive test names
|
||||
- Mock external dependencies
|
||||
Reference in New Issue
Block a user