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