Skip to content

Conversation

@paanSinghCoder
Copy link
Contributor

@paanSinghCoder paanSinghCoder commented Jan 15, 2026

Summary

Folder Restructuring

Goal

Feat: Restructure the folder layout to match the new organization before extracting admin pages.

Target Structure

Current:

frontier/
├── sdks/js/
│   ├── packages/
│   │   ├── core/
│   │   │   ├── react/          (React SDK)
│   │   │   └── admin/          (Admin pages)
│   │   └── sdk-demo/
│   └── tools/
└── ui/                          (Admin UI app)

Target:

frontier/
└── web/                         (renamed from sdks/js/)
    ├── packages/
    │    └── core/
    │       ├── client/          (renamed from react/)
    │       └── admin/           (stays in core/)
    ├── apps/
    │   ├── admin-ui/            (moved from ui/)
    │   └── sdk-demo/            (moved from packages/sdk-demo/)
    └── tools/                   (unchanged)

Detailed Steps

1. Rename frontier/sdks/js/frontier/web/

  • Use git mv to preserve history
  • Update root pnpm-workspace.yaml: frontier/sdks/js/**frontier/web/**

2. Rename frontier/web/packages/core/react/frontier/web/packages/core/client/

  • Use git mv to preserve history
  • Update references in:
    • frontier/web/packages/core/tsup.config.ts: react/index.tsclient/index.ts, react/distclient/dist
    • frontier/web/packages/core/package.json: react/dist/**/*client/dist/**/*, ./react exports → ./client exports, dev script
    • frontier/web/packages/core/tsconfig.json: exclude react/distclient/dist
    • All internal imports: ~/react/~/client/ (193 matches found)

3. Move frontier/ui/frontier/web/apps/admin-ui/

  • Use git mv to preserve history
  • Update root pnpm-workspace.yaml: frontier/uifrontier/web/apps/admin-ui
  • Update Go embed path in frontier/pkg/server/server.go: frontier/uifrontier/web/apps/admin-ui

4. Move frontier/web/packages/sdk-demo/frontier/web/apps/sdk-demo/

  • Use git mv to preserve history
  • Update frontier/web/pnpm-workspace.yaml if it references packages/sdk-demo

5. Update workspace files

  • Root pnpm-workspace.yaml:
    • frontier/sdks/js/**frontier/web/**
    • frontier/uifrontier/web/apps/admin-ui
  • frontier/web/pnpm-workspace.yaml:
    • Update any references to moved packages

6. Update Go embed path

  • frontier/pkg/server/server.go:
    • Import: "github.com/raystack/frontier/ui""github.com/raystack/frontier/web/apps/admin-ui"
    • Embed path: ui.Assetsadminui.Assets (or appropriate name)
    • Handler path: "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)
    • dev script: react/index.tsclient/index.ts
  • frontier/web/packages/core/tsconfig.json:
    • exclude: react/distclient/dist

8. Update internal imports

  • Within frontier/web/packages/core/client/:
    • Replace all ~/react/~/client/ (193 matches found across 71 files)
    • Use find/replace or script to update all occurrences

9. Verify builds

  • Run pnpm install at root to update workspace links
  • Build frontier/web/packages/core: cd frontier/web/packages/core && pnpm run build
  • Build frontier/web/apps/admin-ui: cd frontier/web/apps/admin-ui && pnpm run build
  • Build frontier/web/apps/sdk-demo: cd frontier/web/apps/sdk-demo && pnpm run build (if applicable)
  • Verify Go build: 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.go

Core 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.json
  • All files in frontier/web/packages/core/client/ (193 import references)

Admin UI App

  • Any config files that reference old paths (vite.config.ts, tsconfig.json, etc.)

Notes

  • Use git mv for all renames/moves to preserve git history
  • The reactclient rename will require updating many internal imports
  • Keep backward compatibility in mind: we may want to keep ./react export pointing to ./client temporarily
  • After restructuring, verify that all builds work before proceeding to Phase 2

Technical Details

Test Plan

  • Manual testing completed
  • Build and type checking passes

@vercel
Copy link

vercel bot commented Jan 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
frontier Ready Ready Preview, Comment Jan 16, 2026 9:54am

@coveralls
Copy link

Pull Request Test Coverage Report for Build 21019242211

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 37.823%

Totals Coverage Status
Change from base Build 20983877421: 0.0%
Covered Lines: 15828
Relevant Lines: 41848

💛 - Coveralls

@@ -0,0 +1,25 @@
import { useEffect } from 'react';
Copy link
Contributor Author

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.

@paanSinghCoder paanSinghCoder self-assigned this Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants