https://github.com/cnstr/api
The API for Canister (version 2)
https://github.com/cnstr/api
docker kubernetes postgres rust tide typesense
Last synced: 6 months ago
JSON representation
The API for Canister (version 2)
- Host: GitHub
- URL: https://github.com/cnstr/api
- Owner: cnstr
- License: mit
- Created: 2021-08-31T06:31:18.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-12-09T07:39:46.000Z (10 months ago)
- Last Synced: 2025-03-28T17:57:24.999Z (6 months ago)
- Topics: docker, kubernetes, postgres, rust, tide, typesense
- Language: Rust
- Homepage: https://docs.canister.me
- Size: 14.7 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Canister API
> The API for Canister (version 2)

[](https://www.codacy.com?utm_source=github.com&utm_medium=referral&utm_content=cnstr/api&utm_campaign=Badge_Grade)


This project hosts the Canister API and accompanying services.
It is written in Rust and utilizes various crates such as:- [`axum`](https://github.com/tokio-rs/axum) for the web server
- [`reqwest`](https://github.com/seanmonstar/reqwest) for the HTTP client
- [`prisma`](https://prisma.io) for the database client (via [`prisma-client-rs`](https://github.com/Brendonovich/prisma-client-rust))The API is deployed on Kubernetes and is accessible [here](https://api.canister.me/v2/).
If you're interested in the API documentation, you can find it [here](https://docs.canister.me).### Development
This project utilizes [`task`](https://taskfile.dev) and `docker compose` for a development environment.
In order to populate the databases, [`cnstr/core`](https://github.com/cnstr/core) needs to be setup and run once.
The project also requires the Rust toolchain installed and `cargo-watch` installed (`cargo install cargo-watch`).
Once you have setup everything, running `task dev` will start the API with hot-reloading and the databases.### Deployment
*This project isn't intended to be deployed by anyone other than the maintainers.*
*When deployed, the project is relicensed under a proprietary license.*The `task deploy` command will trigger the [CI/CD at `cnstr/ci`](https://github.com/cnstr/ci/actions/workflows/api.yaml).
The deployment will run the following steps:- Build and publish the Docker image to Google Artifact Registry (gcr.io)
- Distribute and upload the OpenAPI reference to [bump.sh](https://bump.sh)
- Rewrite the `kubernetes/api.yaml` file with the new image tag
- Apply the new deployment to the cluster> Copyright (c) 2023, Aarnav Tale