Skip to content

Migrate frontend to Next.js and add dashboard AppShell with components and global styles - #3

Open
LonelyFeel wants to merge 1 commit into
mainfrom
codex/build-main-portal-shell-with-next.js
Open

Migrate frontend to Next.js and add dashboard AppShell with components and global styles#3
LonelyFeel wants to merge 1 commit into
mainfrom
codex/build-main-portal-shell-with-next.js

Conversation

@LonelyFeel

Copy link
Copy Markdown
Owner

Motivation

  • Migrate the frontend from a Vue/Vite prototype to a Next.js React application to serve as an enterprise portal shell.
  • Provide a reusable dashboard layout and UI building blocks to display KPIs, modules, recent activity, and quick-access items in a consistent shell.
  • Add typed data models and seed data to make the UI deterministic during development.
  • Include dark mode support and global styling to unify look-and-feel across components.

Description

  • Replace the Vue app and Vite configuration with a Next.js app entry points including app/layout.tsx, app/page.tsx, next.config.mjs, and next-env.d.ts, and update package.json to use next, react, and react-dom.
  • Add a component library under frontend/app/components including layout pieces (AppShell, Sidebar, Topbar), dashboard components (DashboardMain, WelcomeHero, KpiSection, KpiCard, ModuleLauncher, ModuleCard, ActivityList, QuickAccessPanel) and a shared SectionHeader.
  • Add global styles in frontend/app/globals.css, a useDarkMode hook in frontend/app/hooks/useDarkMode.ts, TypeScript types in frontend/types/portal.ts, and a tsconfig.json for the Next.js project.
  • Add seeded portal data and exports under frontend/data/portalData.ts and frontend/lib/* constants to wire sample data into the UI, and remove legacy Vue files and Vite config that are no longer needed.

Testing

  • Performed a TypeScript type-check using tsc --noEmit, which completed without type errors.
  • Built the Next.js application with npm run build (next build) as a local smoke test, and the build completed successfully.

Codex Task

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f8800c1c9b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread frontend/app/page.tsx
Comment on lines +8 to +9
<AppShell
navItems={NAV_ITEMS}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Reinstate /api/me auth check before rendering AppShell

This page now renders the full dashboard shell unconditionally from static constants, with no frontend authorization flow at all. In this codebase, /api/me is the SSO gate for whether a user is allowed to access portal data, and the previous frontend implementation enforced that before showing dashboard content; removing that check means any reachable client can load the portal UI regardless of authorization state.

Useful? React with 👍 / 👎.

@tlswlffj-cell

Copy link
Copy Markdown

Good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants