About the project
This e-commerce application was built as a JavaScript Frameworks assignment at Noroff School of Technology. The goal was to demonstrate a solid understanding of React, Next.js and TypeScript by building a fully functional online shop with product browsing, a working cart and a checkout flow.
The project focuses heavily on code quality with typed components, clean state management patterns and proper handling of loading and error states throughout the application.
What I built
- Product listing page with all items fetched from an external API
- Individual product detail pages with full descriptions and pricing
- Shopping cart with add, remove and quantity management
- Cart state managed globally with useReducer and typed actions
- Checkout page with order summary and confirmation
- Server-side rendering via Next.js for improved performance
- Robust error handling and fallback UI for failed requests
Technical details
The application is built with Next.js 14 using the App Router. All components are written in TypeScript with strict typing throughout. Cart state is managed with useReducer, a deliberate choice to keep state logic predictable and testable without reaching for an external library.
Product data is fetched server side using Next.js data fetching patterns, which means pages are pre-rendered with content and no loading spinners appear on initial page load. The project is deployed on Netlify via the Next.js adapter.