digits-api-main is the authentication, preprocessing, and tertiary API bridge in the Digits service mesh.
๐ Library | โ Purpose | ๐ Version |
---|---|---|
NodeJS | Base | 16.18.0 |
express-jwt | Authentication Middleware | 7.7.7 |
mongoose | DB Client | 6.7.0 |
express | Session Middleware | 4.18.2 |
apiHost
is an array with services you can and should add to.Secret
is the secret which is used to encrypt all user sessions into tokens.EXPIRES
is the valid session length, if passed users will need to reauthenticate.dbUrl
is your mongo instance, including protocol and port. You should only need to adjust host in most situations.
npm i
Scripts provided in package.json
. It's safe to modify or add additional scripts, but here are the defaults:
npm start
- ๐ Authentication/Sessions [ express/express-jwt ]
- Authentication occurs RESTfully with jwt tokens. There is a secret
- ๐ Interfacing [ http ]
- All API routing is done through http requests. It's possible sockets play a role one day.
- ๐ฉบ Monitoring [ http ]
- This API intrinsically reports to DigitsUI, but it also reports the health of other APIs. This contextualizes
digits-api-main
's role succintly.
- This API intrinsically reports to DigitsUI, but it also reports the health of other APIs. This contextualizes
- ๐ DB [ mongoose ]
- All models are highly fluid and will accept most JSON as valid. This is by design as features are evaluated. Field validation will occur at a later date.
- ๐งฎ Preprocessing [ node ]
- While not all data can/should be preprocessed by
digits-api-main
, a lot is. That puts it realistically in the role of a preprocessor. While all nodes technically work with dataframes and such, a lot of the focus in downstream responses ends up being data.
- While not all data can/should be preprocessed by
- Initialize beautiful README.md
- Describe service API role
- Add husky pre-commit
- Create mesh diagram
- Explain preprocessor philosophy
- Clean up quota logic, make it middleware
- Create Stripe customer API
- Docker images
- Kubernetes deployment
[<emoji>] [revert: ?]<type>[(scope)?]: <message>
๐ฅ feat(compiler): add 'comments' option
๐ fix(compiler): fix some bug
๐ docs(compiler): add some docs
๐ท UI(compiler): better styles
๐ฐ chore(compiler): Made some changes to the scaffolding
๐ locale(compiler): Made a small contribution to internationalization
Other commit types: refactor, perf, workflow, build, CI, typos, tests, types, wip, release, dep