feat(05-03): calendar backend — model, crypto, source CRUD module

- Add CalendarSource Prisma model with encrypted credentials (AES-256-GCM)
- Create CalendarCryptoService with encrypt/decrypt using CALENDAR_ENCRYPTION_KEY
- Create CalendarController with source CRUD endpoints (GET/POST/PATCH/DELETE)
- Create CalendarService with ownership checks and SSRF URL validation
- Add DTOs with https-only URL validation and class-validator decorators
- Register CalendarModule in AppModule
- Install tsdav, node-ical, ews-javascript-api, @microsoft/microsoft-graph-client
- Stub provider files for Task 2 compilation
This commit is contained in:
2026-06-24 15:09:03 +02:00
parent 7616365cbe
commit 9ec6313f4d
14 changed files with 1114 additions and 6 deletions
+33
View File
@@ -0,0 +1,33 @@
import { Module } from '@nestjs/common';
import { CalendarController } from './calendar.controller';
import { CalendarService } from './calendar.service';
import { CalendarCryptoService } from './crypto.service';
import { CalDAVProvider } from './providers/caldav.provider';
import { ICSProvider } from './providers/ics.provider';
import { ExchangeProvider } from './providers/exchange.provider';
/**
* NestJS module for calendar source management and event aggregation.
*
* Provides:
* - CalendarCryptoService: AES-256-GCM encryption for calendar credentials
* - CalendarService: Source CRUD + event aggregation across providers
* - CalDAVProvider: CalDAV protocol integration via tsdav
* - ICSProvider: ICS file fetch + parse via node-ical
* - ExchangeProvider: Exchange Online (Graph) + Exchange Server (EWS) integration
* - CalendarController: REST API for sources and events
*
* Exports CalendarService for potential use by other modules.
*/
@Module({
controllers: [CalendarController],
providers: [
CalendarService,
CalendarCryptoService,
CalDAVProvider,
ICSProvider,
ExchangeProvider,
],
exports: [CalendarService],
})
export class CalendarModule {}