How cos301-se-2024/writeme works
Main System Components
a) Frontend Layer:
• Next.js application (apps/writeme)
• UI Component Library (wmc directory)
• Storybook for component documentation
• Progressive Web App capabilities (evident from public/sw.js)
b) Backend Layer:
• API Routes (/app/api/*)
• Authentication System (NextAuth)
• Database Layer (using Drizzle ORM)
• ML Backend (Python-based, in ml-backend directory)
c) External Services:
• AWS Infrastructure
• Cloudflare Services
• Party Kit for real-time collaboration
Key Architectural Patterns
a) Microservices Architecture:
• Main Next.js application service
• ML service for NLP features
• Real-time collaboration service
b) Data Flow Patterns:
• User authentication flow
• Story creation and collaboration flow
• AI assistance integration
• Real-time updates flow
Specific Components
Frontend:
[User Interface Layer]
• Story Editor
• Collaboration Tools
• User Dashboard
• Community Features
Backend:
[API Layer]
• Auth Services
• Story Management
• User Management
• Collaboration Services
[Data Layer]
• Database (Drizzle)
• File Storage
[ML Services]
• NLP Processing
Integration Points
Clear connections between:
• Frontend and API endpoints
• Real-time collaboration system
• ML backend integration
• Authentication flow
• Database interactions