# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Project Overview

**Omitech Frontend** - Marketing and CMS website for Omitech's enterprise telephony services (LambiCall CloudPBX and LambiPhone). Built with Next.js 14 (App Router), React 18, TypeScript, and Tailwind CSS.

## Commands

```bash
# Development
npm run dev       # Start dev server on port 3000

# Build & Production
npm run build     # Build for production
npm start         # Start production server

# Linting
npm run lint      # Run ESLint
```

## Architecture

```
src/
├── app/                    # Next.js 14 App Router pages
│   ├── admin/             # Admin CMS dashboard (protected)
│   ├── lambicall/         # Product pages
│   ├── lambiphone/
│   ├── politicas/[slug]/  # Dynamic policy pages
│   └── ...                # Other marketing pages
├── components/
│   ├── layout/            # Header, Footer
│   ├── sections/          # Hero, Products, Features, Testimonials, CTA
│   └── ui/                # Button, Card (reusable primitives)
├── lib/
│   ├── api.ts             # Axios client with auth interceptor
│   └── utils.ts           # cn() utility for Tailwind class merging
└── types/
    └── index.ts           # TypeScript interfaces (Product, Policy, User, etc.)
```

## Key Patterns

### API Client
- Located in `src/lib/api.ts`
- Uses Axios with automatic Bearer token injection from localStorage
- API base URL configured via `NEXT_PUBLIC_API_URL` (defaults to `http://localhost:3001/api`)

### Authentication
- Token stored in localStorage as `token`
- User data stored as JSON in localStorage under `user`
- Admin pages (`/admin/*`) check auth in layout and redirect to `/login` if unauthenticated

### Styling
- Tailwind CSS with custom color palette: `primary` (teal), `accent` (green), `secondary` (slate)
- Custom utility classes in `globals.css`: `container-custom`, `section-padding`, `gradient-hero`, `gradient-primary`
- Uses `cn()` helper from `lib/utils.ts` for conditional class merging (clsx + tailwind-merge)

### Path Aliases
- `@/*` maps to `./src/*` (configured in tsconfig.json)

## Environment Variables

```bash
NEXT_PUBLIC_API_URL=http://localhost:3001/api  # Backend API URL
```
