Apply to staging

January 7, 2026 ยท View on GitHub

Setup

pnpm run setup

This installs all dependencies and builds required packages.

Development

pnpm run dev:user-application

Deployment

Environments

EnvironmentDatabaseDeploy CommandTrigger
LocalSQLite (.wrangler/)pnpm dev:user-applicationLocal dev server
StagingD1 grabientpnpm deploy:stagingManual or non-main branches
ProductionD1 grabient-prodpnpm deploy:productionPush to main branch

Manual Deployment

# Deploy to staging
pnpm deploy:staging

# Deploy to production
pnpm deploy:production

Cloudflare CI

Production deploys automatically when pushing to main. Configure in Cloudflare Dashboard:

  • Build command: pnpm run build:data-ops && pnpm run --filter user-application build
  • Deploy command: wrangler deploy --env production

Database

Seeding Local Database

After starting the dev server once (initializes D1), seed with sample data:

pnpm db:seed

Seeding Staging

cd packages/data-ops
pnpm db:seed remote --db=grabient

Seeding Production

cd packages/data-ops
pnpm db:seed:prod --db=grabient-prod

Database Studio

pnpm db:studio

Running Migrations

cd packages/data-ops

# Generate migration from schema changes
pnpm drizzle:generate

# Apply to staging
pnpm wrangler d1 migrations apply grabient --remote

# Apply to production
pnpm wrangler d1 migrations apply grabient-prod --remote

Acknowledgments

Built using saas-kit by Backpine (MIT License).

Color gradient generation inspired by Inigo Quilez's cosine gradient technique and thi-ng/cgg.

License

Functional Source License 1.1, Apache 2.0 Future License (FSL-1.1-ALv2).

  • You can use, modify, and distribute this code
  • You can build non-competing products
  • You cannot build a competing commercial color palette service
  • After 2 years, becomes Apache 2.0 (fully open source)

See LICENSE.md for details.