Baseline app for a hands-on interview. Scope and edge cases are clarified live on the call; use this README for setup and the core goal only.
- Node.js 20+ (LTS recommended)
- pnpm (or use
npm/yarnif you prefer — adjust commands)
-
Clone the repo and install dependencies:
pnpm install
-
Copy environment template and add your Gemini API key (Google AI Studio):
cp .env.example .env
Set
GEMINI_API_KEYin.env. The key is read as server-only runtime config (runtimeConfig.geminiApiKeyinnuxt.config.ts). Do not expose it to the client or call Gemini from the browser with this key. -
Start the dev server:
pnpm dev
-
Optional: confirm Nitro is running:
curl http://localhost:3000/api/health
Expect
{"ok":true}.
- Nuxt 3
- Tailwind CSS (
@nuxtjs/tailwindcss) - Reka UI (
reka-ui+reka-ui/nuxtauto-imports) - @google/generative-ai for Gemini on the server (e.g.
server/api/...)
Build a one-page experience:
-
Storefront
Load product data from DummyJSON — products (consider?limit=for a predictable payload). Render a storefront-style layout. -
Design reference
Match the layout and visual direction of this Figma file (duplicate if needed):
Mock Product page -
Shopping assistant (chat)
Let the user ask questions about the catalog. Answers must come from Gemini, with responses grounded in the product data you fetched — not generic ecommerce knowledge. -
Grounding rule
If something is not in the loaded catalog data, the assistant should say it is not in the catalog (no invented SKUs, prices, or products). -
Replace the starter
The defaultpages/index.vueis a placeholder; replace it with your implementation.
We will use the assistant like a shopper: ask about specific products, compare options, probe details that only appear in the JSON (price, availability, descriptions, reviews, policies—whatever you surface in context), and occasionally ask about things that are not in your loaded catalog. We are not publishing a fixed script; the goal is to see whether answers feel consistent with the data you actually have rather than generic shop talk.
These are guides.
- Catalog + UI: Products come from DummyJSON; the page reads as a coherent storefront and is aligned with the Figma.
- Assistant: Chat goes through your server; the model is given enough catalog context to answer; replies should track the dataset (including saying when something is unknown or not in the catalog).
- UX: Obvious states (e.g. loading / failure / empty) are handled in a way you can explain; the flow is usable end-to-end for the demo.
- Security: Gemini credentials stay server-side only.
We will ask you to walk through how context is built, how errors are handled, and what you would tighten with more time.
sequenceDiagram
participant Browser
participant NuxtServer
participant DummyJSON
participant Gemini
Browser->>NuxtServer: Fetch products SSR client or API route
NuxtServer->>DummyJSON: GET /products
DummyJSON-->>NuxtServer: JSON
NuxtServer-->>Browser: Product UI
Browser->>NuxtServer: POST chat message
NuxtServer->>Gemini: generate with catalog context
Gemini-->>NuxtServer: text
NuxtServer-->>Browser: Assistant reply
On the server, use useRuntimeConfig(event) (or useRuntimeConfig() in server context) to read geminiApiKey — only in server code.
Private / interview use unless otherwise stated by the repository owner.