The application is a Serverless Application that entirely build on cloud (AWS).
This application is an attempt to automate the daily repetitive tasks of Daigou Shoppers.
It is a self-service application that allow customers to upload their delivery information and tracking their pacels. Customer's delivery information would only be seen by their shopping representatives (Daigou). Customers could track their parcels by recipient's mobile. Don't need to care which forwarding agent it is and don't need to copy/paste the hard-to-remember tracking number any more.
- AWS
- API Gateway (API endpoints)
- Lambdas (serverless functions)
- Cognito (Authentication&Authorization)
- DynamoDB (database)
- S3 (storage of images)
- SNS (messaging/fanout)
- X-Ray (distributed tracing)
- Infrastructure as Code (IaC)
- Serverless Framework
- AWS CloudFormation
- API Documentation and Test
- CI/CD
All APIs and schemas are designed and documented on Swagger following OpenAPI 3. The detailed specifications could be see here.
Restful API design principals are applied. There are four endpoints.
/recipients
/users
/logistics
/parcels
Each endpoint has CRUD methods.
Each endpoint has its own schemas(model). List recipient schema here to demonstrate. Each recipient item contains the following fields:
userId
(string) - a unique id for a user which is parsed from AWS Cognito JWTrecipientId
(string) - a unique id for a recipientwechatId
(string) - WeChat ID of the customerwechatNickname
(string) - WeChat nickname of the customerfullname
(string) - fullnamemobile
(string) - mobiledivision
(string) - division (province-city-district)address
(string) - address (street-unit/flat-number)idCode
(string) - identity card numberidFrontFilename
(string)(optional) - a unique filename of the front side photo of identity cardidBackFilename
(string)(optional) - a unique filename of the back side photo of identity cardcomment
(string)(optional) - commentcreatedAt
(string) - date and time that the recipient is createdupdatedAt
(string) - date and time that the recipient is last updated
CI/CD pipeline would be implemented automatically if Travis CI is well configured. Or deploy the application manually.
npm install
sls deploy -v
All the APIs are tested through postman. More information of postman collection could see here.