- @settlekit/sdk: typed fetch HTTP client over the REST API; one resource client per /v1 resource (products, checkout, payments, entitlements, licenseKeys, apiKeys, bundles, github, discord, saas, escrow, agentServices…), AbortController timeouts, idempotency keys, SettleKitApiError envelope mapping. - @settlekit/react: SettleKitProvider, useEntitlement/useCheckout/useCredits hooks, <Paywall> + <UpgradeButton> (React 18, plan §4). - database: drizzle.config.ts + generated drizzle/0000_init.sql (48 tables, indexes, FKs) + db:generate/migrate/push/studio scripts. - infra: README, ARCHITECTURE, CONTRIBUTING, .env.example, .dockerignore, docker-compose.yml, per-app Dockerfiles + Dockerfile.next, Makefile. No tests. No CI/CD pipelines.
37 lines
1.0 KiB
Makefile
37 lines
1.0 KiB
Makefile
# SettleKit developer Makefile.
|
|
# Run `make help` to list targets.
|
|
|
|
.DEFAULT_GOAL := help
|
|
.PHONY: help install build dev-api dev-worker dev-dashboard db-up db-migrate up down
|
|
|
|
help: ## List available targets
|
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
|
|
| awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-14s\033[0m %s\n", $$1, $$2}'
|
|
|
|
install: ## Install all workspace dependencies
|
|
pnpm install
|
|
|
|
build: ## Build every package and app
|
|
pnpm -r build
|
|
|
|
dev-api: ## Run the API in dev mode (port 8787)
|
|
pnpm --filter @settlekit/api dev
|
|
|
|
dev-worker: ## Run the background worker in dev mode
|
|
pnpm --filter @settlekit/worker dev
|
|
|
|
dev-dashboard: ## Run the merchant dashboard in dev mode (port 3001)
|
|
pnpm --filter @settlekit/dashboard dev
|
|
|
|
db-up: ## Start the Postgres service in Docker
|
|
docker compose up -d postgres
|
|
|
|
db-migrate: ## Apply database migrations
|
|
pnpm --filter @settlekit/database db:migrate
|
|
|
|
up: ## Build and start the full stack (docker compose up)
|
|
docker compose up --build
|
|
|
|
down: ## Stop and remove the docker compose stack
|
|
docker compose down
|