René's URL Explorer Experiment


Title: feat(accounts): multi-tenancy support (accounts module + dynamic active-account header) by felixkob · Pull Request #178 · base44/javascript-sdk · GitHub

Open Graph Title: feat(accounts): multi-tenancy support (accounts module + dynamic active-account header) by felixkob · Pull Request #178 · base44/javascript-sdk

X Title: feat(accounts): multi-tenancy support (accounts module + dynamic active-account header) by felixkob · Pull Request #178 · base44/javascript-sdk

Description: Summary Adds first-class multi-tenancy ("Accounts") support to the SDK, paired with the platform's per-app Accounts feature. base44.accounts module — manage accounts from inside an app: getActiveAccountId(), switchAccount(accountId, subPath?) listMine(), create({ name, data? }), update(accountId, { name?, data? }) Members: listMembers, invite, acceptInvite, changeMemberRole, removeMember, transferOwnership billing.listPlans(accountId), billing.startCheckout(accountId, { plan_id, success_url, cancel_url }) Maps to the backend /api/apps/{appId}/accounts/... runtime routes. Dynamic X-Active-Account-Id header — set per request from the URL path (//...), the canonical account source. Overrides any header frozen at module load, so account-scoped reads/writes stay isolated to the current tenant even after a client-side (Link/useNavigate) account switch. No-op for single-tenant apps and in Node. Wires accounts into the client and Base44Client type; re-exports the account types from the package root. Why Apps served under //... need every request to carry the active account and a typed surface for account/membership/billing operations. Previously the active-account header was computed once at client construction and went stale on client-side navigation. Test plan npx tsc --noEmit (clean) npm run test:types (clean) npx vitest run — full suite green (171 tests), incl. new tests/unit/accounts.test.ts Browser smoke: confirm X-Active-Account-Id follows the URL after a client-side account switch (browser-only path; not unit-tested since the suite runs in Node and jsdom isn't a dep) Notes Follow-up in the platform monorepo: the generated base44Client.js templates can drop the now-redundant static X-Active-Account-Id header. No version bump included — left to the maintainers' release flow. Made with Cursor

Open Graph Description: Summary Adds first-class multi-tenancy ("Accounts") support to the SDK, paired with the platform's per-app Accounts feature. base44.accounts module — manage accounts from inside an a...

X Description: Summary Adds first-class multi-tenancy ("Accounts") support to the SDK, paired with the platform's per-app Accounts feature. base44.accounts module — manage accounts from...

