The Back-End
Cloud
The basics
Setting up the dev environment

Setting up a project

Setting up a project using the asrr-kotlin-sb template

At ASRR we created a template for writing spring-boot based applications. This template contains the correct dependencies and setup to ensure enterprise grade API's.

Some of the features are:

  • Automated openapi spec compatible with our front-end type generation
  • References to ASRR Core package with generics for our CRUD controllers, service classes and repositories
  • Unit test examples
  • Code coverage
  • Copyright / spotless

Starting from the template

  1. Go to https://github.com/ASRRtechnologies/asrr-kotlin-sb-template (opens in a new tab) and press the green button 'use this template'
  2. Create your repository with the correct name and description. We use the naming strategy <client>-<project-name>-api for our back-end projects.
  3. Clone your repository to your local machine
  4. Open the project in IntelliJ
  5. Change the name of the project in the settings.gradle.kts file
  6. Change the name of the project in the build.gradle.kts file
  7. Set the correct properties in the application.yml file
  8. Try to run the application by pressing the play button in IntelliJ, the play button in your main.kt or by running ./gradlew bootRun from your intellij sidebar
  9. If the application runs, you are good to go! Go to http://localhost:8080/api/v1/api-docs (opens in a new tab) to see if the application is running

Prerequisites to working on a project

  1. Always start from a ticket in JIRA (https://asrrtechnologies.atlassian.net/jira/software/projects (opens in a new tab))
  2. Select your ticket and create a branch from it. The branch name should be the ticket number and a short description of the ticket. You can also use the development button in JIRA to create a branch from the ticket.
  3. When you are done with your work, create a pull request to merge your branch into the development branch. The pull request should be named the same as the ticket.
  4. When the pull request is approved, merge it into the development branch.