Eventsourcing service
- Main language - Kotlin, SpringBoot
- Testing - JUnit5, Mockk, Strikt(Assertions)
- ORM - JPQL(Eclipselink)
- Build - Gradle
- EventStore - AxonServer
Various gradle tasks are available in project for building & testing whole project
Under development: features outlined below may not be final.
branch | ci status | coverage | codacy code quality | notes |
---|---|---|---|---|
develop | [codecov badge] | Work in progress | ||
main | [codecov badge] | [Codacy badge] | Latest release |
- Currently, doing trunk based development on forks since team is small.
- Will move to Git flow (feature branches) when needed.
However, every commit message must:
- start with JIRA ticket no.
- tell a concise & clear functional story
- use imperative style e.g. Add tests for 'X' or Fix 'Y' or Create 'Z'
-
Install Docker for IntelliJ(IntelliJ 2020.2.4 provides stable support )
-
Install Docker for desktop(Mac or Windows) & Connect it within IntelliJ
-
Edit the docker-compose.yml configuration
- add 'clean build' gradle tasks of project
- โ --build, force build images
Run
<project>/docker-compose.yml
by clicking on green gutter-icon on 'services' key in file. -
Open IntelliJ 'Services' view to find 2 containers - tomcat & axonserver running.Both containers will use same network(xxxx-be_default) as the main application & database.
-
the docker-compose.yml runs tomcat in debug mode which allows hot reload
- Keep line length at 120 chars. Hard wrap if exceeds.
- Add KDoc to significant functions in Services etc. Install KDoc-generator plugin for that.
- use explanatory variable names
- Use wildcard imports when class count is high e.g > 10 .Same for static imports (when names count is high e.g. > 5 ). Check Preferences -> CodeStyle -> Kotlin
Define following sequence of imports in IntelliJ settings
// static all other,
java.*,
javax.*,
kotlin.*,
org.*,
com.*
// all other imports
CircleCI config.yml in .circleci folder runs CI/CD pipe-line of following jobs
- code-coverage,
- build and register ECR image,
- deploy image to ECS cluster
for dev,staging environments
api health check endpoint is available at [host/app/rest/health] [host/app/rest/health] => returns ok