graph LR
Application_Bootstrapper["Application Bootstrapper"]
Router_Middleware_Initializer["Router & Middleware Initializer"]
Resource_Loader["Resource Loader"]
Authentication_Service["Authentication Service"]
Form_Resource["Form Resource"]
Submission_Resource["Submission Resource"]
Form_Data_Model["Form Data Model"]
Unclassified["Unclassified"]
Application_Bootstrapper -- "initializes" --> Router_Middleware_Initializer
Router_Middleware_Initializer -- "uses" --> Authentication_Service
Router_Middleware_Initializer -- "loads" --> Resource_Loader
Resource_Loader -- "mounts" --> Form_Resource
Resource_Loader -- "mounts" --> Submission_Resource
Form_Resource -- "uses" --> Form_Data_Model
Submission_Resource -- "interacts with" --> Form_Resource
The system's entry point is the Application Bootstrapper in index.js, which initializes an Express router. This Router & Middleware Initializer configures the application by attaching essential services, including the Authentication Service for security and the Resource Loader for defining API endpoints. The Resource Loader dynamically mounts specific handlers like the Form Resource and Submission Resource, which are responsible for CRUD operations on their respective data entities. These resources interact with the MongoDB database through their corresponding data models, such as the Form Data Model, to process and persist data, forming a robust, API-driven backend for a form management system.
The application's main entry point. It configures and initializes the Express.js server, database connections, and core application settings.
Related Classes/Methods:
Initializes and configures the Express router with essential middleware for handling CORS, authentication tokens, permissions, and request parameters. It orchestrates the entire request-response lifecycle.
Related Classes/Methods:
A central module that dynamically loads and mounts all API resource endpoints (like Forms and Submissions) onto the Express router, making them available for client interaction.
Related Classes/Methods:
Manages user authentication and authorization. It provides middleware and handlers for user login, session management (tokens), and access control for protected API endpoints.
Related Classes/Methods:
Provides the API endpoints for all form-related operations. It handles creating, reading, updating, and deleting form definitions and relies on the Form Data Model for database interaction.
Related Classes/Methods:
Provides the API endpoints for managing form submission data. It is responsible for handling the creation, retrieval, and deletion of submission records for a given form.
Related Classes/Methods:
Defines the database schema for a form. It is the underlying data structure that the Form Resource uses to store and retrieve form designs and their properties from MongoDB.
Related Classes/Methods:
Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)
Related Classes/Methods: None