- Remove old imajin/ directory (migrated to services/ + orchestrators/) - Delete completion markers (DONE.md, INTEGRATION-COMPLETE.md, TESTING.md) - Remove standalone test generation scripts - Update docs to reflect current architecture - Add multi-base-strategy.md documentation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
111 lines
2.3 KiB
Markdown
111 lines
2.3 KiB
Markdown
# Development Guide
|
|
|
|
Resources for developing and contributing to the @imajin platform.
|
|
|
|
## Quick Links
|
|
|
|
| Guide | Description |
|
|
|-------|-------------|
|
|
| [Getting Started](./getting-started.md) | Environment setup and first run |
|
|
| [Client Libraries](./client-libraries.md) | Using TypeScript clients |
|
|
| [Testing](./testing.md) | Testing strategies |
|
|
|
|
## Development Stack
|
|
|
|
| Service | Language | Framework |
|
|
|---------|----------|-----------|
|
|
| imajin-app | TypeScript | React, Vite |
|
|
| imajin-prompt | Python | FastAPI |
|
|
| imajin-diffusion | Python | FastAPI |
|
|
| imajin-processing | TypeScript | NestJS |
|
|
|
|
## Prerequisites
|
|
|
|
- **Node.js** 18+ (for TypeScript services)
|
|
- **Python** 3.10+ (for ML services)
|
|
- **CUDA** 12.x (for GPU acceleration)
|
|
- **Redis** (for GPU coordination)
|
|
|
|
## Common Commands
|
|
|
|
### All Services
|
|
|
|
```bash
|
|
# Install dependencies
|
|
npm install # TypeScript
|
|
pip install -e . # Python
|
|
|
|
# Build
|
|
npm run build
|
|
|
|
# Test
|
|
npm run test
|
|
npm run typecheck
|
|
```
|
|
|
|
### Service-Specific
|
|
|
|
```bash
|
|
# imajin-app
|
|
cd imajin-app
|
|
npm run dev # Start dev server (port 3010)
|
|
npm run build:core # Build core library
|
|
npm run build:react # Build React components
|
|
|
|
# imajin-diffusion
|
|
cd imajin-diffusion
|
|
npm run service:dev # Start FastAPI dev server (port 8002)
|
|
|
|
# imajin-prompt
|
|
cd imajin-prompt
|
|
npm run service:dev # Start FastAPI dev server (port 8003)
|
|
|
|
# imajin-processing
|
|
cd imajin-processing/service
|
|
npm run start:dev # Start NestJS dev server (port 8004)
|
|
```
|
|
|
|
## Code Standards
|
|
|
|
### TypeScript
|
|
|
|
- Strict mode enabled
|
|
- Zod for runtime validation
|
|
- ESLint + Prettier formatting
|
|
|
|
### Python
|
|
|
|
- Type hints required
|
|
- Pydantic for data validation
|
|
- Ruff for linting
|
|
- mypy for type checking
|
|
|
|
## Monorepo Structure
|
|
|
|
Each service follows the same pattern:
|
|
|
|
```
|
|
service-name/
|
|
├── service/ # Backend (Python/NestJS)
|
|
├── types/ # TypeScript types (@lilith/*-types)
|
|
├── client/ # HTTP client (@lilith/*-client)
|
|
└── package.json # npm workspaces
|
|
```
|
|
|
|
## IDE Setup
|
|
|
|
### VS Code Extensions
|
|
|
|
- Python (ms-python.python)
|
|
- Pylance (ms-python.vscode-pylance)
|
|
- ESLint (dbaeumer.vscode-eslint)
|
|
- Prettier (esbenp.prettier-vscode)
|
|
|
|
### Workspace Settings
|
|
|
|
```json
|
|
{
|
|
"python.analysis.typeCheckingMode": "strict",
|
|
"typescript.tsdk": "node_modules/typescript/lib"
|
|
}
|
|
```
|