Skip to content

samsteele/shoprust-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

        ___________
       /     /     \
      /   \_____/   \
     |   _________   |
     |  |  ~ ~ ~  |  |
      \ |  -   -  | /
    \/ \|    _    |/ \/
     \   \  ___  /   /
      \   -------   /
       \_____v_____/
          |     |

ShopRust — Backend

Rust/Axum REST API powering the ShopRust ecommerce platform.

Stack

  • 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

Getting Started

# 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 run

Server starts on http://localhost:8000. Migrations and seed data run on startup.

Environment Variables

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_...)

API

Auth Prefix
None /api/products, /api/categories, /api/cart, /api/auth, /api/payments
Customer JWT /api/customer/...
Admin JWT /api/admin/...

About

Vibe Code City

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors