Simple web application to make an appointment with barber. This repo contain two projects:
- backend: Nodejs application based on Serverless Framework to deploy lambda functions an related resources to AWS.
- frontend: Single page application (SPA) created with Angular to provide a Web user interface to Create, Update, Delete and Review a Barber Appointment.
Nodejs project based on Serverless Framework.
- npm command
- node 12 or higher
- AWS CLI
- Entry to "backend" folder path
cd backend
- Install node dependencies
npm install
- Configure AWS credentials
aws configure
- Deploy to AWS using Serverless
npm run deploy
A Postman collection file was provided (resources/barber-appointment.postman_collection.json) to test Lambda functions.
The automatization of build and deploy is managed by GitHub Actions configured by main.yml file.
- The backend-build Job is triggered by each push or pull request to main branch.
- And backend-deploy Job (AWS deploy) is triggered by relase tags.
- AWS_DEPLOY_STAGE: AWS deploy stage (default as "dev")
- AWS_DEPLOY_REGION: AWS deploy region (default as "us-east-1")
- AWS_DEPLOY_ACCESS_KEY_ID: AIM User Access Key ID
- AWS_DEPLOY_SECRET_ACCESS_KEY: AIM User Secret Access Key
A simple Activity Diagram was provided to understand all interactions between user and systems:
SPA based on Angular project
- npm command
- node 12 or higher
To run the web application locally:
- Entry to "frontend" folder path
cd frontend
- Update src/environments/environment.ts file
const apiId = 'YOUR API ID FROM DEPLOYED AWS LAMBDA FUNCTIONS';
const region = 'YOUR AWS REGION WHERE IS DEPLOYED FRONTEND';
- (Optional) Update Auth0 configurations at src/environments/environment.ts file
auth0ClientId: 'YOUR Auth0 Client ID'
- Run npm script to build and start local server
npm run start
- Start your browser at http://localhost:4200
The automatization of build and testing is managed by GitHub Actions configured by main.yml file. The frontend-build and frontend-test Job is triggered by each push or pull request to main branch.