From 19d51e4b2a3861e0d32599ecc547fe0a1c3c79cb Mon Sep 17 00:00:00 2001 From: Dhravya Shah Date: Wed, 6 May 2026 22:42:34 -0700 Subject: [PATCH 1/4] use portless --- apps/browser-extension/utils/posthog.ts | 5 ++++- apps/browser-extension/wxt.config.ts | 2 +- apps/docs/package.json | 4 +++- apps/mcp/package.json | 4 +++- apps/memory-graph-playground/package.json | 4 +++- apps/web/package.json | 4 +++- portless.json | 15 +++++++++++++++ 7 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 portless.json diff --git a/apps/browser-extension/utils/posthog.ts b/apps/browser-extension/utils/posthog.ts index f99030e35..1d698e345 100644 --- a/apps/browser-extension/utils/posthog.ts +++ b/apps/browser-extension/utils/posthog.ts @@ -47,7 +47,10 @@ async function initializePostHog(): Promise { throw new Error("PostHog API key not configured") } - posthog.init(import.meta.env.WXT_POSTHOG_API_KEY || "", POSTHOG_CONFIG) + posthog.init( + "phc_ShqecfUPQgf16lWu6ZMUzduQvcWzCywrkCz5KHwmWsv", + POSTHOG_CONFIG, + ) await identifyUser(posthog) diff --git a/apps/browser-extension/wxt.config.ts b/apps/browser-extension/wxt.config.ts index 7dc2580ac..c810e73f5 100644 --- a/apps/browser-extension/wxt.config.ts +++ b/apps/browser-extension/wxt.config.ts @@ -29,7 +29,7 @@ export default defineConfig({ manifest: { name: "supermemory", homepage_url: "https://supermemory.ai", - version: "6.1.2", + version: "6.1.3", permissions: ["storage", "activeTab", "webRequest", "tabs"], host_permissions: [ "*://x.com/*", diff --git a/apps/docs/package.json b/apps/docs/package.json index 908f5fa52..a3aff8c29 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -3,8 +3,10 @@ "module": "index.ts", "type": "module", "private": true, + "portless": { "name": "docs.dev.supermemory", "script": "dev:app", "appPort": 3003 }, "scripts": { - "dev": "bunx mintlify@latest dev --no-open --port 3003" + "dev": "portless", + "dev:app": "bunx mintlify@latest dev --no-open --port 3003" }, "devDependencies": { "@types/bun": "latest", diff --git a/apps/mcp/package.json b/apps/mcp/package.json index e7acecc7e..936c84468 100644 --- a/apps/mcp/package.json +++ b/apps/mcp/package.json @@ -2,9 +2,11 @@ "name": "supermemory-mcp", "version": "4.0.0", "type": "module", + "portless": { "name": "mcp.dev.supermemory", "script": "dev:app" }, "scripts": { "build:ui": "vite build", - "dev": "vite build && wrangler dev --port 8788", + "dev": "portless", + "dev:app": "vite build && wrangler dev --port ${PORT:-8788}", "deploy": "vite build && wrangler deploy --minify", "cf-typegen": "wrangler types --env-interface CloudflareBindings" }, diff --git a/apps/memory-graph-playground/package.json b/apps/memory-graph-playground/package.json index 308e2a81f..a0786f8e7 100644 --- a/apps/memory-graph-playground/package.json +++ b/apps/memory-graph-playground/package.json @@ -2,8 +2,10 @@ "name": "memory-graph-playground", "version": "0.1.0", "private": true, + "portless": { "name": "graph.dev.supermemory", "script": "dev:app" }, "scripts": { - "dev": "next dev", + "dev": "portless", + "dev:app": "next dev --port ${PORT:-3004}", "build": "next build", "start": "next start" }, diff --git a/apps/web/package.json b/apps/web/package.json index 80c63d9ee..6e731d360 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -2,8 +2,10 @@ "name": "@repo/web", "version": "0.1.0", "private": true, + "portless": { "name": "app.dev.supermemory", "script": "dev:app" }, "scripts": { - "dev": "next dev", + "dev": "portless", + "dev:app": "next dev --port ${PORT:-3000}", "build": "next build", "start": "next start", "lint": "biome check --write", diff --git a/portless.json b/portless.json new file mode 100644 index 000000000..2f7c40036 --- /dev/null +++ b/portless.json @@ -0,0 +1,15 @@ +{ + "apps": { + "apps/web": { "name": "app.dev.supermemory", "script": "dev:app" }, + "apps/mcp": { "name": "mcp.dev.supermemory", "script": "dev:app" }, + "apps/docs": { + "name": "docs.dev.supermemory", + "script": "dev:app", + "appPort": 3003 + }, + "apps/memory-graph-playground": { + "name": "graph.dev.supermemory", + "script": "dev:app" + } + } +} From bb05ae5e2c509348c3ac5dd631f0e84ccd6be7ec Mon Sep 17 00:00:00 2001 From: Dhravya Shah Date: Wed, 6 May 2026 22:46:44 -0700 Subject: [PATCH 2/4] easier for contrbutors --- CONTRIBUTING.md | 9 ++++++--- package.json | 1 + turbo.json | 4 ++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c05deff33..2e7c29eca 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,10 +48,12 @@ Before you begin, ensure you have the following installed: 5. **Start the Development Server** ```bash - bun run dev + bun run dev:local ``` - This will start all applications in the monorepo. The web app will be available at `http://localhost:3000`. + This starts each app on plain `localhost` ports (web on 3000, mcp on 8788, docs on 3003, graph on 3004) and points the web app at the public API at `https://api.supermemory.ai` via `NEXT_PUBLIC_BACKEND_URL` in `.env.example`. Sign in with magic-link/email-OTP — Google/GitHub OAuth sign-in won't round-trip back to localhost. + + > **Internal team note:** `bun run dev` (without `:local`) routes through [portless](https://github.com/portless/portless) to give every app a stable `*.dev.supermemory.ai` HTTPS URL with shared cookies and a working OAuth proxy. That path requires `bun run setup:dev` once (binds port 443, trusts a local CA). OSS contributors don't need it. ## 📁 Project Structure @@ -84,7 +86,8 @@ supermemory/ ### Available Scripts -- `bun run dev` - Start development servers for all apps +- `bun run dev:local` - Start dev servers on plain localhost ports (recommended for OSS contributors) +- `bun run dev` - Start dev servers through portless (`*.dev.supermemory.ai`, internal team) - `bun run build` - Build all applications - `bun run format-lint` - Format and lint code using Biome - `bun run check-types` - Type check all packages diff --git a/package.json b/package.json index 7f4bddd9f..bceb3748c 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "scripts": { "build": "turbo run build", "dev": "turbo run dev", + "dev:local": "turbo run dev:app", "format-lint": "bunx biome check --write", "check-types": "turbo run check-types", "sentry:sourcemaps": "_SENTRY_RELEASE=$(sentry-cli releases propose-version) && sentry-cli releases new $_SENTRY_RELEASE --org=supermemory --project=consumer-app && sentry-cli sourcemaps upload --org=supermemory --project=consumer-app --release=$_SENTRY_RELEASE --strip-prefix 'dist/..' dist", diff --git a/turbo.json b/turbo.json index 35bf68e9a..d635ddf88 100644 --- a/turbo.json +++ b/turbo.json @@ -16,6 +16,10 @@ "dev": { "cache": false, "persistent": true + }, + "dev:app": { + "cache": false, + "persistent": true } } } From e8ec237d99b5eb209479b2512eb979ef7e2fcd48 Mon Sep 17 00:00:00 2001 From: MaheshtheDev <38828053+MaheshtheDev@users.noreply.github.com> Date: Thu, 7 May 2026 06:44:07 +0000 Subject: [PATCH 3/4] fix: onboarding org creation issue on skip (#906) --- apps/web/app/(app)/onboarding/page.tsx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/apps/web/app/(app)/onboarding/page.tsx b/apps/web/app/(app)/onboarding/page.tsx index 00696decc..ac5540559 100644 --- a/apps/web/app/(app)/onboarding/page.tsx +++ b/apps/web/app/(app)/onboarding/page.tsx @@ -371,6 +371,7 @@ export default function OnboardingPage() { const inputRef = useRef(null) const fileRef = useRef(null) const pollingRef = useRef | null>(null) + const skippingRef = useRef(false) const [spotlightCategory, setSpotlightCategory] = useState("productivity") const [pauseSpotlight, setPauseSpotlight] = useState(false) @@ -461,6 +462,18 @@ export default function OnboardingPage() { await refetchOrganizations() }, [user, organizations, refetchOrganizations, setActiveOrg]) + const handleSkip = useCallback(async () => { + if (skippingRef.current) return + skippingRef.current = true + try { + await ensureOrg() + router.push("/") + } catch (err) { + console.error(err) + skippingRef.current = false + } + }, [ensureOrg, router]) + const pollDocument = useCallback((docId: string) => { const maxAttempts = 60 let attempt = 0 @@ -620,7 +633,7 @@ export default function OnboardingPage() {