Backend Design
The backend is designed to handle functionalities like API management, user authentication, and analytics, while bridging communication with the blockchain.
Controllers:
agent.controller.ts:
Handles requests related to creating, modifying, and deleting agentssession.controller.ts:
Manages session initialization, participation, and resultsanalytics.controller.ts:
Provides insights into agent and session performance
Services:
agent.service.ts:
Core logic for managing agentssession.service.ts:
Implements session handling, reward calculations, and blockchain interactionsanalytics.service.ts:
Processes and generates statistical reports for users
Middleware:
Authentication: Verifies user tokens for secure access
Logging: Tracks API usage and errors for debugging
Web3 Module:
clients.ts:
Configures the blockchain client (e.g., connecting to Ethereum or Base)transactions/agent.ts:
Handles blockchain interactions for agent creationtransactions/session.ts:
Manages session-specific blockchain operations
Last updated