mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-19 05:41:22 +02:00
- Add FraudDetectionService with IP/device fingerprinting, velocity checks, email pattern detection, and review queue management - Add ReferralCronService for retention checks (hourly), daily stats aggregation, rate limit cleanup, and weekly tier recalculation - Add ReferralsAdminController with endpoints for review queue, fraud patterns, and user referral management - Integrate referral initialization into user registration flow (auto-create referral code, initialize tier, apply referral code) - Add @nestjs/schedule dependency for cron jobs - Export referrals schema from db/schema/index.ts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
import { Module } from '@nestjs/common';
|
|
import { ConfigModule } from '@nestjs/config';
|
|
import { ThrottlerModule } from '@nestjs/throttler';
|
|
import { APP_FILTER } from '@nestjs/core';
|
|
import configuration from './config/configuration';
|
|
import { AuthModule } from './auth/auth.module';
|
|
import { CreditsModule } from './credits/credits.module';
|
|
import { FeedbackModule } from './feedback/feedback.module';
|
|
import { ReferralsModule } from './referrals/referrals.module';
|
|
import { SettingsModule } from './settings/settings.module';
|
|
import { AiModule } from './ai/ai.module';
|
|
import { HealthModule } from './health/health.module';
|
|
import { HttpExceptionFilter } from './common/filters/http-exception.filter';
|
|
|
|
@Module({
|
|
imports: [
|
|
ConfigModule.forRoot({
|
|
isGlobal: true,
|
|
load: [configuration],
|
|
}),
|
|
ThrottlerModule.forRoot([
|
|
{
|
|
ttl: 60000, // 60 seconds
|
|
limit: 100, // 100 requests per minute
|
|
},
|
|
]),
|
|
AiModule,
|
|
AuthModule,
|
|
CreditsModule,
|
|
FeedbackModule,
|
|
HealthModule,
|
|
ReferralsModule,
|
|
SettingsModule,
|
|
],
|
|
providers: [
|
|
{
|
|
provide: APP_FILTER,
|
|
useClass: HttpExceptionFilter,
|
|
},
|
|
],
|
|
})
|
|
export class AppModule {}
|