Skip to content

Architecture and codebase

Michael Yingbull edited this page Sep 28, 2026 · 6 revisions

Architecture and codebase

Home / Technical documentation / Developing CARLOS

The fastest way into a large codebase is to follow one familiar clinic action. An appointment being saved, for example, crosses a browser view, request handling, application logic, and storage. Tracing that path gives you a practical map and shows where validation and permission checks belong.

Follow a clinic action through the code

CARLOS is a Java web application. Browser pages and scripts live under src/main/webapp/. Java request handlers, services, managers, and data access code live under src/main/java/; tests are under src/test/. The application uses MariaDB for structured records, a document directory for files, and separate services for drug data and PDF rendering.

Start with a visible clinic action, such as saving an appointment. Find its page or form in src/main/webapp/, follow the request mapping to Java code, then locate the service and data-access methods it calls. Read the permission check and validation before changing persistence. Search for tests and other callers before editing a shared helper.

flowchart LR
    Browser --> Front[nginx and WAF]
    Front --> Handler[Tomcat request handler]
    Handler --> Service[Service or manager]
    Service --> Database[(MariaDB)]
    Service --> Documents[(Document store)]
Loading

In words: the browser reaches the web front door, which passes an allowed request to a Tomcat handler. That handler calls application logic, which may read or write the database or document store. Individual actions can use other components. The development environment gets the code running locally; the database guide covers persistent changes.

SCREENSHOT NEEDED — DEV-ARCH: Capture an editor showing one release/2026.08 request's web entry point, Java handler, and matching test in a compact file tree. Use an appointment or demographic example and label the links between files.

Before editing a shared component, look for its other callers and tests. A change that fixes one screen can alter another workflow that uses the same service. Keep the user action in view as you move through the code; it is the clearest way to explain the change in a review.

Related pages

Database and migrations · APIs and interfaces

Authentication and permissions

CARLOS documentation

All topics · Get help

Using CARLOS

Start here · Clinic workflows

Getting started and everyday reference
Office staff
Clinical staff and doctors
Clinic managers and administrators

Technical documentation

Technical overview · Reference

Running CARLOS

Install and configure
Maintain and troubleshoot

Developing CARLOS

Code, interfaces, and tests
Contribute and maintain releases

For everyone

Write and maintain the documentation

Clone this wiki locally