How devlulcas/coatiquati works
High-Level Architecture Components
a) Frontend Layer:
• Next.js App Router-based frontend (src/app directory)
• Client-side components and pages
• UI components (src/shared/components/ui)
b) Backend Layer:
• Next.js API routes (src/app/api)
• Authentication system (Lucia)
• Email service (AWS SES)
• File storage (AWS S3)
c) Database Layer:
• Turso Database (SQLite-based)
• Drizzle ORM integration
Core Module Organization
Create distinct sections for the main functional modules:
a) Authentication & User Management:
• User authentication (src/modules/auth)
• User profiles (src/modules/user)
• User following system (src/modules/user-followings)
b) Content Management:
• Trails system (src/modules/trail)
• Topics management (src/modules/topic)
• Content types:
• Rich text (src/modules/rich-text-content)
• Images (src/modules/image-content)
• Videos (src/modules/video-content)
c) Social Features:
• Comments system (src/modules/comments)
• Publications (src/modules/publication)
• Feedback system (src/modules/feedback)
Key Flows to Highlight
Important processes:
a) Authentication Flow:
• Sign-up/Sign-in process
• Email verification
• Session management
b) Content Creation Flow:
• Trail creation
• Topic management
• Content publication process
c) Social Interaction Flow:
• Comment system
• User following
• Content voting
External Services Integration
Integration points:
a) AWS Services:
• S3 for file storage
• SES for email delivery
b) Database:
• Turso connection
• Migration system
Security Layer
Security implementations:
• Authentication middleware
• Role-based access control
• API route protection