How akazdayo/disco-chan works
Main Components
a. Frontend Layer:
• Astro Pages (src/pages/)
• React Components (src/components/)
• UI Components (src/components/ui/)
• Layouts (src/layouts/)
b. Authentication Layer:
• Discord OAuth Integration
• Auth Components (src/components/auth/)
c. Backend Layer:
• API Routes (src/pages/api/)
• Database Layer (Prisma)
Client-Side Flow
• User Browser -> Astro Pages -> React Components -> API Endpoints
Authentication Flow
• User -> Discord OAuth -> Auth Components -> Database
Data Flow
• UI Components -> API Routes -> Prisma Client -> Database
Specific Implementation Details
• 🟦 Blue rectangles for Astro pages and layouts
• 🟨 Yellow rectangles for React components
• 🟩 Green rectangles for API endpoints
• 🟪 Purple database symbol for Prisma/Database
• 🟥 Red rectangle for Discord OAuth
Component Relationships
• Posts flow (Timeline -> Post -> Reactions)
• Authentication flow (LoginButton -> Discord -> Database)
• Data mutations (API routes -> Database)
Technical Stack Highlights
• Astro for page rendering
• React for interactive components
• Prisma for database ORM
• Discord for authentication
• Tailwind CSS for styling
Key Features to Emphasize
• Post Management
• Reaction System
• Authentication
• User Management
Specific Guidelines:
In the Frontend section, create subsections for
• Pages (index.astro, afterlogin.astro, etc.)
• Components (posts, auth, ui)
In the API Layer, show
• API routes (addreaction.ts, logout.ts, submit.ts)
• Auth handlers
In the Database section, show
• Prisma schema
• Database tables