Sign in to Factorize
Manage your software factory and its Jobs.
+Continue with Linear +New here? Sign in to create your workspace. Email, Google, and Linear sign-in can be added as authentication providers without changing your Jobs.
+diff --git a/docs/marketing-app.md b/docs/marketing-app.md new file mode 100644 index 00000000..f58aea7b --- /dev/null +++ b/docs/marketing-app.md @@ -0,0 +1,10 @@ +# Marketing site and app + +Factorize is deployed as two Cloudflare Workers: + +- `packages/marketing` owns the public landing page at `https://factorize.sh`. It contains no authenticated APIs or tenant data. Set `APP_ORIGIN` to the app origin so login and Create a Job links always cross to the app. +- `packages/app` owns the authenticated dashboard, OAuth callbacks, API/MCP endpoints, provider webhooks, and job deep links at `https://app.factorize.sh`. Its `/` route is the signed-out login entry point and redirects signed-in users to `/jobs`. + +Run the two Workers independently with `npm run dev` and `npm run dev:marketing`. Deploy the complete setup with `npm run deploy`; deploy only the public site with `npm run deploy:marketing`. + +Configure the Linear OAuth callback and provider webhooks against the app origin, never the marketing origin. Existing `/jobs/*`, `/api/*`, `/mcp`, `/authorize`, and webhook URLs remain app routes. diff --git a/package-lock.json b/package-lock.json index 8e937671..151fc6a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4097,6 +4097,10 @@ "resolved": "packages/app", "link": true }, + "node_modules/factorize-marketing": { + "resolved": "packages/marketing", + "link": true + }, "node_modules/factorize-tail-relay": { "resolved": "packages/tail-relay", "link": true @@ -5889,6 +5893,18 @@ "wrangler": "^4.44.0" } }, + "packages/marketing": { + "name": "factorize-marketing", + "version": "0.1.0", + "dependencies": { + "hono": "^4.11.4" + }, + "devDependencies": { + "@cloudflare/workers-types": "^5.20260910.1", + "typescript": "^5.9.3", + "wrangler": "^4.44.0" + } + }, "packages/tail-relay": { "name": "factorize-tail-relay", "version": "0.1.0", diff --git a/package.json b/package.json index dc5a1105..68e4d9ff 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,12 @@ "workspaces": ["packages/*"], "scripts": { "dev": "npm run dev --workspace=factorize", + "dev:marketing": "npm run dev --workspace=factorize-marketing", "build:css": "npm run build:css --workspace=factorize", "test": "npm run test --workspaces --if-present", - "check": "npm run check --workspace=factorize && npm run check --workspace=factorize-tail-relay", - "deploy": "npm run deploy:app && npm run deploy:tail-relay", + "check": "npm run check --workspace=factorize && npm run check --workspace=factorize-marketing && npm run check --workspace=factorize-tail-relay", + "deploy": "npm run deploy:marketing && npm run deploy:app && npm run deploy:tail-relay", + "deploy:marketing": "npm run deploy --workspace=factorize-marketing", "deploy:app": "npm run deploy --workspace=factorize", "deploy:tail-relay": "npm run deploy --workspace=factorize-tail-relay" } diff --git a/packages/app/src/index.ts b/packages/app/src/index.ts index 43a798e4..a2369b4b 100644 --- a/packages/app/src/index.ts +++ b/packages/app/src/index.ts @@ -5,7 +5,7 @@ import { equalHmac, hmac } from "./crypto"; import { Tenant, TenantV2 } from "./tenant"; import { GitHubInstallationRegistry, GitHubInstallationRegistryV2 } from "./github-registry"; import { createAppJwt, githubHeaders, readSetupState, signSetupState } from "./github"; -import { apiKeysSettingsPage, jobDetailPage, jobPage, jobsPage, jobRunPage, landingPage, settingsPage } from "./ui"; +import { apiKeysSettingsPage, jobDetailPage, jobPage, jobsPage, jobRunPage, loginPage, settingsPage } from "./ui"; import type { Env } from "./types"; import { ACCESS_SCOPES, accessTokenDigest, issueAccessToken } from "./access-tokens"; @@ -330,7 +330,7 @@ const render = (page: string, nonce: string) => page.replaceAll(" +
Manage your software factory and its Jobs.
+Continue with Linear +New here? Sign in to create your workspace. Email, Google, and Linear sign-in can be added as authentication providers without changing your Jobs.
+