0.2.4 • Published 8 months ago

lamlha v0.2.4

Weekly downloads
-
License
-
Repository
-
Last release
8 months ago

Lamlha Service

Lamlha is the Marketplace service that provides routing and distance matrixes.

Key information

CircleCI

Sentry Errors

New Relic Dashboard

Whimsical Diagram image

Prerequisites

  1. Set up your AWS Development Credentials
  2. Install Node.js
  3. Install AWS SAM CLI
  4. Install node modules: npm i
  5. Install CloudFormation linter: pip3 install cfn-lint

Directory Structure

└── src/ - all source code for project is in here
    ├── handlers/ - Lamda and GraphQL handlers
    ├── types/ - shared types, including error classes
    └── utils/ - helper code and misc functions

    # ├── cli/ - cli commands
    # ├── data/ - all datasources are defined and exposed here
    # │   └── db/ - dynamodb schema and models
    # │   └── legacy/ - legacy data ie. facilities from Monorail
    # ├── logic/ - all core business logic

Local Setup

Copy src/env/local.env.base to local.env

cp ./src/env/local.env.base ./src/env/local.env

Then, reach out to the team for the appropriate values to use in local.env

Testing

Run npm run test to run the tests once. Run npm run test:watch to run the tests continuously.

Logs

  • To enable DB logging set DB_LOGGING=1.

Deploying

DEV - npm run deploy:dev

STAGING - npm run deploy:staging

PROD - npm run deploy:prod

CI/CD

Using trunk based workflow

CircleCI is enabled and the project status can be viewed here

Monitoring and Error Reporting

Sentry error logging

CloudWatch dashboard

Reference Materials

GoogleMapsApi (Directions Service): https://developers.google.com/maps/documentation/directions/get-directions#optimize-your-waypoints

GoogleMaps NodeJS Module (used in project): https://www.npmjs.com/package/@googlemaps/google-maps-services-js

GoogleMaps NodeJS Module Full Documentation: https://googlemaps.github.io/google-maps-services-js/

GoogleMaps NodeJS Module Full Documentation (Client Object): https://googlemaps.github.io/google-maps-services-js/classes/Client.html