How ariiellus/eth-trifecta works
Main Components
a. Frontend (User Interface):
• Represented by the Next.js part of the project under the “src/app” directory.
• Includes pages (login, dashboard for agent/mentor/student, service listings), UI components, and providers.
• Different operating modes are supported (terminal, Telegram, chat mode, demo mode).
b. API Layer & Server Controllers:
• The “src/app/api” folder comprises RESTful API endpoints for “recall”, “users” (with sub-routes for bookings, payments, services, stats), etc.
• On the backend side, “src/server/controllers” includes controllers for bookings, payments, transcripts, and user management.
• Services under “src/services” provide business logic for managing bookings, payments, and service processing.
c. Backend and Action Providers:
• The “src/backend” folder houses the business logic closely related to blockchain actions and integrations.
• Within “src/backend/src/action-providers”, there are multiple sub-folders for various functionalities such as ERC20 escrow, Moderia mediation, Otter AI quality verification, recall protocol testing, recall test, and service marketplace.
• These action providers encapsulate interactions with external systems (blockchain, recall network, and Otter AI) and include testing modules as well.
d. Database & Secure Data Storage:
• The README details a database schema with collections for services, bookings, reviews, transactions, and meetings.
• Secure data storage is implemented using Recall Network / Nillion DB (as indicated by environment variables and schema details).
Relationships and Interactions
• How user actions (like creating a service, booking, or payment) trigger calls to API endpoints. For example, the frontend API routes (under “src/app/api”) communicate with the server controllers (in “src/server/controllers”) and then with services (in “src/services”).
• Interaction between the backend and the various action providers (ERC20 Escrow, Otter AI, Moderia, etc.). These providers interact with external systems (blockchain networks, Recall Network, and Telegram for chat modes).
• Secure data storage, which is used for storing sensitive service metadata, transaction history, meeting transcripts, and dispute data.
Incorporate Architectural Patterns and Technologies
• Separation of concerns: Frontend (UI/UX via Next.js), Backend (API endpoints and controllers), Business Logic (action providers), and External Integrations (blockchain, Recall Network, Otter AI).
• Backend Services & Action Providers (e.g., modules grouped together)
• Clear labels for each component:
• "Next.js Frontend" with pages like login, dashboard, and service listing.
• "API Gateway" that exposes endpoints (recall, users, etc.) to handle data flow.
• "Server Controllers & Business Services" that process requests and coordinate actions (booking, payment, meeting transcription).
• "Action Providers" for specific tasks like ERC20 Escrow, Moderia mediation, Otter AI analysis, etc.
• "Database / Secure Storage" representing Recall Network or Nillion DB where transactional and quality data is stored.
• "External Integrations" pointing to Blockchain (Base Sepolia), Otter AI, and possibly Telegram.
• Client → Frontend UI → API Endpoint → Controller/Service → Action Provider → External Systems → Database.
• For example, from the “ERC20 Escrow” provider to “Blockchain Network” and then back to update payment status.