mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 21:41:09 +02:00
Adds a NestJS service that delivers Umami analytics via Telegram: - Telegram commands: /start, /stats, /today, /week, /realtime, /users - Scheduled reports: Daily at 9:00, Weekly on Monday at 9:00 - Umami API integration with token management - User statistics from auth database - Docker + CI/CD pipeline integration Bot: @stats_mana_bot Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
36 lines
1 KiB
TypeScript
36 lines
1 KiB
TypeScript
import { Module } from '@nestjs/common';
|
|
import { ConfigModule, ConfigService } from '@nestjs/config';
|
|
import { ScheduleModule } from '@nestjs/schedule';
|
|
import { TelegrafModule } from 'nestjs-telegraf';
|
|
import configuration from './config/configuration';
|
|
import { BotModule } from './bot/bot.module';
|
|
import { UmamiModule } from './umami/umami.module';
|
|
import { AnalyticsModule } from './analytics/analytics.module';
|
|
import { SchedulerModule } from './scheduler/scheduler.module';
|
|
import { HealthController } from './health.controller';
|
|
|
|
@Module({
|
|
imports: [
|
|
ConfigModule.forRoot({
|
|
isGlobal: true,
|
|
load: [configuration],
|
|
}),
|
|
ScheduleModule.forRoot(),
|
|
TelegrafModule.forRootAsync({
|
|
imports: [ConfigModule],
|
|
useFactory: (configService: ConfigService) => ({
|
|
token: configService.get<string>('telegram.botToken') || '',
|
|
launchOptions: {
|
|
dropPendingUpdates: true,
|
|
},
|
|
}),
|
|
inject: [ConfigService],
|
|
}),
|
|
BotModule,
|
|
UmamiModule,
|
|
AnalyticsModule,
|
|
SchedulerModule,
|
|
],
|
|
controllers: [HealthController],
|
|
})
|
|
export class AppModule {}
|