-
Notifications
You must be signed in to change notification settings - Fork 42
feat: restructure frontier admin files and add config for the admin folder #1333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Pull Request Test Coverage Report for Build 21019242211Details
💛 - Coveralls |
| @@ -0,0 +1,25 @@ | |||
| import { useEffect } from 'react'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dummy file just to test the new Admin folder. This will contain the exportable frontier admin files coming from ui folder.
… the web directory
…e no longer needed for building admin UI
…ust related package versions in pnpm-lock.yaml; add .gitkeep file in admin-ui dist directory
| @@ -22,7 +22,7 @@ export default function PageHeader({ | |||
| align="center" | |||
| justify="between" | |||
| className={className} | |||
| style={{ padding: "16px 24px", ...style }} | |||
| style={{ padding: "16px 24px", ...style } as any} | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking this
Folder Restructuring for Frontier admin
Goal
Feat: Restructure the folder layout to match the new organization before extracting admin pages.
Target Structure
Current:
Target:
Note: In this PR we only move Admin related files. SDK related files will be moved in another iteration.
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