Skip to content

Product

An extra layer of understanding for your codebase.

From architecture questions to cross-file investigations, RepoMind helps you find the context that matters.

Repository understanding.

RepoMind indexes what a repository contains and how its parts refer to each other, so a question can be answered from the right handful of files instead of a keyword search.

Files
Path, language, size and the layer it belongs to.
Symbols
Exported functions, components, types and route handlers.
References
Imports, calls and HTTP requests between files.
Relationships
Who depends on what, and which tests sit nearby.

Coverage depends on the language and on how dynamic the code is. Reflection, generated code and runtime configuration can hide relationships from static indexing.

storefront-app index

Pages & UIClient libAPI handlersServerData & testspage.tsxProductDetails.tsxAddToCartButton.tsxapi/products.tsclient.tssession.ts[id]/route.tscart/route.tscheckout/route.tsserver/products.tscart.tscheckout.tsschema.tscart.test.tsapi-client.test.ts

Ask questions about code.

Choose a question to see its answer, the files it cites and the path through the dependency graph. This sample uses predefined answers for a fictional repository.

storefront-app / main

app/products/[id]/page.tsx

import { notFound } from "next/navigation";
import { getProduct } from "@/lib/api/products";
import { ProductDetails } from "@/components/ProductDetails";
type Props = { params: Promise<{ id: string }> };
export default async function ProductPage({ params }: Props) {
const { id } = await params;
const product = await getProduct(id);
if (!product) {
notFound();
}
return <ProductDetails product={product} />;
}
Explanation

How does the product page retrieve and display product information?

The product page loads the product identifier from the route, requests the matching product through the API utility, and passes the returned data to the ProductDetails component for rendering.

  1. Awaits the route params and reads id.
  2. getProduct(id) calls apiFetch with a 60s revalidate window.
  3. apiFetch requests /api/products/:id and throws ApiError on non-2xx.
  4. The GET handler looks the product up and returns 404 when missing.
  5. findProductById selects one row from the products table.
  6. The page renders ProductDetails with the returned product.

Direct evidence

Inference

Follow up

Dependency graph: files in the current answer are lit

page.tsxProductDetails.tsxAddToCartButton.tsxapi/products.tsclient.tssession.ts[id]/route.tscart/route.tscheckout/route.tsserver/products.tscart.tscheckout.tsschema.tscart.test.tsapi-client.test.ts

Related files

Product route. Reads the id, loads the product, renders details.

Depends on

Trace feature execution.

Step through how a product page gets its data. Each step shows the file, the function, its role and the code that does the work.

File
app/products/[id]/page.tsx
Function
ProductPage
Role in the flow
Reads the id from the route and asks for the product. Shows the not-found page when nothing comes back.
Connected files
lib/api/products.tscomponents/ProductDetails.tsx

app/products/[id]/page.tsx

export default async function ProductPage({ params }: Props) {
const { id } = await params;
const product = await getProduct(id);
if (!product) {
notFound();
}
return <ProductDetails product={product} />;
}

Investigate changes.

A change to server/cart.ts may affect the cart route and checkout. RepoMind shows a possible impact map so review starts from the connections, not just the diff.

server/cart.ts

removed: export function calculateTotals(items: CartLine[]) {
added: export function calculateTotals(items: CartLine[], discountRate = 0) {
const subtotalCents = items.reduce((sum, i) => sum + i.quantity * i.priceCents, 0);
removed: return { subtotalCents, itemCount: items.length };
added: return {
added: subtotalCents: subtotalCents * (1 - discountRate),
added: itemCount: items.length,
added: };
}

Possible impact

4 files

  • app/api/cart/route.ts L10

    Returns the new totals to the client. Values may now be fractional.

  • server/checkout.ts L11–14

    Passes subtotalCents to payments.createIntent as the amount.

  • app/api/checkout/route.ts L5–9

    Calls createCheckout without error handling.

  • tests/cart.test.ts L4–16

    No case covers a non-zero discount.

An impact map from direct references in the sample. It can miss dynamic calls and code outside the repository.

Possible impact of a change

calculateTotals()modifiedapi/cart/route.tsreturns totalsserver/checkout.tspayment amounttests/cart.test.tsrelated testapi/checkout/route.tsvia createCheckoutlib/paymentsreceives the amount

Based on direct references. Treat it as a review checklist, not a guarantee.

Fits the tools you already use.

RepoMind is a companion to your editor, terminal and code host, not a replacement. Today, the interactive sample on this site is the only part that is live.

  • Onboarding

    Architecture and responsibility questions for a new repository.

    Sample demo

  • Debugging

    Symptom-to-code paths with hypotheses and evidence.

    Sample demo

  • Code review

    Possible impact of a diff on dependents and tests.

    Sample demo

  • GitHub repositories

    Read-only connection to public and private repositories.

    Planned

  • Local development

    Index a working copy without pushing it anywhere first.

    Planned

  • Pull request context

    Impact notes alongside a pull request.

    Planned

Your next question starts with context.