feat(chat): integrate chat project into monorepo with full app structure

- Restructure chat as apps/mobile, apps/web, apps/landing, backend
- Add NestJS backend for secure Azure OpenAI API calls
- Remove exposed API key from mobile app (security fix)
- Add shared chat-types package
- Create SvelteKit web app scaffold
- Create Astro landing page scaffold
- Update pnpm workspace configuration
- Add project-level CLAUDE.md documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Till-JS 2025-11-25 13:48:24 +01:00
parent fcf3a344b1
commit c638a7ffee
155 changed files with 22622 additions and 348 deletions

View file

@ -0,0 +1,41 @@
import { Body, Controller, Get, Param, Post, Query } from '@nestjs/common';
import { ConversationService } from './conversation.service';
@Controller('conversations')
export class ConversationController {
constructor(private readonly conversationService: ConversationService) {}
@Get()
async getConversations(@Query('userId') userId: string) {
return this.conversationService.getConversations(userId);
}
@Get(':id')
async getConversation(@Param('id') id: string) {
return this.conversationService.getConversation(id);
}
@Get(':id/messages')
async getMessages(@Param('id') id: string) {
return this.conversationService.getMessages(id);
}
@Post()
async createConversation(
@Body() body: { userId: string; modelId: string; title?: string },
) {
return this.conversationService.createConversation(
body.userId,
body.modelId,
body.title,
);
}
@Post(':id/messages')
async addMessage(
@Param('id') id: string,
@Body() body: { sender: 'user' | 'assistant' | 'system'; messageText: string },
) {
return this.conversationService.addMessage(id, body.sender, body.messageText);
}
}