Add route inventory, live-preview, pages, APIs, navbar and live-support UI for GEM CYBER#53
Add route inventory, live-preview, pages, APIs, navbar and live-support UI for GEM CYBER#53support371 wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Reviewer's GuideImplements a route inventory data source with health and route APIs, adds live preview and route directory pages, refactors core marketing surfaces (home, services, intelligence, about) around reusable PlatformModuleCard modules, and upgrades global layout components (navbar, live-support) plus Next.js redirects to provide unified navigation, route governance, and enterprise-ready UX for GEM CYBER. Sequence diagram for GET /api/routes using route inventorysequenceDiagram
actor Operator
participant Browser
participant NextApp
participant RoutesApiHandler
participant RouteInventoryModule
Operator->>Browser: Request http(s)://host/api/routes
Browser->>NextApp: HTTP GET /api/routes
NextApp->>RoutesApiHandler: Invoke GET handler
RoutesApiHandler->>RouteInventoryModule: Read routeCoverage
RoutesApiHandler->>RouteInventoryModule: Read legacyRedirects
RouteInventoryModule-->>RoutesApiHandler: RouteItem[] and LegacyRedirect[]
RoutesApiHandler-->>NextApp: JSON { routes, redirects, generatedAt }
NextApp-->>Browser: HTTP 200 application/json
Browser-->>Operator: Display route and redirect inventory
Class diagram for route inventory types and shared UI module cardclassDiagram
class RouteItem {
+string path
+string description
+CORE | PLATFORM | ADMIN | LEGAL tag
}
class RouteInventoryModule {
+RouteItem[] routeCoverage
+string[] serviceScaleCoverage
+string[] adminOpsCoverage
+BackendEndpoint[] backendEndpoints
+LegacyRedirect[] legacyRedirects
}
class BackendEndpoint {
+string method
+string path
+string detail
}
class LegacyRedirect {
+string from
+string to
+string notes
}
class PlatformModuleCardProps {
+string title
+string description
+string[] outcomes
+string ctaLabel
+string href
+LucideIcon icon
}
class PlatformModuleCard {
+render(props PlatformModuleCardProps) ReactElement
}
class ServicesPage {
+render() ReactElement
}
class IntelligencePage {
+render() ReactElement
}
class MembershipPage {
+render() ReactElement
}
class LeadershipPage {
+render() ReactElement
}
class RouteDirectoryPage {
+render() ReactElement
}
class LivePreviewPage {
+render() ReactElement
}
class RoutesApiHandler {
+GET(request Request) Response
}
class HealthApiHandler {
+GET(request Request) Response
}
RouteInventoryModule "*" --> "*" RouteItem : contains
RouteInventoryModule "*" --> "*" BackendEndpoint : exposes
RouteInventoryModule "*" --> "*" LegacyRedirect : exposes
PlatformModuleCardProps <.. PlatformModuleCard : uses
PlatformModuleCard <.. ServicesPage : reused by
PlatformModuleCard <.. IntelligencePage : reused by
PlatformModuleCard <.. MembershipPage : reused by
PlatformModuleCard <.. LeadershipPage : reused by
RouteInventoryModule <.. RouteDirectoryPage : reads
RouteInventoryModule <.. LivePreviewPage : reads
RouteInventoryModule <.. RoutesApiHandler : reads
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 2 issues, and left some high level feedback:
- In
next.config.tsyou’re adding a customallowedDevOriginsfield on a typedNextConfig, which isn’t part of the Next.js config schema and may cause type or tooling issues—consider moving this into your own config module or intoenvinstead of the Next config object. - The
routeInventoryand actual runtime configuration aren’t fully aligned (for example,legacyRedirectsdeclares a/architecture → /specsredirect that isn’t present innext.config.ts), so it would be good to reconcile this so the inventory remains a reliable single source of truth for the active routes/redirects.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `next.config.ts` you’re adding a custom `allowedDevOrigins` field on a typed `NextConfig`, which isn’t part of the Next.js config schema and may cause type or tooling issues—consider moving this into your own config module or into `env` instead of the Next config object.
- The `routeInventory` and actual runtime configuration aren’t fully aligned (for example, `legacyRedirects` declares a `/architecture → /specs` redirect that isn’t present in `next.config.ts`), so it would be good to reconcile this so the inventory remains a reliable single source of truth for the active routes/redirects.
## Individual Comments
### Comment 1
<location path="next.config.ts" line_range="4" />
<code_context>
const nextConfig: NextConfig = {
- /* config options here */
+ allowedDevOrigins: ['127.0.0.1'],
+ async redirects() {
+ return [
</code_context>
<issue_to_address>
**issue (bug_risk):** Custom `allowedDevOrigins` field will not be type-safe on `NextConfig` and may cause TS issues.
`NextConfig` doesn’t support `allowedDevOrigins`, so this will likely fail type-checking and be ignored by Next at runtime. If you need this value, define and export it separately (e.g. `export const allowedDevOrigins = [...]`) and import it where required instead of adding it to `nextConfig`.
</issue_to_address>
### Comment 2
<location path="src/data/routeInventory.ts" line_range="7-16" />
<code_context>
+export const routeCoverage: RouteItem[] = [
</code_context>
<issue_to_address>
**issue (bug_risk):** Including `/architecture` in `routeCoverage` conflicts with the redirect note in `legacyRedirects`.
`routeCoverage` lists `/architecture` as an active route, but `legacyRedirects` treats it as legacy and delegated to `/specs`, and there’s no actual `/architecture` page or matching redirect in `next.config`. Please make this consistent by either treating `/architecture` as legacy-only (remove from `routeCoverage` and add the redirect) or as a live route (remove the legacy redirect entry and underlying redirect).
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
|
||
| const nextConfig: NextConfig = { | ||
| /* config options here */ | ||
| allowedDevOrigins: ['127.0.0.1'], |
There was a problem hiding this comment.
issue (bug_risk): Custom allowedDevOrigins field will not be type-safe on NextConfig and may cause TS issues.
NextConfig doesn’t support allowedDevOrigins, so this will likely fail type-checking and be ignored by Next at runtime. If you need this value, define and export it separately (e.g. export const allowedDevOrigins = [...]) and import it where required instead of adding it to nextConfig.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c8a5b25023
ℹ️ 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".
Motivation
routeInventorydata source to power admin tooling and live previews.Description
docs/codex-agent-execution-playbook.mdcapturing the agent operating contract, required routes, validation checklist, and PR acceptance template.src/data/routeInventory.tswithrouteCoverage,legacyRedirects,backendEndpoints,adminOpsCoverage, and service coverage arrays, and addedGET /api/routesandGET /api/healthhandlers atsrc/app/api/*/route.tsthat return JSON payloads driven by that inventory.live-preview,routes,membership,leadership,about-us(withaboutre-export), refactoredintelligence, updatedservicesand homepage, plus a reusablePlatformModuleCardcomponent.Navbar(transparent-to-opaque transition, expanded nav items, mobile menu), enhancedLiveSupport(safe-area launcher, route-aware visibility, panel layout), and added redirects andallowedDevOriginsinnext.config.tsfor legacy path normalization.Testing
npm run lintand the lint pass completed successfully.npm run buildand the production build completed successfully.npm run devand exercised the API sanity checks usingcurl -s http://localhost:3000/api/healthandcurl -s http://localhost:3000/api/routes, both of which returned the expected JSON payloads for health and route registry.Codex Task
Summary by Sourcery
Add a centralized route inventory with supporting APIs, new governance and membership-focused pages, and update site navigation, homepage, and live support UI to align with GEM CYBER’s enterprise experience.
New Features:
Enhancements:
Documentation: