This repo is a fork of the NextCart repository - this README documents the original group project with my personal contributions highlighted below.
NextCart is a minimalist e-commerce platform built with Next.js 15 and TypeScript, using data from Platzi's GraphQL API. It features server-side rendering and streaming, real-time search, authentication with Clerk and an admin dashboard with CRUD functionality.
- π About the project
- β¨ Features
- πΌοΈ Screenshots
- π Technologies Used
- βοΈ Installation
- π Project Structure
- π Project Workflow
- π± My Contributions
- π Future Development Ideas
- π€ Contributing
- π License
This was a group exercise focused on building a minimalist e-commerce platform to practise modern web development patterns.
Key learnings:
- Server-side rendering and routing with Next.js 15 App Router
- Type-safe development with TypeScript and Zod validation
- GraphQL API integration with queries, mutations and error-handling
- Implementing mock data fallback for development with environment variables
- Authentication and route protection using Clerk
- Form management with server actions for CRUD operations and contact forms
- Advanced routing patterns with parallel routes and route interception for modals
- Performance optimization through lazy loading and React Suspense
- Dynamic routing with searchParams for filtering and pagination
- Building accessible, responsive UI with Tailwind CSS and shadcn/ui
- Agile methodology with iterative development and continuous feedback & communication.
- Product Discovery - Browse featured products and new arrivals with a clean, responsive grid layout
- Search - Global command palette (βK/Ctrl+K) for instant product search
- Smart Filtering - Filter products by category, search query, and combine multiple filters
- Product Details - Dynamic product pages with image carousels, descriptions, and specifications
- Modal Overlays - Product quick-view and search in modal windows
- Add to Cart - Simple add-to-cart functionality using cookies, with toast notifications
- Responsive Design - Optimised for mobile, tablet, and desktop viewing
- Contact Form - Get in touch with validated server-side form handling
- User Management - Sign in with Clerk authentication to access protected admin areas
- Product Management - Create, edit, and delete products in Platzi's public API server
- Data Tables - Sortable, filterable tables for managing inventory
- Server Actions - secure mutations handled server-side with real-time feedback
- SSR & Streaming - Server-side rendering with React Suspense for optimal loading
- Image Optimization - Automatic image optimization with Next.js Image component
- Fallback Data - Develop with mock data when API is unavailable
Home page
|
Products page
|
- Next.js 15 (App Router) - React framework for server-side rendering, routing, and modern app architecture
- TypeScript - Type-safe JavaScript for improved developer experience and code reliability
- Tailwind CSS - Utility-first CSS framework for responsive design
- shadcn/ui - Composable UI component library built on Radix UI
- Radix UI - Unstyled, accessible component primitives
- Lucide React - Modern icon library
- Clerk - Authentication and protected routes
- GraphQL - API queries for product and category data
- React Hot Toast - Toast notification system for user feedback
- Zod - Runtime type validation for forms and data schemas
- ESLint & Prettier - Code linting and formatting for consistent code style
- Husky - Git hooks for automated pre-commit quality checks
- Clone the upstream repository and navigate to the folder:
git clone https://github.com/nextcart-se/next-cart.git
cd next-cart- Install dependencies:
npm install- Run the development server:
npm run dev- Open http://localhost:3000 in your browser to view the site.
βββ public/ # Static assets
βββ src/
β βββ app/ # Next.js App Router pages and routes
β β βββ about/
β β βββ admin/
β β β βββ create-category/
β β β βββ create-product/
β β β βββ update-product/
β β β βββ [id]/
β β βββ contact/
β β βββ products/
β β β βββ [slug]/
β β βββ @modal/ # Parallel slot for intercepting modal routes
β β βββ (.)admin/
β β β βββ create-category/
β β β βββ create-product/
β β β βββ update-product/
β β β βββ [id]/
β β βββ (.)products/
β β βββ [slug]/
β βββ components/ # Reusable React components organised by feature
β β βββ admin/
β β βββ contact/
β β βββ layout/
β β βββ loading/
β β βββ navigation/
β β βββ products/
β β βββ root-page/
β β βββ table/
β β βββ ui/ # Shared UI primitives (buttons, cards, inputs, dialogs, etc.)
β βββ fonts/ # Custom font files
β βββ hooks/ # Custom React hooks
β βββ lib/ # Core shared logic and utilities
β β βββ actions/
β β βββ constants/
β β βββ data/
β β β βββ graphql/ # GraphQL queries, mutations, and fetch utils
β β β βββ services/ # API service implementations (mock and real)
β β βββ hooks/
β β βββ mocks/ # Mock and experimental data for development/testing
β β βββ schemas/ # Zod validation schemas
β β βββ types/
β β βββ utils.ts
β βββ middleware.ts # Clerk configuration
βββ .gitignore
βββ next.config.ts
βββ package.json
βββ README.md
- π₯ Group work in agile sprints (SCRUM)
- π± Feature branches
- π PR + code review
- Daily standup meetings
- Open Teams channel
- Set up Next.js project
- Created menus & static pages
- Uses [slug] for dynamic routing
- Filter and search for /products
- Created /admin route with a DataTable
- Create, Update, and Delete functionality for products with server actions
- Zod validation on create/update forms
- WAVE and Lighthouse analysis
- Refactor fetch and GraphQL functions
- Responsive styling
- Navigation bar and sidebar component with mobile-responsive hamburger menu
- Search functionality with CommandDialog supporting real-time filtering
- Contact form and server action with Zod validation
- Parallel and intercepting routes for server-side modals
- Admin tables with TanStack Table
- Authentication integration with Clerk
- Responsive layout using CSS Grid for product cards and page structure
- Loading skeletons and Suspense boundaries for improved user experience
- Mock data support for development (via environment variables)
Search
|
Admin dashboard
|
- Add CRUD functionality for Categories in the admin page
- Add basket page/component and couple AddToCart functionality with full order details & quantity
- Add more filters to the Product page (e.g. min and max price)
- Add runtime validation of GraphQL responses with Zod
Want to contribute? Great! Here's how to get started:
- Fork and clone the upstream repo:
git clone https://github.com/<your-username>/next-cart.git- Navigate to your repo root and install dependencies:
cd next-cart
npm install- Create a feature branch:
git checkout -b feature/your-feature- Make changes, commit, and push.
- Open a Pull Request (PR) with a clear description.
- Follow code style with ESLint/Prettier config.
- Use clear commit messages.
- All PRs need review.
For questions, use GitHub Issues. Thanks for helping! π
This project is developed for educational purposes and is not intended for production.



