How xanf-code/afcai-frontend works
Main Components
A. Frontend Layer:
• Client-Side Components (React/Next.js)
• Public Pages (/pages directory)
• Admin Dashboard (/pages/backend/admin)
• UI Components (/components/UI)
• Layout Components (/components/Layout)
• Admin Components (/components/Admin)
B. Data Management Layer:
• GraphQL Layer
• Queries (/graphql/queries)
• Mutations (/graphql/mutations)
• State Management
• Store Components (/store)
C. Static Assets:
• Public Resources
• Data Files (JSON)
• Whitepaper
• Fonts
┌─────────────────────────────────────────────┐
• Client Layer │
• ┌─────────┐ ┌─────────┐ ┌───────────────┐ │
• Pages │ │ UI │ │ Admin │ │
• ┘ └─────────┘ └───────────────┘ │
• ┘
• ↕
┌─────────────────────────────────────────────┐
• Data Access Layer │
• ┌─────────┐ ┌─────────┐ ┌───────────────┐ │
• GraphQL │ │ Stores │ │ Static │ │
• Layer │ │ │ │ Assets │ │
• ┘ └─────────┘ └───────────────┘ │
• ┘
• ↕
┌─────────────────────────────────────────────┐
• External Services │
• ┌─────────────────────────────────────────┐ │
• GraphQL Backend │ │
• ┘ │
• ┘
Component Relationships to Highlight
a. Client Layer:
• How pages connect to UI components
• Admin dashboard structure
• Relationship between Layout and other components
b. Data Layer:
• GraphQL queries/mutations flow
• Store integration with components
• Static asset usage
Additional Elements
• Authentication flow for admin dashboard
• File upload/download mechanisms (CSV downloads)
• Static file serving (whitepaper, images)
• State management flow
Technical Stack Indicators
• Next.js
• GraphQL
• TailwindCSS
• React
External service integration
Remember to:
• Use consistent styling
• Brief descriptions for complex flows
• Both synchronous and asynchronous operations