This pull request has three major components that I've been working on since December of last year. It's a lot to digest, so we could understandably break it up into smaller chunks.
Components of the PR
Dockerized local deployment
The current local deployment is tedious and manual, having to install every dependency locally including standing up an instance of postgres on your machine.
This PR puts the database and web application in containers, leaving local deployment to just a single command: docker-compose up
It also changes the database configuration to be all network connections instead of socket connections for JUST local deployment. Now that configuration is consistent across local and production.
JWT Authentication
With the React Native LAN app, there needs to be an interface for an external application to login, register, and authenticate users. This PR adds in endpoints for JWT authentication to allow a third party to exchange a username & password for a JWT token. The JWT token has an expiration time and can be passed along with each request to validate permissions.
Exposed API for Events & Users
Along with the authentication comes an exposed API for consuming and producing users and events.
Considerations/future work
Test new API endpoints and/or completely revamp the testing harness. It's not user friendly and it might be outdated. I couldn't get the tests to run because of an error in the package.
Make sure that the creation of users requires authentication
This pull request has three major components that I've been working on since December of last year. It's a lot to digest, so we could understandably break it up into smaller chunks.
Components of the PR
Dockerized local deployment
docker-compose up
JWT Authentication
Exposed API for Events & Users
Considerations/future work