Skip to content

sergiopesch/london-shop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

London Shop

A modern e-commerce application for London-themed merchandise built with Next.js 15, React 19, and TypeScript.

Features

  • 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

Tech Stack

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

Getting Started

Prerequisites

  • Node.js 18+
  • pnpm (recommended) or npm

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd london-shop
  2. Install dependencies:

    pnpm install
  3. Set up environment variables:

    cp .env.example .env.local

    Edit .env.local with your configuration (see Environment Variables).

  4. Start the development server:

    pnpm dev
  5. Open http://localhost:3000 in your browser.

Available Scripts

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

Project Structure

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

Environment Variables

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-production

Note: 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.

Admin Dashboard

Access the admin dashboard at /admin. Features include:

  • Customer management
  • Feedback management
  • Settings configuration

Development

Code Style

  • TypeScript with strict mode
  • ESLint for code quality
  • Prettier for formatting (via ESLint)

Component Guidelines

  • Use the cn() utility from lib/utils.ts for conditional classes
  • Don't modify files in components/ui/ (shadcn/ui generated)
  • Use @/ path alias for imports

Testing

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

Deployment

  1. Build the application:

    pnpm build
  2. Start the production server:

    pnpm start

Deployment Checklist

  • Build passes without errors
  • Lint passes without warnings
  • All tests pass
  • Environment variables configured
  • Admin credentials changed from defaults

Contributing

  1. Follow the existing code patterns
  2. Ensure all tests pass
  3. Run lint before committing
  4. Update documentation as needed

For AI agents working on this codebase, see CLAUDE.md and AGENT.md for detailed instructions.

License

Private - All rights reserved.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors