">
FAQ | CodamAI - SaaS architecture and code assistant

FAQ

Technologies (Tech-Stack)

The Headless CMS ist Build with the following tech-stack. We use industrial standards and best practices for our services for quick and easy development. You can use and extend the CMS like you need it. (See: Plug-In Development)

  • Spring Boot 3 (since CMS V2.1.0)
  • Hibernate 6 (since CMS V2.1.0)
  • JPA (Jakarta)
  • OpenJDK 17+
  • Spring REST
  • Actuator Endpoint
  • OpenAPI / Swagger UI

Environments of CMS

Global

EnvironmentDescriptionExample
DEBUGPrint a lot of additional information in defined Log4J2 Writer.true
TZTimezone for java application.Europe/Berlin
format_datetimeDatetime format of rest calls.yyyy-MM-dd HH:mm:ss

Authenticate

user authentication configuration

EnvironmentDescriptionExample
user_management_clientPublic authentication.none.v1_0_0
user_management_clientWe use the keycloak in V15.0.2.keycloak.v15_0_2
user_management_clientSimple internal client.internal.v1_0_1

additional Keycloak configuration

EnvironmentDescriptionExample
keycloak_realmKeycloak realm id.test-realm
keycloak_urlUrl to your keycloak installation with "/auth"https://localhost:8443/auth
keycloak_clientName of the keycloak confidential client.cms
keycloak_client_secretSecret of confidential client.test-test-test-test

Custom configuration

EnvironmentDescriptionExample
user_management_clientYour own implementation of a user management.yourClient.yourVersion

Database

EnvironmentDescriptionExample
cms_database_modeDatabase mode, see multi tenantmulti
cms_database_driverjdbc-driver classcom.mysql.cj.jdbc.Driver
cms_database_urlurl to databasejdbc:mysql://172.18.0.2:3306/
cms_database_prefixPrefix for database (database name)cms
cms_database_userdatabase usermysqluser
cms_database_passwordPassword for database usertest-1234

Security Settings

EnvironmentDescriptionExample
security_max_field_per_requestMax fields to fetch in response.30
security_max_deepMax deep to fetch in response.30
cors_allow_originCORS Header allow origin*
cors_allow_methodsCORS Header allow methods*
cors_allow_headersCORS Header allow headers*
cors_allow_credentialsCORS Header allow credentialstrue

File Storage

EnvironmentDescriptionExample
file_storagetype of storagelocal
file_basepathpath of storage if local storage/data

Encryption

EnvironmentDescriptionExample
CYPHER_PASSWORD16 digit long key for database encryptionTest1234

Ports and URLs of CMS

Overview of the system ports and endpoints in your CMS.

PathPortDescription
/8100Root Path of your local stated CMS
/v2/*8100Root endpoint for your data
/swagger-ui/8100See the Swagger configuration of your endpoints
/8101Management Port of your local stated CMS
/actuator/health/8101Health Endpoint for container services
/actuator/metrics/8101Metric Endpoint for monitoring services

TIP

We are planning to make the ports configurable, please feel free to contact us if you have this specific need.

Postman Setup

Setup introduction for postman using with keycloak and the CMS.

Full Setup Guideopen in new window

Postman pre request script

var client_id      = "yourClient";
var client_secret = "yourClientSecret";
var token_endpoint = "https://your.keycloak.com/auth/realms/your-realm/protocol/openid-connect/token";
var scope          = "eamil";

var details = {
   "grant_type" : "password",
   "client_id" : 'yourClient',
   "username" : 'yourUser',
   "password": 'yourPassword'
}

var formBody = [];
for (var property in details) {
 var encodedKey = encodeURIComponent(property);
 var encodedValue = encodeURIComponent(details[property]);
 formBody.push(encodedKey + "=" + encodedValue);
}

formBody = formBody.join("&");
pm.sendRequest({
   url: token_endpoint,
   method: 'POST',
   header: {
       'Content-Type': 'application/x-www-form-urlencoded',
       'Authorization' :'Basic ' + btoa(client_id+":"+client_secret)
   },
   body: formBody
},  function(err, response) {
    const jsonResponse = response.json();
    pm.collectionVariables.set("access_token", jsonResponse.access_token);
});

Add the fetched token to Authorisation-Tab in postman tab.

img

Name creation of models

The Name of models will be created with folder name in prefix.

Example:

  • Folder
    • ClassA Name will result in FolderClassA.

DANGER

Please be aware of possible duplications in namings. (we are working on a fix for this) Example: If you create an "Offer" class in a "Service" Folder and an "Offe" class in a "rService" Folder, you create a duplicate we currently can not detect. (At least the lowercase role names will be running into troubles)

Last Updated:
Contributors: mertins-d, Daniel mertins