SmartCLIDE Architectural Patterns module is a REST API backend service implemented in Spring that serves the SmartCLIDE Frontend IDE to assist the users of the IDE with the selection of a suitable architectural pattern for their application as well as the setup of an appropriate GitHub project repository for their project.
The REST API offers the following endpoints:
Lists the names of architectural patterns that are supported by this API.
GET https://api.dev.smartclide.eu/architectural-patterns/supported-patterns
Content-Type: application/json
[
"EVENT_DRIVEN",
"LAYERED",
"MICROKERNEL",
"MICROSERVICES",
"SERVICE_ORIENTED",
"SPACE_BASED"
]
Gets the JSON object that contains the survey content.
GET https://api.dev.smartclide.eu/architectural-patterns/survey
Content-Type: application/json
Please see survey.json.
Evaluates the input received by the FrontEnd module after the user has completed the survey. The input is a list of survey item IDs.
POST https://api.dev.smartclide.eu/architectural-patterns/evaluation
Body: required
Content-Type: application/json
Example value:
["Q1_1","Q2_1","Q2_2","Q3_3","Q3_4","Q4_1","Q4_2","Q5_3"]
Content-Type: application/json
A JSON object of a list of patterns with their evaluation scores in terms of percentages corresponding to their calculated ranking.
{
"EVENT_DRIVEN": 16,
"LAYERED": 35,
"MICROKERNEL": 7,
"MICROSERVICES": 13,
"SERVICE_ORIENTED": 11,
"SPACE_BASED": 17
}
Based on the query parameters described below, it chooses an appropriate GitHub project template, and returns the URL to the template repository.
POST https://api.dev.smartclide.eu/architectural-patterns/application
Query Parameters:
framework Type: String
Description: This is the framework name that the user has selected within the Service Creation flow in Step 2 Service Details/Framework. The endpoint expects one of the following three valid parameters:
- Java_with_Spring_Boot_and_MySQL
- Nodejs
- Python
pattern Type: String
Description: This is the pattern name that is selected by the user. The endpoint expects one of the six following valid parameters:
- EVENT_DRIVEN
- LAYERED
- MICROKERNEL
- MICROSERVICES
- SERVICE_ORIENTED
- SPACE_BASED
Example POST request: https://api.dev.smartclide.eu/architectural-patterns/application?framework=Nodejs&pattern=EVENT_DRIVEN
The template repository URL on GitHub, e.g., https://github.com/che-samples/web-java-spring-boot
Content-Type: application/json
{
"templateRepositoryUrl": "https://github.com/che-samples/web-java-spring-boot"
}
Evaluation values for the survey items can be found in the doc directory.
The repository templates currently being in use are as follows:
-
For Java with Spring Boot and MySQL:
-
For Node.js:
-
For Python: