TODO API

HTTP API written in Crystal.

Forms the server backend for the TODO Checklist app written in React. Backed by a PostgreSQL database. Uses Docker and docker-compose to form the infrastructure.

The actual application can be used by visiting:

https://todo-checklist.surge.sh

Auth is handled by Auth0. You can login using your Github or Google account. Or you can sign up for an Auth0 account. You are limited to 20 lists (with unlimited TODO's) per account.

Rationale

A HTTP server was needed to build a working API and data model for the TODO frontend application. I choose Crystal because:

ENV

The following environment variables are required to run the server:

Usage

At the root of the repo, running make will display help info on all available commands:

env    	    : Create an .env file for required variables.
build  	    : Build a local Crystal executable.
build_prod  : Build a production Crystal executable.
build_image : Build a production Docker image.
run    	    : Run the app for local dev using docker-compose.
test   	    : Run the tests.
deploy 	    : Deploy to production.

Development

RSA Public Key

The API uses an RSA public key to verify the JWT auth token (sent by the client). Follow these steps to find and save the key that the API uses:

Testing

Until the automated unit tests are up and running you can do the following to manually test the API:

TODO

Contributing

  1. Fork it (https://github.com/your-github-user/todo_api/fork).
  2. Create your feature branch (git checkout -b my-new-feature).
  3. Commit your changes (git commit -am 'Add some feature').
  4. Push to the branch (git push origin my-new-feature).
  5. Create a new Pull Request.

Contributors