feat: add config for admin folder #1333
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Folder Restructuring
Goal
Feat: Restructure the folder layout to match the new organization before extracting admin pages.
Target Structure
Current:
Target:
Detailed Steps
1. Rename
frontier/sdks/js/→frontier/web/git mvto preserve historypnpm-workspace.yaml:frontier/sdks/js/**→frontier/web/**2. Rename
frontier/web/packages/core/react/→frontier/web/packages/core/client/git mvto preserve historyfrontier/web/packages/core/tsup.config.ts:react/index.ts→client/index.ts,react/dist→client/distfrontier/web/packages/core/package.json:react/dist/**/*→client/dist/**/*,./reactexports →./clientexports, dev scriptfrontier/web/packages/core/tsconfig.json: excludereact/dist→client/dist~/react/→~/client/(193 matches found)3. Move
frontier/ui/→frontier/web/apps/admin-ui/git mvto preserve historypnpm-workspace.yaml:frontier/ui→frontier/web/apps/admin-uifrontier/pkg/server/server.go:frontier/ui→frontier/web/apps/admin-ui4. Move
frontier/web/packages/sdk-demo/→frontier/web/apps/sdk-demo/git mvto preserve historyfrontier/web/pnpm-workspace.yamlif it referencespackages/sdk-demo5. Update workspace files
pnpm-workspace.yaml:frontier/sdks/js/**→frontier/web/**frontier/ui→frontier/web/apps/admin-uifrontier/web/pnpm-workspace.yaml:6. Update Go embed path
frontier/pkg/server/server.go:"github.com/raystack/frontier/ui"→"github.com/raystack/frontier/web/apps/admin-ui"ui.Assets→adminui.Assets(or appropriate name)"dist/ui"→"dist/admin-ui"(verify actual dist folder name)7. Update build configs
frontier/web/packages/core/tsup.config.ts:entry: ['react/index.ts']→entry: ['client/index.ts']outDir: 'react/dist'→outDir: 'client/dist'frontier/web/packages/core/package.json:files:react/dist/**/*→client/dist/**/*exports["./react"]→exports["./client"](or keep both for backward compat if needed)devscript:react/index.ts→client/index.tsfrontier/web/packages/core/tsconfig.json:exclude:react/dist→client/dist8. Update internal imports
frontier/web/packages/core/client/:~/react/→~/client/(193 matches found across 71 files)9. Verify builds
pnpm installat root to update workspace linksfrontier/web/packages/core:cd frontier/web/packages/core && pnpm run buildfrontier/web/apps/admin-ui:cd frontier/web/apps/admin-ui && pnpm run buildfrontier/web/apps/sdk-demo:cd frontier/web/apps/sdk-demo && pnpm run build(if applicable)cd frontier && go build(to ensure embed path works)Files to Update
Workspace & Config
/Users/gaurav/Pixxel/identity/pnpm-workspace.yaml/Users/gaurav/Pixxel/identity/frontier/web/pnpm-workspace.yaml(after rename)Go Files
/Users/gaurav/Pixxel/identity/frontier/pkg/server/server.goCore Package
/Users/gaurav/Pixxel/identity/frontier/web/packages/core/tsup.config.ts/Users/gaurav/Pixxel/identity/frontier/web/packages/core/package.json/Users/gaurav/Pixxel/identity/frontier/web/packages/core/tsconfig.jsonfrontier/web/packages/core/client/(193 import references)Admin UI App
Notes
git mvfor all renames/moves to preserve git historyreact→clientrename will require updating many internal imports./reactexport pointing to./clienttemporarilyTechnical Details
Test Plan