Simple Commerce is a ecommerce platform for the sale of digital products.
This code is made available under Apache-2.0
license. See the LICENSE file.
Simple Commerce is a headless commerce platform that performs a minimal set of commerce primitives.
Simple Commerce now supports CLI commands for different operations:
- serve: Start the GraphQL web server (default if no command specified)
- migrate: Run database migrations only
- migrate --seed: Run database migrations and seed the database
# Start the server (default behavior)
SPRING_PROFILES_ACTIVE=oidc-authn,keto-authz ./gradlew bootRun
# Start the server explicitly
SPRING_PROFILES_ACTIVE=oidc-authn,keto-authz ./gradlew bootRun --args="serve"
# Run migrations only
./gradlew bootRun --args="migrate"
# Run migrations and seed the database
./gradlew bootRun --args="migrate --seed"
# Build the application
./gradlew build
# Start the server
java -jar app/build/libs/app-*.jar serve
# Run migrations only
java -jar app/build/libs/app-*.jar migrate
# Run migrations and seed the database
java -jar app/build/libs/app-*.jar migrate --seed
Build docker image for use in docker compose:
docker build -t juliuskrah/simple-commerce .
docker compose --profile keto-authz --profile oidc-authn --profile app up -d
This will:
- Start dependencies (PostgreSQL, MinIO, OIDC, Keto)
- Run database migrations with seeding (
simple-commerce-migrate
) - Start the web server (
simple-commerce
)
docker compose --profile keto-authz --profile oidc-authn --profile app down --remove-orphans
We welcome contributions to Simple Commerce! If you have an idea for a new feature, bug fix, or improvement, please open an issue or submit a pull request. Please make sure to follow the contribution guidelines when submitting your changes.
Before commiting your changes, please make sure to run the tests and ensure that everything is working as expected.
./gradlew test