Quickstart
Get a store running against PostgreSQL in three steps.
1. Create a database
Section titled “1. Create a database”# PostgreSQLsudo -u postgres psql -c "CREATE DATABASE rcommerce;"sudo -u postgres psql -c "CREATE USER rcommerce WITH PASSWORD 'your_password';"sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE rcommerce TO rcommerce;"2. Configure
Section titled “2. Configure”Create config.toml:
[server]host = "0.0.0.0"port = 8080
[database]db_type = "Postgres"host = "localhost"port = 5432database = "rcommerce"username = "rcommerce"password = "your_password"
[security.jwt]secret = "change-this-to-a-random-string"expiry_hours = 243. Start the server
Section titled “3. Start the server”rcommerce serve -c config.tomlThe API is now running on http://localhost:8080. Migrations run automatically on first start.
Verify
Section titled “Verify”# Health checkcurl http://localhost:8080/health
# List products (empty on fresh install)curl http://localhost:8080/api/v1/productsCreate your first product
Section titled “Create your first product”curl -X POST http://localhost:8080/api/v1/products \ -H "Content-Type: application/json" \ -d '{ "title": "Sample Product", "slug": "sample-product", "price": 29.99, "currency": "USD", "sku": "SAMPLE-001", "inventory_quantity": 100, "is_active": true }'Next steps
Section titled “Next steps”- Configuration reference — all config options
- API overview — start building your storefront
- Import data — bring over an existing store