mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-28 02:37:43 +02:00
✨ feat: add mana-api-gateway for monetizing core services
Implement custom NestJS API Gateway for mana-search, mana-stt, and mana-tts: - API Key management with CRUD operations and key regeneration - Redis-based sliding window rate limiting - Credit-based billing with tier support (free, pro, enterprise) - Usage tracking with daily aggregates - Proxy services to backend microservices - Prometheus metrics endpoint - JWT auth for management API, API key auth for public API Database schema uses separate `api_gateway` schema in shared manacore DB.
This commit is contained in:
parent
fbd315eac0
commit
6f1b2654f1
48 changed files with 2507 additions and 0 deletions
27
services/mana-api-gateway/src/app.module.ts
Normal file
27
services/mana-api-gateway/src/app.module.ts
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import { Module } from '@nestjs/common';
|
||||
import { ConfigModule } from '@nestjs/config';
|
||||
import configuration from './config/configuration';
|
||||
import { DatabaseModule } from './db/database.module';
|
||||
import { HealthModule } from './health/health.module';
|
||||
import { ApiKeysModule } from './api-keys/api-keys.module';
|
||||
import { UsageModule } from './usage/usage.module';
|
||||
import { ProxyModule } from './proxy/proxy.module';
|
||||
import { CreditsModule } from './credits/credits.module';
|
||||
import { MetricsModule } from './metrics/metrics.module';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
ConfigModule.forRoot({
|
||||
isGlobal: true,
|
||||
load: [configuration],
|
||||
}),
|
||||
DatabaseModule,
|
||||
HealthModule,
|
||||
ApiKeysModule,
|
||||
UsageModule,
|
||||
ProxyModule,
|
||||
CreditsModule,
|
||||
MetricsModule,
|
||||
],
|
||||
})
|
||||
export class AppModule {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue