Use this template to quickstart your A12-based project. For more information about the Project Template and how to get started, check out the detailed documentation on getA12.
By default, template services are exposed on the following ports:
| Service | Port | Note |
|---|---|---|
| Frontend | :8081 |
|
| Project Template Server | :8082 |
|
| Postgres | :8083 |
Docker only |
| Keycloak | :8089 |
Docker only |
Proper environment setup is crucial for the successful build and run of this project. Please follow the steps in the environment and tools setup documentation carefully.
To wrap up, the following tools are required to build this project. Versions are maintained in ./tool-versions.json file and follow npm semver versioning patterns.
| Tool | Version | Note |
|---|---|---|
| JDK | '21' | |
| Gradle1 | '>=8.5.x <9' | |
| Node | '22.x.x' | |
| npm1 | '>=10.7.x' | |
| Docker1 | '>=20.x' | |
| [Docker Compose] | '>=2.20.3' |
1) These tools have to be configured to use proper Artifactory. Please, follow Artifactory access documentation to set it up.
You can find the details on all topics in the geta12 Project Template documentation with links to the direct access below:
- Downloads - List of the Project Template artifacts downloadable in different variants.
- Environment and Tools Setup - Details on setting up Gradle, Node & npm, Docker and Java tools, setting their access to the specific Artifactory and some troubleshooting tips.
- Getting Started With the Project - Description of the structure of the Project Template content, how to get it and what the most important commands for using it are.
- Preparation of the Project Template for a New Project - Helps with version control initialization of the project, hints on renaming placeholders and changes inside the project needed for external partners.
- Build - Detailed steps and variants of building the project modules and related Docker images.
- Run - Possibilities of running and accessing the application as standalone or in Docker containers.
- Development Tips - Tips on tools, changes and things to focus on, if you are starting with development, for both frontend and backend.
- Deployment - Briefly describes deployment possibilities. The details of CI/CD Jenkins pipelines are the largest part of this README document.
- Security - Tips for security enhancements of the Project Template.
- Enhancement Possibilities - Examples of adding your own models and modules.
- Working With the SME - Describes tools used for modeling and testing of the Project Template.
- Data Migration Support - Example of a document migration task.
- Document Ownership - Description of rules and permissions associated with document modification.
- End-to_End Testing - Description of End-to-End Test setup, how to test your application using Playwright.
- Configuration - Detailed description of the configuration profiles and other configuration-related files used in the Project Template.
- Variants - Describes variants of the Project Template integrated with A12 products other than Client and Data Services.
Assuming you went through the documentation, your environment is set up and project is prepared, this is the most straightforward way to get your project application up and running:
1. Build the application modules
gradle build
2. Run
- Project Template application
- Compose up the Keycloak container in Docker:
gradle keycloakComposeUpWARNING: Project Template's Keycloak setup is for development purposes only. It is necessary to significantly enhance the security of a Keycloak instance for production environments.
- Run the server application with the default development Spring profile and keep it running:
gradle :server:app:bootrun --args='--spring.profiles.active=dev-env'NOTE: It is normal for the server startup progress to not quite reach 100% in the terminal output. Once you see the progress indicator hit around 80% or higher without any error logs, the server is running properly.
- Run client:
- In another terminal window, move to client directory with
cd client. - Then start the webpack with
npm startand keep it running.
- In another terminal window, move to client directory with
- Compose up the Keycloak container in Docker:
- Project Template init application (for initialization and migration purposes)
WARNING: Before running the init application, make sure to stop the server application first. The init application will lock the Postgres database during initialization, and the database could become inconsistent if data is being initialized while the server is still running.
- Run the init application with the default development Spring profile:
gradle :server:init:bootrun --args='--spring.profiles.active=dev-env' - Run the init application with the 'init-data' Spring profile additionally to initialize documents based on the
import/data/requestfolder:gradle :server:init:bootrun --args='--spring.profiles.active=dev-env,init-data'
- Run the init application with the default development Spring profile:
3. Explore the application
The frontend is, by default, running on http://localhost:8081.
There are three test users with credentials:
admin/A12PT-admintestfor Admin roleuser1/A12PT-user1testfor User roleuser2/A12PT-user2testfor User role
Log in with one of these credentials and take a look over the content.
WARNING: Project Template's login setup is for development purposes only. It is necessary to significantly enhance the security of logins and user management for production environments.