4.2.0 • Published 29 days ago
care-map-api v4.2.0
CARE-MAP-API
A lambda serverless project:
- Attached Authorizer
- API Gateway
/care
Service Care Map API requests/flush
Flush the redis cache
Context & Config
The entire project is config-driven; there are default API params, network-specific params, and connector params all defined in app.config.yml
. Many functions take in a context
variable - this contains useful information (data & services) pertaining to the request (context).
Connectors
Each connector is a source of data. There is backing configuration data for each defined in the database collection care_option_list
. This data is upserted to the database on every deploy; the contents of this file are located in data/optionslist.js
- There is a desire to not upsert upon deploy but I would leave as-is for now. It's questionable if this data should even exist in the db to begin with (are we really going to control this via a UI?)
Flow
/care
- handler.js (entry point)
- middlewareService.js load data, cache, prepare context
- CareConnector.js aggregate connector responses 3a. Kyruus|Dexcare Connector -- 1. External API call -- 2. Filter providers by known Gozio Provider List (set as part of context in step 2) -- 3. Filter locations by known Gozio Locations (dynamic call to Location Resolver) 3b. GozioConnector.fetch -- 1. Fetch locations by categories defined meta.fetchCategories 3c. GozioConnect.whitelist -- 1. Filter locations by categories defined in meta.whitelistCategoris
Tests
Minimal, and needs improvement
4.2.0
29 days ago