Framework Templates
APSO supports multiple backend frameworks. Choose the one that best fits your teamβs expertise and project requirements.
Available Frameworks
Production-ready NestJS with TypeORM
TypeScript (NestJS)High-performance async Python API
Python (FastAPI) -- Coming SoonLightweight and fast Go API
Go (Gin) -- Coming SoonTypeScript (NestJS) is the only stable language template today. Python and Go support is coming soon.
Framework Comparison
| Feature | TypeScript | Python | Go |
|---|---|---|---|
| Framework | NestJS | FastAPI | Gin |
| ORM | TypeORM | SQLAlchemy | GORM |
| Async | Yes | Yes | Goroutines |
| Type Safety | Full | Optional | Full |
| Performance | High | High | Very High |
| Ecosystem | Large | Large | Growing |
| Status | Stable | Coming soon | Coming soon |
Choosing a Framework
TypeScript (NestJS)
Best for:
- Teams with JavaScript/TypeScript experience
- Complex enterprise applications
- Full-stack JavaScript stacks
- Strong typing requirements
Python (FastAPI)
Best for:
- Data science teams
- Machine learning integrations
- Quick prototyping
- Teams with Python experience
Go (Gin)
Best for:
- High-performance requirements
- Microservices architectures
- Resource-constrained environments
- Teams with Go experience
Generated Code Structure
All frameworks follow a similar structure:
src/
βββ entities/ # Database entities
βββ modules/ # Feature modules
β βββ {entity}/
β β βββ controller # HTTP handlers
β β βββ service # Business logic
β β βββ dto/ # Data transfer objects
βββ extensions/ # Your custom code
βββ config/ # Configuration
βββ main.* # Entry pointCustomization
All generated code is yours to customize:
- Extensions Pattern β Add custom endpoints without modifying generated code
- Partial Generation β Regenerate only what you need
- Eject Mode β Take full control of the codebase
Framework-Specific Features
TypeScript Features
- Decorators for routing and validation
- Dependency injection
- Swagger/OpenAPI auto-generation
- Jest testing setup
Python Features
- Pydantic models for validation
- Async/await throughout
- Auto-generated OpenAPI docs
- pytest configuration
Go Features
- Middleware support
- Struct tags for validation
- Swagger generation
- Go testing utilities
Switching Frameworks
Currently, switching frameworks requires creating a new service. Your schema (.apsorc) is framework-agnostic and can be reused.
Related
Last updated on