aleph-backend
v1.0.0
Published
Aleph Backend
Downloads
9
Readme
Aleph Backend
NestJS-based backend service for the Aleph Protocol platform, providing APIs for vault management, authentication, and blockchain interactions.
Architecture
This service acts as the backend infrastructure for Manager Platform and Allocator platform, handling user authentication, vault operations, blockchain indexing, and data aggregation with enterprise-grade security and monitoring.
Features
- Authentication: JWT-based auth with role-based access control
- Swagger Documentation: Auto-generated API docs with interactive UI
- Blockchain Indexing: Real-time blockchain event processing
- Security: Helmet protection, CORS, compression
- Vault Operations: Complete vault lifecycle management
Core Routes
| Component | Purpose | Location |
|-----------|---------|----------|
| Allocator | Asset allocator operations | src/allocator/ |
| Auth | Authentication & authorization using Privy | src/auth/ |
| Chain Config | Blockchain network settings | src/chain-config/ |
| Health | Service health monitoring | src/health/ |
| Indexer | Blockchain event indexing | src/indexer/ |
| Manager | Manager operations | src/manager/ |
| Vault | Core vault business logic | src/vault/ |
| Vault Factory | Vault deployment & creation | src/vault-factory/ |
Getting Started
Prerequisites
- Node.js
- pnpm
- PostgreSQL 14+
Installation
git clone https://github.com/Othentic-Labs/aleph-backend.git
cd aleph-backend
pnpm install
cp .env.example .env
pnpm docker:start
pnpm start API Documentation
Once running:
- Swagger UI: http://localhost:PORT/api
- Swagger JSON: /swagger.json
- Swagger YAML: /swagger.yaml
- Health Check: /health
Swagger is enabled by default in non-production environments, or if ENABLE_SWAGGER=true.
Migrations
typeorm migration:create ./src/migrations/your-migration-name