Scaffold VaultLens MVP foundation with mock providers and docs - #1
Scaffold VaultLens MVP foundation with mock providers and docs#1DanFashauer wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f13d852ca1
ℹ️ 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".
| return ( | ||
| <nav className="mb-6 flex gap-4 rounded-lg border bg-white p-3 text-sm shadow-sm"> | ||
| {links.map((link) => ( | ||
| <Link key={link.href} className="font-medium text-slate-700 hover:text-slate-900" href={link.href}> |
There was a problem hiding this comment.
Preserve typed route literals in nav links
With experimental.typedRoutes enabled in next.config.mjs, Next's generated <Link> type rejects arbitrary string hrefs. This mutable links array widens each href to string, so href={link.href} fails type checking during next build even though the literal values are valid routes; keep the array as const/satisfies a route type or cast before passing to <Link>.
Useful? React with 👍 / 👎.
| import { mockCollection } from "@/lib/mock-collection"; | ||
|
|
||
| export default function CardDetailPage({ params }: { params: { id: string } }) { | ||
| const result = mockCollection.find((item) => item.card.id === params.id) ?? mockCollection[0]; |
There was a problem hiding this comment.
Return a 404 for unknown card ids
When the requested params.id is not in the collection, this falls back to mockCollection[0], so /card/anything-else renders the Michael Jordan card as if it matched the URL. That can mislead users and later leak or misattribute collection data once these IDs come from persistence; use notFound() or an explicit missing-card state instead of showing another card's details.
Useful? React with 👍 / 👎.
Motivation
Description
Home,Scan,Collection, andCarddetail.src/lib/providers/interfaces.tsand mock implementations insrc/lib/providers/mock-provider.tswith wiring helpers insrc/lib/{card-identification,market-data,grading-data}.ts.src/types/card.ts, a mock collection insrc/lib/mock-collection.ts, simple confidence helper insrc/lib/confidence.ts, and API route placeholders undersrc/app/api/{cards,scan,market}/route.ts.docs/PRODUCT_BRIEF.md,docs/MVP_SCOPE.md,docs/DATA_PROVIDERS.md,docs/ROADMAP.md), Supabase schema atsupabase/schema.sql,.env.example, and updatedREADME.mdwith setup instructions.Testing
npm install, but the run failed due to registry access returning403 Forbidden, so automatedinstall/build/lintchecks could not be executed in this environment.Codex Task