Skip to content

Create account management features#6

Merged
seriwb merged 11 commits into
mainfrom
feature/accounts
Mar 5, 2026
Merged

Create account management features#6
seriwb merged 11 commits into
mainfrom
feature/accounts

Conversation

@seriwb
Copy link
Copy Markdown
Owner

@seriwb seriwb commented Mar 5, 2026

No description provided.

@seriwb seriwb self-assigned this Mar 5, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds account management capabilities to the admin app, including admin API routes and UI pages for listing, creating, editing, and deleting accounts, plus a dashboard widget for recently created accounts.

Changes:

  • Added /api/admin/* endpoints for account CRUD and dashboard “recent accounts”.
  • Implemented new /system/accounts pages/components for list/create/edit flows.
  • Updated server-side fetch behavior and navigation/layout wiring; bumped a couple dev dependencies.

Reviewed changes

Copilot reviewed 40 out of 44 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
yarn.lock Updates lockfile for dependency bumps.
apps/admin/package.json Bumps globals and postcss versions.
apps/admin/src/styles/globals.css Tweaks theme CSS variables (incl. destructive foreground).
apps/admin/src/server/domains/account.ts Updates AccountSummary type import path.
apps/admin/src/proxy.ts Adjusts auth handling behavior + matcher paths (intended for request protection).
apps/admin/src/lib/server/private-api.ts Forwards cookies in server-side internal API calls.
apps/admin/src/app/api/admin/dashboard/recent-accounts/route.ts New API to fetch accounts created since start of month.
apps/admin/src/app/api/admin/accounts/route.ts New admin API for account list + account creation.
apps/admin/src/app/api/admin/accounts/[id]/route.ts New admin API for account detail + update + delete.
apps/admin/src/app/api/accounts/create-first-account/route.ts Prevents creating “first account” if an active account already exists.
apps/admin/src/app/(auth)/firstuser/_lib/actions.ts Aligns “active account exists” response shape to boolean.
apps/admin/src/app/(app)/system/accounts/page.tsx Server-renders account list with query params + initial data fetch.
apps/admin/src/app/(app)/system/accounts/new/page.tsx Adds “new account” page.
apps/admin/src/app/(app)/system/accounts/new/layout.tsx Adds metadata/layout wrapper for “new account” route.
apps/admin/src/app/(app)/system/accounts/new/_lib/schemas.ts Adds Zod schema for create-account form.
apps/admin/src/app/(app)/system/accounts/new/_lib/actions.ts Adds server action to create accounts via admin API.
apps/admin/src/app/(app)/system/accounts/new/_components/schemas.ts Removes old create-account schema file.
apps/admin/src/app/(app)/system/accounts/new/_components/create-account.tsx Adds create-account form UI.
apps/admin/src/app/(app)/system/accounts/_lib/types.ts Introduces shared account types for list/detail.
apps/admin/src/app/(app)/system/accounts/_lib/schemas.ts Adds schema for listing accounts (query/sort/paging).
apps/admin/src/app/(app)/system/accounts/_lib/constants.ts Adds account privilege constants.
apps/admin/src/app/(app)/system/accounts/_lib/actions.ts Adds server actions for list + delete.
apps/admin/src/app/(app)/system/accounts/_components/types.ts Removes old account component types.
apps/admin/src/app/(app)/system/accounts/_components/delete-account-dialog.tsx Adds delete confirmation dialog component.
apps/admin/src/app/(app)/system/accounts/_components/account-search.tsx Adds search + sort UI with debounce.
apps/admin/src/app/(app)/system/accounts/_components/account-list/index.ts Removes old re-export index.
apps/admin/src/app/(app)/system/accounts/_components/account-list/condition/index.ts Removes old condition re-export index.
apps/admin/src/app/(app)/system/accounts/_components/account-list/condition/condition.tsx Removes legacy list condition component.
apps/admin/src/app/(app)/system/accounts/_components/account-list/condition/condition.module.scss Removes legacy SCSS for condition UI.
apps/admin/src/app/(app)/system/accounts/_components/account-list/account-list.tsx Removes legacy account list component.
apps/admin/src/app/(app)/system/accounts/_components/account-list/account-list.module.scss Removes legacy SCSS for account list.
apps/admin/src/app/(app)/system/accounts/_components/account-list.tsx Adds new account list table UI with pagination + delete action.
apps/admin/src/app/(app)/system/accounts/[id]/edit/page.tsx Adds account edit page (server fetch + 404 on missing).
apps/admin/src/app/(app)/system/accounts/[id]/edit/layout.tsx Adds metadata/layout wrapper for edit route.
apps/admin/src/app/(app)/system/accounts/[id]/edit/_lib/schemas.ts Adds Zod schema for editing accounts.
apps/admin/src/app/(app)/system/accounts/[id]/edit/_lib/actions.ts Adds server actions for get/update/delete via admin API.
apps/admin/src/app/(app)/system/accounts/[id]/edit/_components/edit-account.tsx Adds edit-account form UI + delete dialog.
apps/admin/src/app/(app)/layout.tsx Switches to new AppLayout component + renames navigation constant.
apps/admin/src/app/(app)/dashboard/page.tsx Implements dashboard server-render with recent-accounts widget.
apps/admin/src/app/(app)/dashboard/_lib/actions.ts Adds server action to fetch recent accounts.
apps/admin/src/app/(app)/dashboard/_components/recent-accounts.tsx Adds dashboard table for recently created accounts.
apps/admin/src/app/(app)/_layout/navigation.ts Renames NAVIGATION to NAVIGATIONS.
apps/admin/src/app/(app)/_layout/breadcrumb.tsx Improves breadcrumb generation for dynamic routes + disabled states.
apps/admin/src/app/(app)/_layout/app-layout.tsx Adds new sidebar-based application layout component.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/admin/src/app/api/admin/dashboard/recent-accounts/route.ts Outdated
Comment thread apps/admin/src/app/api/admin/accounts/route.ts Outdated
Comment thread apps/admin/src/app/api/admin/accounts/[id]/route.ts
Comment thread apps/admin/src/proxy.ts
Comment thread apps/admin/src/app/api/admin/accounts/route.ts
Comment thread apps/admin/src/app/api/admin/accounts/[id]/route.ts
Comment thread apps/admin/src/app/api/admin/accounts/route.ts
Comment thread apps/admin/src/lib/server/private-api.ts
Comment thread apps/admin/src/app/api/admin/dashboard/recent-accounts/route.ts Outdated
Comment thread apps/admin/src/app/(app)/system/accounts/page.tsx
@seriwb seriwb merged commit d80fc30 into main Mar 5, 2026
2 checks passed
@seriwb seriwb deleted the feature/accounts branch March 5, 2026 14:18
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