Create a post feeds page with authentication and some real-time experience.
The project has the following sub-projects
- feedsaygo: This is the frontend built in react js
- feedsback: Backend for the services and the local database
- feedstack: CDK with the resources required to run ths in AWS
This is the basic architecture of this laboratory.
-
The frontend component is written in ReacJs, the user will be able to create a new account using the cognito APIS, this includes sign up, email verification and log in. Once those 3 steps are completed
Cognito
will send the user data and the tokens to keep the session alive. -
Every request from the frontend to the backend will have the tokens retreived from
Cognito
, from the backend side there is one additional validation calling avalidation
endpoint from cognito to verify that the received token from the frontend are correct and without modifications. -
Once the validation process is executed then rhe request will be routed to the corresponding API route.
First execute npm run synth && npm run deploy
in the feedsstack
project. This will create the resources required to this laboratory (Cognito, user pools, roles etc). Remember that CDk will take your credentials and configuration from ~/.aws/aws_credentials
Before running the frontend update the user pool id(created with cdk) and the region here
Once that is completed run npm run start
this will deploy the frontend in the port 3000
The backend has a in memory database, for simplicity in this laboratory there is not a dedicted databasee (in the TODO list). npm run start
will start the project in port 9000
- Base workflow working
- Add a real DB
- Auth for websockets