EmofyEmofy Developers
Domains

Domains Overview

The map of every functional area in the platform, and the rule that decides what lives in core vs. an EMA.

The backend is organized into domains — folders under apps/backend/src/modules/, each mapping to a slice of the core database. This page is the map; the following pages drill into the most important ones.

The rule: core vs. EMA

Before the map, the rule that governs it (ADR-003):

Core holds institution-agnostic interaction channels. Everything domain-specific is an EMA.

  • Core = feed, messaging, tasks, timeline, notifications, organizations. These are the same whether you're a daycare or a high school.
  • EMA = attendance, gradebooks, behavior tracking, library, transport, parent dashboards… anything specific to a kind of institution.

This keeps the core small and lets different institution types run on the same foundation with different EMA sets. See The EMA ecosystem.

Some domains below (e.g. academic) exist in the backend today even though, by ADR-003, much of that surface is intended to be delivered through EMAs over time. When in doubt about where a new feature belongs, default to an EMA.

The domain map

DomainKey sub-modulesWhat it covers
corefeed, messaging, tasks, timeline, organizations, user-reportsDaily interaction channels. → details
academicstudents, teachers, courses, grades, attendance, enrollments, OneRosterStudent-information-system operations. → details
student-lifeachievements, behaviour, clubs, career, health-recordsThe non-academic student experience.
familychildren, members, pickup, consent, passportGuardian relationships + the development passport. → details
peopleprofiles, onboarding, roles, directory, groupsMember management within an org.
communicationannouncements, broadcast, templatesBulk/orchestrated messaging on top of core channels.
notificationschannels, digest, in-app, pushDelivery of events to users.
productivityautomations, mindmaps, canvas, lesson-plannerIndividual/team authoring tools.
time-managementappointments, shifts, timesheets, leave, check-inScheduling and staff attendance.
financebilling, payments, invoices, scholarships, accountingMoney flow.
asset-managementfacilities, assets, library, dormitory, transportPhysical resources.
security / health / supportguest-book, clinic, cafeteria…Operational safety, health, and catering.
contentchangelog, blog, subscribersPlatform content.
platformapps, api-keys, webhooks, app-builds, feature-flagsThe EMA ecosystem and ops. → details
legaldocuments, consentsKVKK/GDPR consent and agreements.
auditpartitioned event logImmutable who-did-what-when.
intelligenceai-insights, ai-query-logsAI insights (conditionally enabled).

How a domain is shaped

Every domain follows the same internal skeleton, so once you've read one you can navigate any of them:

modules/<domain>/<feature>/
├── <feature>.module.ts        wiring
├── <feature>.controller.ts    routes + DTO validation + @RequirePermission
├── <feature>.service.ts       business logic
├── <feature>.repository.ts    extends OrgScopedRepository
└── dto/                       request/response DTOs

Tenant scoping, ID generation, side effects, and validation all follow the platform-wide conventions described in Backend and API conventions.

Next

On this page