- User Authentication with Clerk (JWT)
- Uploading Assets (eg. pet images)
- Fetching/Saving User & Pet Data
- Management of AI Assistant Threads
- Daily Challenges
- Robust Error Handling
- Detailed Logs
- Type-safe Interaction with Database
- Database Migration with
sqlx
- Automated CI/CD for Build & Release in Azure
- OpenAPI Documentation
- Code documentation with
docs.rs
This is a REST API so it should work for any programming language with an HTTP client. I recommend trying the endpoint first in Postman or Insomnia. All the endpoints are documented using Scalar. You can find the documentation here. Do note that most of the endpoints in this API can only be accessed with JWT token, not just for security, but in order to also retrieve the current user's data. Some endpoints that dont require it are health checks so that Azure can ping it properly.
Due to the robust error handling in this API, all client errors must have a short self-explanatory error codes and a corresponding HTTP error code.
The architecture involved in this backend follows the best practices for security, scaling, and performance.
Here is the database schema with Postgresql Database with PostGIS and pg_uuidv7 extensions:
In addition, all Azure services follow the naming convention from Microsoft themselves. Here is how the cloud services is architectured:
- Install rust toolchain (
v1.86.0
). - Create
.env
file add the keys from.env.example
. - Build the project with
cargo build
or if you are in release mode,cargo build --release
. - Run the API with
cargo run
to start dev server. Be sure you have a docker image with PostGIS and pg_uuidv7 extension. The auth token will come from the JWT template in clerk dev mode. This is different from the production mode.
If you have any question or inquiry, feel free to email me or open an issue here. I'll be sure to respond and provide insights given your question.