A modern e-commerce application for London-themed merchandise built with Next.js 15, React 19, and TypeScript.
- Product Catalog: Browse hoodies, t-shirts, memory games, and mugs
- Shopping Cart: Persistent cart with localStorage
- Product Search: Search across all products
- Admin Dashboard: Manage customers and feedback
- Responsive Design: Mobile-first approach with Tailwind CSS
- Animations: Smooth transitions with Framer Motion
| Category | Technology |
|---|---|
| Framework | Next.js 15.1.0 (App Router) |
| Language | TypeScript 5 |
| UI Components | shadcn/ui, Radix UI |
| Styling | Tailwind CSS 3.4 |
| State Management | React Context, TanStack React Query |
| Database | Supabase (optional) |
| Forms | React Hook Form + Zod |
| Testing | Vitest, React Testing Library |
| Animation | Framer Motion |
- Node.js 18+
- pnpm (recommended) or npm
-
Clone the repository:
git clone <repository-url> cd london-shop
-
Install dependencies:
pnpm install
-
Set up environment variables:
cp .env.example .env.local
Edit
.env.localwith your configuration (see Environment Variables). -
Start the development server:
pnpm dev
-
Open http://localhost:3000 in your browser.
| Command | Description |
|---|---|
pnpm dev |
Start development server |
pnpm build |
Build for production |
pnpm start |
Start production server |
pnpm lint |
Run ESLint |
pnpm test |
Run tests once |
pnpm test:watch |
Run tests in watch mode |
pnpm test:coverage |
Run tests with coverage |
london-shop/
├── app/ # Next.js App Router pages
│ ├── api/ # API routes
│ │ ├── admin/ # Admin authentication
│ │ ├── customers/ # Customer data
│ │ └── feedback/ # Feedback data
│ ├── admin/ # Admin dashboard
│ ├── shop/ # Product catalog
│ │ ├── hoodies/
│ │ ├── t-shirts/
│ │ ├── memory-games/
│ │ └── mugs/
│ └── ... # Static pages
├── components/ # React components
│ ├── ui/ # shadcn/ui (don't edit)
│ ├── admin/ # Admin components
│ └── product/ # Product components
├── lib/ # Utilities & helpers
├── context/ # Cart context
├── contexts/ # Auth context
├── hooks/ # Custom hooks
└── public/ # Static assets
Create a .env.local file based on .env.example:
# Supabase Configuration (optional - app works without these)
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key-here
# Admin credentials
# Set strong values in production. If omitted, the app falls back to development defaults.
ADMIN_USERNAME=admin
ADMIN_PASSWORD=change-me-before-productionNote: The app functions without Supabase - it will return empty arrays for database queries.
Security note: Set ADMIN_PASSWORD in .env.local for any real deployment. The code retains a development fallback only to avoid breaking local behaviour, and it should not be relied on in production.
Access the admin dashboard at /admin. Features include:
- Customer management
- Feedback management
- Settings configuration
- TypeScript with strict mode
- ESLint for code quality
- Prettier for formatting (via ESLint)
- Use the
cn()utility fromlib/utils.tsfor conditional classes - Don't modify files in
components/ui/(shadcn/ui generated) - Use
@/path alias for imports
Tests are co-located with source files using .test.ts or .test.tsx extensions.
# Run all tests
pnpm test
# Watch mode for development
pnpm test:watch
# Generate coverage report
pnpm test:coverage-
Build the application:
pnpm build
-
Start the production server:
pnpm start
- Build passes without errors
- Lint passes without warnings
- All tests pass
- Environment variables configured
- Admin credentials changed from defaults
- Follow the existing code patterns
- Ensure all tests pass
- Run lint before committing
- Update documentation as needed
For AI agents working on this codebase, see CLAUDE.md and AGENT.md for detailed instructions.
Private - All rights reserved.