Memetroplis ProductionGuideReference

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.js

      enables read/write to smart contracts (token transfers, NFT mints, etc).

    • Solana:

      @solana/web3.js

      and

      Anchor

      enable 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/terminus handles health-check endpoints (DB, Redis, etc).

  • Task Scheduler:

    • Jobs like refreshing blockchain states or purging expired caches handled by NestJS Scheduler.

10. Dependencies

Backend Repo Dependencies