@@ -46,43 +46,62 @@ files,
4646
4747## Running it
4848
49- ### Production simulation
49+ ## Production simulation
5050
5151Now we don’t have a real production environment because that’s not the point here, but most likely,
5252an application like this runs on a container orchestration platform, and all the necessary configs
5353are still provided. Since we’re only simulating a production instance, all the configurations are
5454kept in the ` application-prod.yml ` file.
5555
56+ ### User credentials
57+
5658Before getting started, it's important to note that an IAM user, who's credentials will be used,
5759needs to be created with the following policies:
5860
5961- AmazonS3FullAccess
6062- AWSLambda_FullAccess
6163- AmazonDynamoDBFullAccess
6264
65+ ### Creating the picture bucket
66+
6367The ` scripts/new-bucket.sh ` script will create the necessary S3 resource.
6468
69+ ### Creating the DynamoDB table
70+
71+
6572At startup @dynamobee helps set up the table we need and populate it with some sample data.
6673@dynamobee is library for tracking, managing, and applying database changes
6774The changelog acts as a database version control. It tracks all the changes made to the database,
6875and helps you manage database migration.
6976
77+ ### Running the central backend service
78+
7079To run the backend simply use
7180
7281```
7382mvn spring-boot:run -Dspring-boot.run.profiles=prod
7483```
7584
85+ ### Running the GUI
86+
7687Now ` cd ` into ` src/main/shipment-list-frontend ` and run ` npm install ` and ` npm start ` .
7788This will spin up the React app that can be accessed on ` localhost:3000 ` .
7889
90+ ### Using the application
91+
7992You should now be able to see a list of shipments with standard icons, that means that only the
8093database
8194is populated, the pictures still need to be added from the ` sample-pictures ` folder.
8295The weight of a shipment we can perceive, but not the size, that's why we need to display it,
8396using the "banana for scale" measuring unit. How else would we know??
8497
85- The Lambda function is still not up. This falls under the ` shipment-list-lambda-validator ` project.
98+ Current available actions using the GUI:
99+ - upload a new image
100+ - delete shipment from the list
101+
102+ ### Running the Lambda function
103+
104+ The Lambda function is still not there. This falls under the ` shipment-list-lambda-validator ` project.
86105
87106```
88107git clone https://github.com/tinyg210/shipment-list-lambda-validator.git
@@ -101,22 +120,23 @@ You should now be able to add a new picture for each shipment. Files that are no
101120deleted
102121and the shipment picture will be replaced with a generic icon.
103122
104- ### Developer environment
123+ ## Developer environment
105124
106125To switch to using LocalStack instead of AWS services just run ` docker compose up ` to spin up a
107126Localstack
108127container.
109- After that, the Spring Boot application needs to start using the dev profile:
128+ After that, the Spring Boot application needs to start using the dev profile (ideally stop the previous instance) :
110129
111130```
112131mvn spring-boot:run -Dspring-boot.run.profiles=dev
113132```
114133
115134This should again populate the DynamoDB, this time on LocalStack.
116135From here on, the rest of the steps are the same, but all the scripts that need to run end
117- in ` -local ` ,
136+ in the ` -local ` suffix ,
118137as they use the ` awslocal ` CLI.
119138
120139The same actions should be easily achieved again, but locally.
121140
122141
142+
0 commit comments