2
0

Version 1

This commit is contained in:
MangoPig
2026-06-23 18:50:37 +01:00
commit 55d9772272
133 changed files with 21515 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
project_root := justfile_directory()
backend_dir := project_root + "/Backend"
# Format backend Go source files.
fmt:
cd '{{backend_dir}}' && gofmt -w ./cmd ./internal
# Run backend test suite.
test:
cd '{{backend_dir}}' && go test ./...
# Open a psql shell into the local Royal Pop database container.
psql:
docker compose -f '{{project_root}}/Docker/docker-compose.local.dev.yaml' exec postgres psql -U royalpop -d royalpop
# Run backend module cleanup.
tidy:
cd '{{backend_dir}}' && go mod tidy
+26
View File
@@ -0,0 +1,26 @@
project_root := justfile_directory()
store_dir := project_root + "/Store"
local_compose := project_root + "/Docker/docker-compose.local.dev.yaml"
node_modules_volume := "royal_pop_store_node_modules"
# Recreate the storefront node_modules Docker volume.
node_modules:
docker compose -f '{{local_compose}}' rm -sf store >/dev/null 2>&1 || true
docker volume rm -f '{{node_modules_volume}}' >/dev/null 2>&1 || true
docker compose -f '{{local_compose}}' up -d --remove-orphans --force-recreate store
# Build the storefront.
build:
cd '{{store_dir}}' && npm run build
# Print the local client dashboard URL.
client-url:
printf '%s\n' 'Client dashboard: http://localhost:4321/client/'
# Print the local client orders URL.
client-orders-url:
printf '%s\n' 'Client orders: http://localhost:4321/client/orders/'
# Print the local client stock URL.
client-stock-url:
printf '%s\n' 'Client stock: http://localhost:4321/client/stock/'
+40
View File
@@ -0,0 +1,40 @@
project_root := justfile_directory()
backend_dir := project_root + "/Backend"
backend_bake := project_root + "/Backend/docker-bake.hcl"
store_dir := project_root + "/Store"
store_bake := project_root + "/Store/docker-bake.hcl"
local_compose := project_root + "/Docker/docker-compose.local.dev.yaml"
mod frontend
mod backend
mod stripe
# Default flow: rebuild the local development images and recreate the stack.
rebuild:
cd '{{backend_dir}}' && docker buildx bake -f '{{backend_bake}}' dev
cd '{{store_dir}}' && docker buildx bake -f '{{store_bake}}' dev
docker compose -f '{{local_compose}}' up -d --remove-orphans --force-recreate
# Build the local development images.
build:
cd '{{backend_dir}}' && docker buildx bake -f '{{backend_bake}}' dev
cd '{{store_dir}}' && docker buildx bake -f '{{store_bake}}' dev
# Start the local development stack in the background using the current image.
up:
docker compose -f '{{local_compose}}' up -d --remove-orphans --force-recreate
# Build first, then start the local development stack in the background.
start: build up
# Stop and remove the local development stack.
down:
docker compose -f '{{local_compose}}' down --remove-orphans --volumes
# Follow logs for the local development stack.
logs:
docker compose -f '{{local_compose}}' logs -f
# Restart the local development stack.
restart:
docker compose -f '{{local_compose}}' restart
+6
View File
@@ -0,0 +1,6 @@
project_root := justfile_directory()
backend_webhook_url := "http://localhost:8081/webhooks/stripe"
# Forward Stripe test webhooks to the local API.
listen:
stripe listen --forward-to '{{backend_webhook_url}}'