Skip to content

ColormaticStudios/ecommerce

Repository files navigation

Ecommerce

Self-hostable ecommerce platform with a Go backend (Gin + GORM + PostgreSQL), a SvelteKit frontend, and a CLI for admin workflows.

Documentation

Project documentation is maintained in the wiki:

API reference is generated in:

Frontend-specific docs are in:

Features

  • Authentication and authorization (local auth + OIDC)
  • Product catalog and admin product management
  • Cart and order workflows
  • Storefront configuration and draft/preview publishing
  • Media upload/processing pipeline
  • Runtime-extensible checkout providers (payment, shipping, tax)
  • CLI for user and product administration

Quick Start

  1. Configure environment:
cp .env.example .env
# Edit .env and fill in variables
  1. Start PostgreSQL for development:
sudo scripts/run-dev-db-docker.sh
# or
scripts/run-dev-db-podman.sh
  1. Run the API:
make run
  1. (Optional) seed sample data:
scripts/populate-test-database.sh
  1. Run frontend:
cd frontend
bun install
bun run dev

Note: the storefront placeholders that the AI generated are cringe but funny, so I left them in. The example products are certified artisan humanslop.

Build and Test

Build binaries:

make all
# or
make api
make cli

Run backend tests:

make test

Run frontend checks:

cd frontend
bun run check
bun run lint

Database migrations:

make migrate
make migrate-check

Note: pending migrations are also applied automatically when starting the API or using CLI commands that open the database.

License

Licensed under the MIT License. See LICENSE.