Skip to content

Codebase Map

agora-tutoring-api/
src/
api/
modules/ # business domains (user, post, chat, payment, etc.)
loaders/ # batching/caching support for resolvers
directives/ # GraphQL custom directives
scalars/ # GraphQL scalar implementations
schema.js # assembled GraphQL schema
database/
models/ # data models
plugins/ # model plugins/hooks
validators/ # validation rules
jobs/ # background job logic
webhooks/ # external callback handlers (Stripe, Jira)
helpers/ # domain helper utilities
utilities/ # shared utility functions
templates/ # email templates
index.js # app bootstrap
  • viewer and user: authentication/account profile behavior
  • post and pin: listing/discovery content
  • chat and message: real-time communication features
  • payment and subscription-plan: billing and subscription flows
  • reportBug, reportSafety, contact: support and operations workflows

Typical resolver flow:

  1. Resolver receives GraphQL request.
  2. Resolver uses loaders/helpers/models.
  3. Model and plugin logic executes.
  4. Response is shaped and returned to client.

This pattern keeps GraphQL concerns separate from data-layer implementation details.