39 lines
1.5 KiB
TypeScript
39 lines
1.5 KiB
TypeScript
|
|
import { Module } from '@nestjs/common';
|
||
|
|
import { ConfigModule } from '@nestjs/config';
|
||
|
|
import { APP_GUARD } from '@nestjs/core';
|
||
|
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
||
|
|
|
||
|
|
import { AuthModule } from './auth/auth.module.js';
|
||
|
|
import { QuinnSsoGuard } from './auth/quinn-sso.guard.js';
|
||
|
|
import { CacheInvalidateModule } from './common/cache-invalidate.module.js';
|
||
|
|
import { databaseConfig } from './config/database.config.js';
|
||
|
|
import { HealthModule } from './health/health.module.js';
|
||
|
|
import { AgentActionsModule } from './modules/agent-actions/agent-actions.module.js';
|
||
|
|
import { ContentPlansModule } from './modules/content-plans/content-plans.module.js';
|
||
|
|
import { ContentPostsModule } from './modules/content-posts/content-posts.module.js';
|
||
|
|
|
||
|
|
@Module({
|
||
|
|
imports: [
|
||
|
|
ConfigModule.forRoot({
|
||
|
|
isGlobal: true,
|
||
|
|
cache: true,
|
||
|
|
envFilePath: ['.env.local', '.env'],
|
||
|
|
}),
|
||
|
|
TypeOrmModule.forRootAsync(databaseConfig),
|
||
|
|
CacheInvalidateModule,
|
||
|
|
AuthModule,
|
||
|
|
HealthModule,
|
||
|
|
// V4 domain modules — add new modules here as they land.
|
||
|
|
// P0 ships content-plans + content-posts + agent-actions (the verification-gate trio).
|
||
|
|
// P1+ adds: users, orgs, personas, content-assets, engagement-events.
|
||
|
|
ContentPlansModule,
|
||
|
|
ContentPostsModule,
|
||
|
|
AgentActionsModule,
|
||
|
|
],
|
||
|
|
providers: [
|
||
|
|
// Global auth guard. Federates against quinn.sso (v2). Bypassed by @Public()-decorated routes.
|
||
|
|
{ provide: APP_GUARD, useClass: QuinnSsoGuard },
|
||
|
|
],
|
||
|
|
})
|
||
|
|
export class AppModule {}
|