Backend API service for Readmigo - AI-powered English reading companion.
- Framework: NestJS
- Database: PostgreSQL (Neon)
- ORM: Prisma
- Cache: Redis (Upstash)
- Storage: Cloudflare R2
- AI Providers: OpenAI, Anthropic Claude, Deepseek, Qwen (see AI_FEATURES.md)
├── src/
│ ├── common/ # Shared utilities, guards, interceptors
│ ├── modules/ # Feature modules
│ │ ├── ai/ # AI services (word explain, translate, etc.)
│ │ ├── auth/ # Authentication (JWT, OAuth)
│ │ ├── books/ # Book management
│ │ ├── reading/ # Reading progress tracking
│ │ ├── vocabulary/ # Vocabulary learning
│ │ └── ...
│ └── i18n/ # Internationalization
├── packages/
│ ├── database/ # Prisma schema and migrations
│ └── shared/ # Shared types and constants
└── scripts/ # Data processing scripts
| Environment | URL |
|---|---|
| Production | https://readmigo-api.fly.dev |
# Install dependencies
pnpm install
# Setup environment
cp .env.example .env
# Run database migrations
pnpm prisma migrate dev
# Start development server
pnpm devDeployment is automated via GitHub Actions. Push to main branch triggers production deployment.
# Manual deployment (if needed)
fly deploy -c fly.production.toml