Opengraph URL: https://github.com/base44/javascript-sdk/pull/178

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:eb3a61d9-a49a-d66c-67d1-97d6932d6b38
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA3EE:2C345B:9D01F6:D19E64:6A4C4A11
html-safe-nonceac0d971006e11bc303da71fb9eb8d4995400f489c3769258584d352b93f2adb8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBM0VFOjJDMzQ1Qjo5RDAxRjY6RDE5RTY0OjZBNEM0QTExIiwidmlzaXRvcl9pZCI6IjYxNTYzNzI5NTM4MzczNTc1ODYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac6836aa054f4d317265f10c2c1e3d4f88210235706b75498019aa0ccde66c9c41
hovercard-subject-tagpull_request:3798350731
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/base44/javascript-sdk/pull/178/files
twitter:imagehttps://avatars.githubusercontent.com/u/65158729?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/65158729?s=400&v=4
og:image:altSummary Adds first-class multi-tenancy ("Accounts") support to the SDK, paired with the platform's per-app Accounts feature. base44.accounts module — manage accounts from inside an a...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/base44/javascript-sdk git https://github.com/base44/javascript-sdk.git
octolytics-dimension-user_id234699998
octolytics-dimension-user_loginbase44
octolytics-dimension-repository_id939374418
octolytics-dimension-repository_nwobase44/javascript-sdk
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id939374418
octolytics-dimension-repository_network_root_nwobase44/javascript-sdk
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release65d78903193f110d7a9d1f8587c6dc3cb911aae0
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/base44/javascript-sdk/pull/178/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fbase44%2Fjavascript-sdk%2Fpull%2F178%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fbase44%2Fjavascript-sdk%2Fpull%2F178%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=base44%2Fjavascript-sdk
Reloadhttps://github.com/base44/javascript-sdk/pull/178/files
Reloadhttps://github.com/base44/javascript-sdk/pull/178/files
Reloadhttps://github.com/base44/javascript-sdk/pull/178/files
Please reload this pagehttps://github.com/base44/javascript-sdk/pull/178/files
base44 https://github.com/base44
javascript-sdkhttps://github.com/base44/javascript-sdk
Notifications https://github.com/login?return_to=%2Fbase44%2Fjavascript-sdk
Fork 9 https://github.com/login?return_to=%2Fbase44%2Fjavascript-sdk
Star 13 https://github.com/login?return_to=%2Fbase44%2Fjavascript-sdk
Code https://github.com/base44/javascript-sdk
Issues 6 https://github.com/base44/javascript-sdk/issues
Pull requests 41 https://github.com/base44/javascript-sdk/pulls
Discussions https://github.com/base44/javascript-sdk/discussions
Actions https://github.com/base44/javascript-sdk/actions
Projects https://github.com/base44/javascript-sdk/projects
Security and quality 0 https://github.com/base44/javascript-sdk/security
Insights https://github.com/base44/javascript-sdk/pulse
Code https://github.com/base44/javascript-sdk
Issues https://github.com/base44/javascript-sdk/issues
Pull requests https://github.com/base44/javascript-sdk/pulls
Discussions https://github.com/base44/javascript-sdk/discussions
Actions https://github.com/base44/javascript-sdk/actions
Projects https://github.com/base44/javascript-sdk/projects
Security and quality https://github.com/base44/javascript-sdk/security
Insights https://github.com/base44/javascript-sdk/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fbase44%2Fjavascript-sdk%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fbase44%2Fjavascript-sdk%2Fissues%2Fnew%2Fchoose
felixkobhttps://github.com/felixkob
mainhttps://github.com/base44/javascript-sdk/tree/main
feat/accounts-multi-tenancyhttps://github.com/base44/javascript-sdk/tree/feat/accounts-multi-tenancy
Conversation 8 https://github.com/base44/javascript-sdk/pull/178
Commits 7 https://github.com/base44/javascript-sdk/pull/178/commits
Checks 5 https://github.com/base44/javascript-sdk/pull/178/checks
Files changed https://github.com/base44/javascript-sdk/pull/178/files
Please reload this pagehttps://github.com/base44/javascript-sdk/pull/178/files
feat(accounts): multi-tenancy support (accounts module + dynamic active-account header) https://github.com/base44/javascript-sdk/pull/178/files#top
Show all changes 7 commits https://github.com/base44/javascript-sdk/pull/178/files
98c80bd feat(accounts): multi-tenancy support — accounts module + dynamic act… felixkob Jun 3, 2026 https://github.com/base44/javascript-sdk/pull/178/commits/98c80bd66b62cd8bf4adb25f1e136df754580900
fb1867d fix(accounts): never read the app id as the active account from the URL felixkob Jun 4, 2026 https://github.com/base44/javascript-sdk/pull/178/commits/fb1867db99e746ec187f3fe3c581ffa5d5000293
f30dbed fix(accounts): drive active account from stored client state, not the… felixkob Jun 4, 2026 https://github.com/base44/javascript-sdk/pull/178/commits/f30dbed2a39c6f54c7ac54cb5581c20f3892d19b
feced91 feat(accounts/billing): add getSubscription + auto-resolve active acc… felixkob Jun 4, 2026 https://github.com/base44/javascript-sdk/pull/178/commits/feced91e0c60c09ae7af6460573748401351b524
b7d230a feat(accounts/billing): getSubscription reads a real subscription end… felixkob Jun 4, 2026 https://github.com/base44/javascript-sdk/pull/178/commits/b7d230a5881e4e1919e1c93c9b73df7a0beaa0df
087fce3 feat(accounts): public landing-page support (getPublicAccount, setAct… felixkob Jun 4, 2026 https://github.com/base44/javascript-sdk/pull/178/commits/087fce3b139395d92a3a9a5391684b24e0d036c7
2df4fad feat(accounts): accept optional slug on create/update felixkob Jun 4, 2026 https://github.com/base44/javascript-sdk/pull/178/commits/2df4fad3113779ebb4dbf762573b2c036ef581cc
Clear filters https://github.com/base44/javascript-sdk/pull/178/files
Please reload this pagehttps://github.com/base44/javascript-sdk/pull/178/files
Please reload this pagehttps://github.com/base44/javascript-sdk/pull/178/files
client.ts https://github.com/base44/javascript-sdk/pull/178/files#diff-25d66d74617fe2e23d7946bd6e3ba95640ab1b9bc8947445d604fc271c7c1f12
client.types.ts https://github.com/base44/javascript-sdk/pull/178/files#diff-7c19772c84026010b6011cf136c00c5c68a39162febd27aba36ae4f6c45fcf40
index.ts https://github.com/base44/javascript-sdk/pull/178/files#diff-a2a171449d862fe29692ce031981047d7ab755ae7f84c707aef80701b3ea0c80
accounts.ts https://github.com/base44/javascript-sdk/pull/178/files#diff-9a7417bb622b68a61de35b41f1cb5c0cbfb52264b6b99c536f609f782fd60659
accounts.types.ts https://github.com/base44/javascript-sdk/pull/178/files#diff-b9184e0ef6f8b2c7291e45a28f54e8d5b275c22e68dc4e10b98804958a6fbe42
axios-client.ts https://github.com/base44/javascript-sdk/pull/178/files#diff-3f0812b51b0d60c0bd97a105064988cd4b659486f5832612e2f28b3ed639fa71
common.ts https://github.com/base44/javascript-sdk/pull/178/files#diff-4ade25325a6cd7d1cca619364c84d19bfa47e6939a2c1b38d065767255b8f86e
accounts.test.ts https://github.com/base44/javascript-sdk/pull/178/files#diff-34b4f857f158af483b63a96386cae6cb436a49515aeb281fabe4972c388b216f
src/client.tshttps://github.com/base44/javascript-sdk/pull/178/files#diff-25d66d74617fe2e23d7946bd6e3ba95640ab1b9bc8947445d604fc271c7c1f12
View file https://github.com/base44/javascript-sdk/blob/2df4fad3113779ebb4dbf762573b2c036ef581cc/src/client.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/base44/javascript-sdk/pull/178/{{ revealButtonHref }}
https://github.com/base44/javascript-sdk/pull/178/files#diff-25d66d74617fe2e23d7946bd6e3ba95640ab1b9bc8947445d604fc271c7c1f12
https://github.com/base44/javascript-sdk/pull/178/files#diff-25d66d74617fe2e23d7946bd6e3ba95640ab1b9bc8947445d604fc271c7c1f12
https://github.com/base44/javascript-sdk/pull/178/files#diff-25d66d74617fe2e23d7946bd6e3ba95640ab1b9bc8947445d604fc271c7c1f12
https://github.com/base44/javascript-sdk/pull/178/files#diff-25d66d74617fe2e23d7946bd6e3ba95640ab1b9bc8947445d604fc271c7c1f12
https://github.com/base44/javascript-sdk/pull/178/files#diff-25d66d74617fe2e23d7946bd6e3ba95640ab1b9bc8947445d604fc271c7c1f12
https://github.com/base44/javascript-sdk/pull/178/files#diff-25d66d74617fe2e23d7946bd6e3ba95640ab1b9bc8947445d604fc271c7c1f12
https://github.com/base44/javascript-sdk/pull/178/files#diff-25d66d74617fe2e23d7946bd6e3ba95640ab1b9bc8947445d604fc271c7c1f12
src/client.types.tshttps://github.com/base44/javascript-sdk/pull/178/files#diff-7c19772c84026010b6011cf136c00c5c68a39162febd27aba36ae4f6c45fcf40
View file https://github.com/base44/javascript-sdk/blob/2df4fad3113779ebb4dbf762573b2c036ef581cc/src/client.types.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/base44/javascript-sdk/pull/178/{{ revealButtonHref }}
https://github.com/base44/javascript-sdk/pull/178/files#diff-7c19772c84026010b6011cf136c00c5c68a39162febd27aba36ae4f6c45fcf40
https://github.com/base44/javascript-sdk/pull/178/files#diff-7c19772c84026010b6011cf136c00c5c68a39162febd27aba36ae4f6c45fcf40
https://github.com/base44/javascript-sdk/pull/178/files#diff-7c19772c84026010b6011cf136c00c5c68a39162febd27aba36ae4f6c45fcf40
https://github.com/base44/javascript-sdk/pull/178/files#diff-7c19772c84026010b6011cf136c00c5c68a39162febd27aba36ae4f6c45fcf40
src/index.tshttps://github.com/base44/javascript-sdk/pull/178/files#diff-a2a171449d862fe29692ce031981047d7ab755ae7f84c707aef80701b3ea0c80
View file https://github.com/base44/javascript-sdk/blob/2df4fad3113779ebb4dbf762573b2c036ef581cc/src/index.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/base44/javascript-sdk/pull/178/{{ revealButtonHref }}
https://github.com/base44/javascript-sdk/pull/178/files#diff-a2a171449d862fe29692ce031981047d7ab755ae7f84c707aef80701b3ea0c80
https://github.com/base44/javascript-sdk/pull/178/files#diff-a2a171449d862fe29692ce031981047d7ab755ae7f84c707aef80701b3ea0c80
src/modules/accounts.tshttps://github.com/base44/javascript-sdk/pull/178/files#diff-9a7417bb622b68a61de35b41f1cb5c0cbfb52264b6b99c536f609f782fd60659
View file https://github.com/base44/javascript-sdk/blob/2df4fad3113779ebb4dbf762573b2c036ef581cc/src/modules/accounts.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/base44/javascript-sdk/pull/178/{{ revealButtonHref }}
Please reload this pagehttps://github.com/base44/javascript-sdk/pull/178/files
Please reload this pagehttps://github.com/base44/javascript-sdk/pull/178/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.