This is a Next.js project bootstrapped with create-next-app.
To make admin edits update the live storefront, point this admin app to the API app that is backed by MongoDB.
- In this admin app, set
NEXT_PUBLIC_API_BASE_URLto your storefront/API origin. - In the API app (the
allremotesproject), setMONGODB_URIand optionallyMONGODB_DB. - Deploy both apps with those variables.
Example admin .env.local:
NEXT_PUBLIC_API_BASE_URL=https://allremotes.vercel.appExample API app env:
MONGODB_URI=mongodb+srv://<user>:<password>@<cluster>/<db>?retryWrites=true&w=majority
MONGODB_DB=allremotesAfter this setup, saves from the admin editor use the API content routes and now trigger server revalidation so updates appear on public pages faster.
This project currently does not enable cacheComponents in next.config.ts, and the root route does not export unstable_instant.
Why:
- Enabling
cacheComponentsonly to supportunstable_instantintroduced broader route validation requirements across the app. - Several routes use client-side hooks and async params patterns that then require strict Suspense placement and additional refactors.
- For stable production builds, we keep the current route setup with explicit Suspense boundaries where needed and avoid
unstable_instantuntil a full route-level instant-navigation migration is planned.
If you want to reintroduce instant-navigation validation later, do it as a dedicated migration and validate all routes together.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.