# Description of Architecture
There are 3 main types of components in Docgility
# Data Services
Data Services - The storage and maintenance of data is critical for maintainting the state of the application. Data Services are used by the backend application services to store data related to users, documents, and file storage. Data Services include MySQL, MongoDB, and Minio (interface for file storage). For each of the data services, the script deploys open source images for the data services components as a default, but if the organization uses managed services for these data services, Docgility can be modified to access and use the client's managed services instead.
IMPORTANT: When Docgiliy is deployed in the production, the cloud engineer should ensure that data services are backed up periodically as part of routine application maintenance.
MySQL - MySQL is used for the registration and authentication of users. Clients using SSO/SAML Single Sign-on do not use MySQL services, but the application still requires access to MySQL.
MongoDB - MongoDB is used to the storing of document related data, including comments, document edits, risk labels, metadata, document history, collaboration activities, user logs, etc.
Minio - Minio provides an interface to file storage systems in Azure and other common Cloud Storage systems. Minio is used to store raw contract files, signed contract files, and other raw document files.
# Backend Application Services
Backend Application Services are dependent on Data Services for maintaining the application state. Backend application services MUST be exposed to the user's application environment.
BE - Backend component that enables online application services for the front end application. This component provides access to collaboration services, access to document metadata, transaction services, etc.
BEAI - Backend artificial intelligence component that enables submitted new documents to be processed using artificial intelligence methods to classify contract text, OCR processing of PDF documents, machine translation services, etc. This component requires larger memory footprint (at least 16GB, 32GB preferred) due to the nature and size of AI components.
# Frontend Services
Frontend Services provides the serving of user interface and application. Frontend services MUST be exposed to user's application environment and must reference the backend application services.
The frontend is facilitated by a SPA "single page application" framework and provides for rich application interace.