Spring
backend for website Tableta Inmultirii.
Uses Java 11
JPMS modules and applies DDD
design rules.
Features:
-
API Key security
-
DynamoDB
usingAWS 2 SDK
-
S3 Cache
-
ETag
s -
Circuit Breaker
pattern
Domain of schools
, pure Java
implementation without any framework dependencies
Links: domain-schools - src, module
Domain of stats
, pure Java
implementation without any framework dependencies
Links: domain-stats - src, module
Spring
application
Links: application - src, module, application properties
REST controller part of the hexagon ports and adapters architecture
Links: controller - src, module, application properties
Spring Security layer part of the hexagon ports and adapters architecture
Implements API key authorization
Links: security - src, module, application properties
Implementation that saves cache entry to S3 bucket. This allows implementation of the circuit breaker
pattern in the UI, using the static image of the cache response from the S3 bucket.
Links: s3cache - src, module, application properties
Domain repositories implementation part of the hexagon ports and adapters architecture
Abstracts and hides repository implementation details from the application
Links: infrastructure - src, module
-
Implements
schools
domain repositories and usesDynamoDB
Active in profiles
local
andlocal-prod
Links: repository-schools-dynamodb - src, module, application properties
-
Implements
stats
domain repositories and usesDynamoDB
Active in profiles
local
andlocal-prod
Links: [repository-stats-dynamodb](repository-stats-dynamodb - src, module, application properties
-
Implements
stats
andschools
domain repositories and uses in memory DBActive in profiles
"dev
anddefault
Deployment as a Docker
container using the provided Dockerfile
based on Amazon Corretto
Production deployment requires the following environment variables (provided by docker parameter --env-file local.env
)
Example file local.env
# repository-stats-dynamodb
AMAZON_AWS_ACCESSKEY_STATS=<accesskey>
AMAZON_AWS_SECRETKEY_STATS=<secretkey>
AMAZON_DYNAMODB_TABLE_STATS=<tablename>
# repository-schools-dynamodb
AMAZON_AWS_ACCESSKEY_SCHOOLS=<accesskey>
AMAZON_AWS_SECRETKEY_SCHOOLS=<secretkey>
AMAZON_DYNAMODB_TABLE_SCHOOLS=<tablename>
# cache
AMAZON_AWS_ACCESSKEY=<accesskey>
AMAZON_AWS_SECRETKEY=<secretkey>
AMAZON_S3_BUCKET=<bucketname>
# security
API_ACCESS_TOKEN=<apikey>