How derek2403/memest-cutest-platform works
Project’s Type & Purpose
• This project is a unified, full-stack platform that integrates both Web2 and Web3 services into one gamified and visually orchestrated interface.
• It enables users to connect multiple services (like MetaMask, 1inch, Polygon, Celo, Gmail, and Google Sheets) via drag-and-drop workflows and an AI agent that automates tasks.
• The platform is built with Next.js (React) for the frontend, Three.js for 3D visualization, and a backend component (the “mcp-server” directory) that manages event listening, email notifications, and blockchain interactions.
File Structure
• Frontend Code & User Interface:
– The “pages” directory shows several Next.js pages including key files like index.js (for the 3D environment) and API routes under “pages/api.”
– The “components” directory contains diverse React components (e.g., for wallet connections, UI navigation, visuals, and service blocks) that represent each integrated service.
– The “public” directory, along with “gltf,” “public/models,” “public/fbx,” and “public/assets,” holds 3D models and static assets used for the gamified UI.
• Backend/Server:
– The “mcp-server” folder contains the backend logic (server.js, workflow scripts, Dockerfile, and docker-compose.yml) which orchestrates service integrations and custom workflows.
• Utility & Configuration:
– Files like “next.config.mjs,” “tailwind.config.js,” and various JSON configuration files help set up the environment.
– The “utils” folder holds common assets (e.g., ABI definitions) for interacting with blockchain networks.
• Integration & Scripting:
– Several API endpoints in “pages/api” (such as claude-chat.js, parse-workflow.js, send-email.js) handle interactions between the frontend and backend.
A. Frontend (Client Side):
• Next.js UI & Pages:
• Pages like index, events, landing etc.
• React Components:
• Components that encapsulate service-specific logic (e.g., Wallet-related components, Service Blocks like one for 1inch, Polygon, Gmail, etc.).
• Drag-and-drop workflow interface that users interact with.
• 3D Assets & Models:
• Asset directories (“gltf,” “public/models,” “public/fbx”) that feed the 3D gamified interface.
B. Backend (Server Side):
• MCP Server:
• Backend server housed in “mcp-server” with its API endpoints, event listeners, and workflow processing (e.g., handling email notifications, and wallet events).
• Integration points such as Docker (Dockerfile, docker-compose.yml) to show containerization and deployment.
• API Routes:
• “pages/api” endpoints which serve as an orchestration layer linking the frontend to backend operations.
C. External Services & Blockchain Integrations:
• Wallet & Blockchain Services:
• External wallets (MetaMask, RainbowKit) and blockchain networks (Base, Sepolia, Polygon, Celo) connected using libraries like Wagmi, Ethers.js 6, and Viem.
• Web2 Integrations:
• Integrations with Gmail, Google Sheets (Spreadsheet), and other Web2 tools.
• AI-Driven Orchestration:
• A block for the AI agent that uses Anthropic AI SDK to interpret workflow instructions and manage cross-service communication.
Relationships & Data Flow
– From the Frontend (user interactions via the drag-and-drop interface) to API endpoints (in “pages/api”).
– From API endpoints to the Backend MCP server which listens for events and dispatches tasks.
– From the MCP server to the blockchain (via Ethers.js) for wallet event detection.
– Between external services (Gmail, Sheets, DEX aggregators like 1inch) and both the front- and backend layers.
• How the AI agent “walks” between service components to trigger actions.
Architectural Patterns & Design Principles
• Separation of concerns:
– The UI layer is isolated from the backend orchestration layer.
– API endpoints serve as an abstraction for business logic.
• Modular Design:
– Show how components can be replaced or extended (for example, new 3D assets or plugins in the future modular plugin system).
• Event-Driven Integration:
– Indicate how blockchain events, email notifications, and workflow triggers interconnect via the MCP server.