How mendsalbert/zero-to-hero works
Main System Components
a) Frontend Layer
• Next.js Application (App Router structure)
• UI Components
• Client-side Features
b) Backend Layer
• API Routes (implied by Next.js structure)
• Database Integration (indicated by drizzle.config.js)
• Blockchain Integration
c) External Services
• DIMO Integration
• Smart Contract Interactions
• Services
Component Organization
A. Client-Side Components:
• Core Components
• Header
• Sidebar
• UserDashboard
• Feature Components
• DimoEcoScore
• DimoVehicleData
• ContractInteraction
• Map
• UI Components (Shadcn/UI based)
B. Page Routes:
• Main Routes
• Collect
• Leaderboard
• Messages
• Report
• Rewards
• Settings
• Verify
Use these visual elements:
• Rectangles: Core components
• Rounded rectangles: Pages/Routes
• Hexagons: External services
• Clouds: Blockchain/Web3 elements
• Blue: Frontend components
• Green: Backend services
• Purple: Database
• Orange: Blockchain/Smart Contracts
• Yellow: External APIs
Frontend to Backend
User Interface ←→ Next.js API Routes ←→ Database
Blockchain Integration
ContractInteraction Component ←→ Smart Contracts ←→ Blockchain Network
DIMO Integration
DimoVehicleData/DimoEcoScore ←→ DIMO API ←→ Vehicle Data
Technical Stack Elements
• Next.js 13+ (App Router)
• Drizzle ORM
• Tailwind CSS
• Shadcn/UI
• Web3 Integration
• Services
• DIMO SDK/API
[User Interface Layer]
• ↓
[Application Logic Layer]
• ↓
[Data Access Layer]
• ↓
[External Services Layer]