The chosen address shows on the page; listing, adding and editing happen in a popup. Shipping and billing can differ.
npx virastack add checkout-addressThe save button sends a real request to DummyJSON. The address stays only on this page and is gone when you refresh.
The command installs only the module; the page is your call. Your choices below prepare the prompt and the page code.
Framework
i18n
Add the checkout-address module to my ViraStack Start project.
1. Run `npx virastack add checkout-address` in the project root. It installs only the `src/features/checkout-address` folder and its packages, and creates no page. If you get a conflict error, delete nothing and tell me.
2. Confirm from `package.json` and the folder structure that the project uses Next.js. If it does not, stop and ask me.
3. Create `src/app/checkout-address/page.tsx` with the code below. If the file exists, do not overwrite it; add `CheckoutAddress` to the existing page.
```tsx
import { CheckoutAddress } from "@/features/checkout-address/components/CheckoutAddress"
export default function Page() {
return (
<main className="mx-auto w-full max-w-4xl flex-1 px-4 py-6 sm:px-6">
<CheckoutAddress />
</main>
)
}
```
4. If I gave you my API address, set it in `NEXT_PUBLIC_API_URL` on Next.js or `VITE_API_URL` on TanStack Start. If the response shape differs, adapt what needs changing inside `src/features/checkout-address`.
5. Run the `typecheck`, `test` and `lint:ci` scripts with the project's package manager and report the result.useCheckoutAddress hook returns order-ready data.Based on your choices above, npx virastack add checkout-address adds these files to your project.
No page is created; add the module to your own page with the steps above.
.env.local, set your API's address in NEXT_PUBLIC_API_URL on Next.js or VITE_API_URL on TanStack Start, and the address endpoint path in ADDRESSES_PATH. get-addresses.api.ts returns the dummy addresses for now, so turn it into a request; change save-address.api.ts for your API. Server-side validation is yours to add.npx virastack remove checkout-address.The chosen card shows on the page; saved cards are listed in a popup, where you can add a new one. The card number and CVV never reach the network, and you connect your payment provider in one place.