9. Application Architecture Overview
Key Components
MemeTropolis backend is structured as a modular service-based backend, with key roles divided cleanly:
Key Components
-
Authentication Layer:
-
JWT-based authentication using
passport-jwt.
-
Session and token management stored temporarily in cache/Redis.
-
-
Blockchain Interaction:
-
Ethereum:
ethers.jsenables read/write to smart contracts (token transfers, NFT mints, etc).
-
Solana:
@solana/web3.jsand
Anchorenable transactions with Solana programs.
-
-
Database:
-
ORM via Prisma connecting to relational DB.
-
Migrations and schema management using
prisma migrate.
-
-
Caching:
-
Responses, sessions, and frequently queried data cached with Redis.
-
-
GraphQL API:
-
Apollo client (and likely server) exposes flexible data fetching beyond REST.
-
-
REST API:
-
Exposed via standard NestJS controllers and services.
-
-
Monitoring/Health Check:
-
@nestjs/terminushandles health-check endpoints (DB, Redis, etc).
-
-
Task Scheduler:
-
Jobs like refreshing blockchain states or purging expired caches handled by NestJS Scheduler.
-
Backend Repo Dependencies