Hostack is a PNPM workspace for a deployment platform UI, its API server, shared typed API clients, and the database package that backs the app.
The repo is organized as a monorepo so the frontend, backend, database schema, and generated API contracts stay in sync.
Hostack is designed as a transparent "deploy-from-GitHub" platform. The long-term goal is Vercel-style push-to-deploy with:
- transparent builds and raw logs
- hybrid framework detection plus explicit
hostack.yamloverrides - CMS portability, including the static WordPress pipeline assets in this repo
- automation-as-code support for tools like
n8n
For the early product narrative and pipeline prototype assets, see:
artifacts/hostack: React 19 + Vite frontend for the Hostack appartifacts/api-server: Express 5 API serverartifacts/mockup-sandbox: additional artifact app in the workspacelib/api-spec: OpenAPI source and Orval codegen configlib/api-client-react: generated React Query client and API schemaslib/api-zod: generated Zod validators and shared API typeslib/auth-web: frontend auth provider/hooks built on the generated clientlib/db: Drizzle database package and schema exportslib/hostack-config: typedhostack.yamlschema, loader, and resolverscripts: local development proxy, smoke checks, and WordPress pipeline helpersexamples: fixture repos used for deployment/runtime testingcontent: sample content assets for the WordPress static pipelinestyles: shared design assets used by the prototype pipeline docswp-content: starter WordPress content structure for static export experiments
The frontend includes pages for:
- dashboard
- projects and project detail
- deployments and deployment detail
- integrations
- logs
- metrics
- settings
- auth callback handling
The API exposes routes for:
- health
- auth
- projects
- deployments
- environment variables
- dashboard data
- profile
- GitHub
- integrations
- observability
- SSH keys
- custom domains
- copilot
- notifications
- build rules
- Node.js with
corepack corepackenabled so the pinned PNPM version is used- PostgreSQL
- Auth0 or another OIDC provider
- optional OpenAI-compatible API key for AI integrations
-
Enable Corepack if you have not already:
corepack enable -
Install dependencies:
pnpm install
-
Create a local env file from the example:
cp .env.example .env
On PowerShell:
Copy-Item .env.example .env -
Fill in at least:
DATABASE_URLSECRET_ENCRYPTION_KEYAUTH0_DOMAINAUTH0_CLIENT_IDAUTH0_CLIENT_SECRET
-
Start the full local stack:
pnpm dev
-
Open
http://localhost:3000.
This app expects the frontend and /api auth routes to share the same public origin.
For local development, pnpm dev starts:
- a public proxy on
APP_PORT(default3000) - the API on
API_PORT(default3001) - the Vite frontend on
FRONTEND_PORT(default5173)
The proxy keeps auth redirects and API calls on the same origin, which is required for the current auth flow.
If you run the frontend separately with pnpm dev:frontend, you will usually still need a reverse proxy in front of the frontend and API so they appear under one public origin.
The main variables are documented in .env.example.
Common ones:
APP_URL: public origin used in auth callbacks and generated linksAPP_PORT: public proxy port used bypnpm devAPI_PORT: internal API port used bypnpm devFRONTEND_PORT: internal Vite port used bypnpm devPORT: API port when running the API directlyDATABASE_URL: PostgreSQL connection stringSECRET_ENCRYPTION_KEY: 32-byte secret, encoded as base64 or 64 hex charsBASE_PATH: frontend base pathCORS_ALLOWED_ORIGINS: allowed browser origins for the APIAI_INTEGRATIONS_OPENAI_API_KEY: optional OpenAI-compatible API key
From the repo root:
pnpm dev
pnpm dev:frontend
pnpm dev:api
pnpm build
pnpm lint
pnpm typecheck
pnpm smokeWhat they do:
pnpm dev: starts the public proxy plus frontend, API, and worker togetherpnpm dev:frontend: runs the Vite app directlypnpm dev:api: runs the API directlypnpm build: typechecks then builds all packages with build scriptspnpm lint: runs package-level ESLint where availablepnpm typecheck: builds TypeScript project references and app-level typecheckspnpm smoke: probes the frontend shell and/api/auth/user
The OpenAPI source lives in lib/api-spec/openapi.yaml.
Orval generates:
- React Query client code into
lib/api-client-react/src/generated - Zod validators and API types into
lib/api-zod/src/generated
Regenerate both with:
pnpm --filter @workspace/api-spec codegenThe database package uses Drizzle with PostgreSQL.
Useful commands:
pnpm --filter @workspace/db push
pnpm --filter @workspace/db push-forceSchema config lives in lib/db/drizzle.config.ts, and the package exports both the db instance and schema types.
- frontend build output:
artifacts/hostack/dist/public - API bundle output:
artifacts/api-server/dist/index.cjs
The fixture repos under examples are used to validate runtime and deployment behavior.
examples/static-test-repo: should serveSTATIC TEST OKexamples/node-test-repo: should serveNODE TEST OK
See examples/README.md for the expected build/install behavior.
If you are new to the repo, start with:
package.jsonpnpm-workspace.yaml.env.examplescripts/src/dev.tsartifacts/hostack/src/App.tsxartifacts/api-server/src/app.tsartifacts/api-server/src/routes/index.tslib/api-spec/orval.config.tslib/db/drizzle.config.ts
MIT