| Crates.io | stec_shopster |
| lib.rs | stec_shopster |
| version | 0.2.9 |
| created_at | 2025-06-06 04:56:02.739075+00 |
| updated_at | 2025-12-07 20:12:40.412895+00 |
| description | Persistence layer for a shop system. |
| homepage | https://stecug.de |
| repository | |
| max_upload_size | |
| id | 1702602 |
| size | 213,677 |
Database Layer for shop system with tenant support.
Shopster is a Rust-based database abstraction layer designed for e-commerce systems with multi-tenant support. It provides a clean API for managing customers, products, orders, baskets, and shop settings using PostgreSQL as the backend database.
The project is organized as follows:
src/postgresql/ - PostgreSQL-specific database implementationssrc/baskets.rs - Basket domain logicsrc/customers.rs - Customer domain logicsrc/orders.rs - Order domain logicsrc/products.rs - Product domain logicsrc/settings.rs - Settings domain logicsrc/schema.rs - Database schema definitionssrc/error.rs - Error typesmigrations/ - Database migrationstests/ - Integration testsAdd Shopster to your Cargo.toml dependencies section.
Create an .env file in the project root with your database configuration.
Run migrations using Diesel CLI:
cargo install diesel_cli --no-default-features --features postgres
diesel migration run
We use unit/integration tests. In order to run them you need docker running and have cargo-nexttest installed. You can do this with:
cargo install cargo-nextest --locked
To test run the tests, use the following command:
cargo nextest run
For Test coverage use:
cargo install cargo-llvm-cov
cargo llvm-cov nextest
This project uses GitHub Actions for continuous integration. The workflow is defined in .github/workflows/build.yml and runs automatically on push and pull requests.
GPL-3.0-or-later