mirror of
https://github.com/rjNemo/rentease.git
synced 2026-06-06 02:36:49 +00:00
Some checks are pending
CI / checks (push) Waiting to run
* feat(stripe): add Stripe payment sync and webhook support Introduce Stripe integration for automatic payment ingestion and refund tracking. Adds new fields to the payment model for Stripe IDs and status, Stripe client driver, sync service, cron job, manual API endpoint, and public webhook handler for real-time updates. Includes tests and documentation. Manual cash entry remains supported. * chore(stripe): upgrade to stripe-go v83 Upgrade Stripe SDK from v79 to v83 across the codebase. Update all imports to use github.com/stripe/stripe-go/v83 and refactor client usage to match the new API, including changes to PaymentIntents listing. Update documentation and plans to reference the new version. Remove references to the old version from go.mod and go.sum. * refactor(payment): extract payment logic to new service Moves all payment-related logic (manual payments, Stripe sync, webhook handling) from the booking service into a dedicated payment service (`internal/service/payment`). Updates server, cron, and handler wiring to inject and use the new payment service. Adjusts tests, routes, and documentation to reflect the new separation of concerns. This improves cohesion, clarifies responsibilities, and prepares for future payment features. No database schema changes are introduced. * chore(ci): add Go and templ setup to CI workflow This update enhances the CI workflow by adding steps to set up Go using the version specified in go.mod, add the Go bin directory to the PATH, and install the templ code generation tool. These additions ensure that Go-based tooling is available for subsequent CI steps.
39 lines
1.2 KiB
Makefile
39 lines
1.2 KiB
Makefile
# Defaults (override via `make VAR=value`)
|
|
NAME ?= rentease
|
|
PORT ?= 8000
|
|
DB_USER ?= ruidy
|
|
DB_NAME ?= villafleurie
|
|
DEV_COMPOSE ?= docker-compose.dev.yml
|
|
|
|
DOCKER_RUN_ENV = -e DATABASE_URL="host=docker.for.mac.host.internal user=$(DB_USER) database=$(DB_NAME)" -e PORT=$(PORT)
|
|
|
|
.PHONY: help build run dev test up-deps format lint stop
|
|
|
|
help: ## List available commands
|
|
@grep -E '^[a-zA-Z_-]+:.*?## ' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " %-12s %s\n", $$1, $$2}'
|
|
|
|
build: format lint ## Build the production Docker image
|
|
docker build -t $(NAME):latest .
|
|
|
|
run: build ## Run the production container (port $(PORT))
|
|
docker run -p $(PORT):$(PORT) $(DOCKER_RUN_ENV) $(NAME)
|
|
|
|
dev: ## Start the local dev stack via docker compose
|
|
docker compose -f $(DEV_COMPOSE) up --build
|
|
|
|
test: ## Run Go tests inside the running dev container
|
|
go test ./...
|
|
|
|
up-deps: ## Update Go dependencies on host
|
|
go get -u ./...
|
|
|
|
format: ## Generate templ files and format code locally
|
|
templ generate internal/view
|
|
templ fmt .
|
|
go fmt ./...
|
|
|
|
lint: ## Lint the code using golangci-lint locally
|
|
golangci-lint run ./...
|
|
|
|
stop: ## Stop the dev stack
|
|
-@docker compose -f $(DEV_COMPOSE) down --remove-orphans >/dev/null 2>&1 || true
|