___________
/ / \
/ \_____/ \
| _________ |
| | ~ ~ ~ | |
\ | - - | /
\/ \| _ |/ \/
\ \ ___ / /
\ ------- /
\_____v_____/
| |
Rust/Axum REST API powering the ShopRust ecommerce platform.
- Rust + Axum — async web framework
- PostgreSQL + SQLx — database with compile-time checked queries
- JWT — separate auth flows for customers and admins
- Stripe — payment intent creation via REST API
# 1. Start PostgreSQL
docker compose up -d
# 2. Copy env and fill in your keys
cp .env.example .env
# 3. Run (migrations + seed data run automatically)
cargo runServer starts on http://localhost:8000. Migrations and seed data run on startup.
| Variable | Description |
|---|---|
DATABASE_URL |
PostgreSQL connection string |
JWT_SECRET |
Secret used to sign JWT tokens |
STRIPE_SECRET_KEY |
Stripe secret key (sk_test_... or sk_live_...) |
| Auth | Prefix |
|---|---|
| None | /api/products, /api/categories, /api/cart, /api/auth, /api/payments |
| Customer JWT | /api/customer/... |
| Admin JWT | /api/admin/... |