How cleyfe/chaincare works
Main System Components
A. Client Layer (Frontend)
• React/TypeScript frontend with components:
• Core Pages (Dashboard, Vault, Projects, Achievements)
• UI Components Library
• Web3 Integration Components
• State Management & Hooks
B. Server Layer (Backend)
• Node.js server with:
• Authentication Service
• API Routes
• Vite Development Server
C. Database Layer
• PostgreSQL Database with Drizzle ORM
• Key Tables Structure:
• Users & Authentication
• Vault Deposits
• Projects & Distributions
• Rewards & Achievements
D. Blockchain Layer
• Base Network Integration
• Smart Contracts for Vaults
• Dynamic.xyz Authentication
• Ethers.js Integration
Component Relationships
Key relationships to highlight:
• Frontend → Backend API calls
• Backend → Database queries
• Frontend → Blockchain interactions
• Authentication flow between Dynamic.xyz, frontend, and backend
Specific Implementation Details
Frontend Section:
┌─ Client Layer ─────────────────┐
• Pages │
• Dashboard │
• Vault │
• Projects │
• Components │
• UI Library │
• Custom Components │
• Hooks & Utils │
• ┘
Backend Section:
┌─ Server Layer ────────────────┐
• Authentication │
• API Routes │
• Vite Server │
• ┘
External Integrations
External service integrations:
• Dynamic.xyz Authentication
• Base Network
• PostgreSQL Database
Data Flow Patterns
Data flows:
• User authentication process
• Vault deposit/withdrawal flow
• Impact tracking metrics
• Achievement unlocking process