A proof-of-concept API built with Python's FastAPI library, combined with a React client for the web browser. This Single Page Application (SPA) grew out of my exploration of FastAPI and React, with help from the fantastic tutorial, Up and Running With FastAPI.
- The source code for this project is available on GitLab.
- Development, Test, and Production environments are deployed in Docker containers.
- The asychronous API is deployed on Uvicorn, behind an Nginx reverse proxy, with TLS implemented via a secure certificate from Let's Encrypt.
- OpenAPI documentation is available via the Swagger UI at https://poc.trove.fm/docs
- OpenAPI documentation is also available via ReDoc at https://poc.trove.fm/redoc
- The data model is implemented using Pydantic, which provides type annotations, data validation, and serialization.
- Data storage uses PostgreSQL.
- Database access is via SQLAlchemy, implemented using the Repository Pattern.
- Database migrations are performed using Alembic.
- A JSON Web token is currently used with Authentication, which is useful for API clients that don't reside in a web browser. Although this can be used in the web browser as well, there are some security concerns around storing these in Local Storage. I anticipate wrapping this token in a secure cookie in a future release.
- The web client uses the Elastic UI Framework for React JS.
- State in React is maintained using Redux.