2.3 KiB
2.3 KiB
Development Guide
Resources for developing and contributing to the @image platform.
Quick Links
| Guide | Description |
|---|---|
| Getting Started | Environment setup and first run |
| Client Libraries | Using TypeScript clients |
| Testing | Testing strategies |
Development Stack
| Service | Language | Framework |
|---|---|---|
| imagen-app | TypeScript | React, Vite |
| imagegen-assistant | Python | FastAPI |
| image-generation | Python | FastAPI |
| image-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
# Install dependencies
npm install # TypeScript
pip install -e . # Python
# Build
npm run build
# Test
npm run test
npm run typecheck
Service-Specific
# imagen-app
cd imagen-app
npm run dev # Start dev server (port 3010)
npm run build:core # Build core library
npm run build:react # Build React components
# image-generation
cd image-generation
npm run service:dev # Start FastAPI dev server (port 8002)
# imagegen-assistant
cd imagegen-assistant
npm run service:dev # Start FastAPI dev server (port 8003)
# image-processing
cd image-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
{
"python.analysis.typeCheckingMode": "strict",
"typescript.tsdk": "node_modules/typescript/lib"
}