This project uses
Make sure to install them before proceeding, and that your docker daemon is running.
- Postgres >= 12
- Rust >= 1.74
- Node >= 20
- pnpm >= 8
- protoc >= 3.17
cargo build -p meteroid
- if you need the metering api :
cargo build -p metering
pnpm install --prefix modules/web
-
Copy the
.env.example
file to.env
. -
Start the database with docker compose. If you intend to run the Metering app as well, you will need the "metering" profile as follows:
docker compose -f docker/develop/docker-compose.yml --env-file .env --profile metering up
-
Start the Rust backend
cargo run -p meteroid --bin meteroid-api
It will automatically run migrations. You can then apply the seed data (in docker/develop/data/seed.sql) through psql or the tool of your choice.
-
Optionally start the Metering Rust backend
cargo run -p metering --bin metering-api
-
Start the Web frontend
pnpm --prefix modules/web/web-app run dev
You can now access the app at http://127.0.0.1:5147 (not localhost).
If you used the seed data, you can log in with the credentials found in docker/develop/data/README.md. Click on the "Sandbox" tenant on the left to access the main UI.
After a pull, you should update/build the dependencies.
cargo build -p meteroid
cargo build -p metering
pnpm install --prefix modules/web
Protobuf files are found in /modules/meteroid/proto
After an update, you can rebuild rust, reinstall the web dependencies and generate from proto via the command above, or you can run the following commands for faster feedback:
cargo build -p meteroid-grpc
- for metering:
cargo build -p metering-grpc
pnpm --prefix modules/web/web-app run generate:proto
Migrations are found in :
/modules/meteroid/crates/meteroid-migrations/refinery/migrations