Memetroplis ProductionGuideReference

13. Workflow and Communication Flow

How requests/workflows move through the system**

Here’s how requests/workflows move through the system:

Flow Step

Description

1. Client Request

Users interact with the frontend (Web, Mobile, etc.) by sending API requests (HTTP or GraphQL).

2. Gateway/API

NestJS controller accepts the request; routes it to the relevant service.

3. Auth Middleware

If protected route, JWT Authentication via passport-jwt triggers.

4. Business Logic

Service layer performs logic: querying DB via Prisma, caching results in Redis if needed.

5. Blockchain Interaction

If required, services use Ethers.js (Ethereum) or Solana Web3.js (Solana) to read/write blockchain data.

6. Database Ops

Prisma used for CRUD operations with relational DB.

7. Response

API server returns final response (JSON for REST or data structure for GraphQL).

Scheduled workflows like periodic syncing with blockchain nodes happen asynchronously using @nestjs/schedule.

That’s it folks!

This document was created by GBlock Studios