Next.js Tailwind Store
E-commerce in Next.js 14 with advanced App Router routing, its own API over SQLite, a Redux cart and a test for every component.
- Year
- 2024
- Type
- Personal project
- Status
- Paused
01 · Problem
Practise the App Router's advanced routing on a real store, starting from my own Next.js boilerplate.
02 · Solution
Parallel routes compose the home page, an intercepted route opens product images in a modal that still has its own URL, and a catch-all route handles the shop filters. Route Handlers serve products, categories, search, related items and reviews from SQLite. The cart uses Redux Toolkit with redux-persist, the forms use Formik and Yup, and the layout comes from the free Nordic Store template.
03 · Stack
- TypeScript
- Next.js 14 (App Router)
- Tailwind CSS
- Redux Toolkit
- SQLite
- Formik / Yup
- Jest / Testing Library
- Plop
04 · Architecture decisions
The decisions that shaped the project.- —
Own boilerplate
Started from my Next.js boilerplate with ESLint, Prettier, Husky, Jest and Plop already wired.
- —
Modal with its own URL
Intercepting routes open the product image over the page, and a refresh lands on the full image page.
- —
A test next to every component
25 components, each with its own Jest and Testing Library test, generated by Plop.