SEAM follows a strict layered architecture that separates concerns into well-defined directories. Every module in the application — users, roles, projects, tasks, grades, and so on — maps to exactly one file in each of theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/TheSerchCp/SEAM/llms.txt
Use this file to discover all available pages before exploring further.
repositories/, services/, and pages/ layers. Learning the layout once gives you a mental model that applies to every module.
Directory tree
Directory responsibilities
| Directory | Responsibility |
|---|---|
js/config/ | Single source of truth for the API base URL (API_BASE). Change it here to point all ApiClient calls at a different backend. |
js/core/ | Framework-level primitives: the hash Router, the EventBus (pub/sub + Socket.io), the ApiClient (fetch wrapper with auth headers), and the OperationListeners map for real-time updates. |
js/layout/ | Shell components. PrivateLayout wraps authenticated pages with the sticky header, collapsible sidebar, and footer. PublicLayout wraps unauthenticated pages. |
js/pages/ | One subdirectory per application module. Each subdirectory contains a single *.page.js file that exports an async function returning an HTML string. |
js/repositories/ | Data-access layer. Each file calls ApiClient directly and exports one function per HTTP operation. No business logic lives here. |
js/services/ | Business-logic layer. Each service file imports from its matching repository and re-exports clean, intention-revealing functions consumed by page files. |
js/shared/ | Reusable UI components (FormModal, Modal, Toast, Table, InputField, …) and utility helpers (FormValidator, Validators, loadCss). |
js/state/ | A single session.state.js module that holds the mutable global session object (user, token, permissions, sidebarItems). |
css/ | Tailwind entry point, the generated tailwind.css output, per-component CSS files, per-layout CSS files, per-page CSS files, and bundled Font Awesome assets. |
Naming conventions
Every module follows a predictable three-file naming pattern:| Layer | File name pattern | Example |
|---|---|---|
| Data access | js/repositories/<module>.repository.js | users.repository.js |
| Business logic | js/services/<module>.service.js | users.service.js |
| View | js/pages/<module>/<module>.page.js | users/users.page.js |
The
css/tailwind.css file is generated automatically by the build:css or build:css:watch scripts. Never edit it by hand — your changes will be overwritten on the next build. Edit css/tailwind-base.css or add Tailwind classes directly in HTML/JS templates instead.