===== System Rules and States ===== The Regexta application implements a functional state logic that regulates the behavior of the interface and guarantees consistency between input and generated output. State management is strictly connected to the regestum extraction process. ---- ==== “Editable” state ==== The “Editable” state represents the initial condition of the document. At this stage: * the user may freely insert or modify the text; * it is possible to upload or replace a file; * it is possible to select or modify the document type (Document Type); * the output has not yet been generated. The document remains in this state until execution of the “Extract Regestum” command. ---- ==== “Extracted” state ==== After the extraction process is started, the document enters the “Extracted” state. At this stage: * the input area becomes read-only; * the text can no longer be modified; * the structured output is generated and displayed; * output operations become available (Export, Copy, Save for authenticated users). The transition to the “Extracted” state guarantees integrity between the analyzed content and the produced regestum. ---- ==== State transition ==== The transition between states occurs according to the following rules: * from “Editable” to “Extracted” through the “Extract Regestum” command; * from “Extracted” to “Editable” through the “Reset” command. The “Reset” command clears: * the input content; * the generated output; * the read-only state. The system therefore returns to the initial configuration, allowing a new processing cycle. ---- ==== Visibility rules based on authentication ==== The application applies differentiated visibility and persistence rules according to authentication status. Non-authenticated user: * cannot save regesta within the platform; * does not see the “Collections” page; * may only export the result locally. Authenticated user (Researcher): * may save the generated regestum; * may associate it with a Collection; * may access the “Collections” page; * may consult previously archived documents. Admin: * has full access to the contents and functionalities of the application.