Spring backend for website Tableta Inmultirii.
Uses Java 11 JPMS modules and applies DDD design rules.
Features:
-
API Key security
-
DynamoDBusingAWS 2 SDK -
S3 Cache -
ETags -
Circuit Breakerpattern
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
schoolsdomain repositories and usesDynamoDBActive in profiles
localandlocal-prodLinks: repository-schools-dynamodb - src, module, application properties
-
Implements
statsdomain repositories and usesDynamoDBActive in profiles
localandlocal-prodLinks: [repository-stats-dynamodb](repository-stats-dynamodb - src, module, application properties
-
Implements
statsandschoolsdomain repositories and uses in memory DBActive in profiles
"devanddefault
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>