A modern e-commerce application built with Next.js 15, featuring a mobile phone store with cart functionality, product search, and responsive design.
- Framework: Next.js 15 (App Router)
- Language: TypeScript
- Styling: SCSS Modules
- State Management: React Context API
- Testing: Jest + React Testing Library
- Deployment: Vercel
- API: Server Actions for secure server-side data fetching
- Node.js 18+
- npm, yarn, pnpm, or bun
-
Clone the repository
git clone <repository-url> cd inditex-interview/inditex
-
Install dependencies
npm install # or yarn install # or pnpm install # or bun install
-
Set up environment variables
Create a
.env.localfile in the root directory:cp .env.local.example .env.local
Update the
.env.localfile with your API credentials:# API Configuration (Server-side only - recommended for security) PUBLIC_API_BASE_URL=api-url PUBLIC_API_KEY=your-api-key-here
-
Run the development server
npm run dev # or yarn dev # or pnpm dev # or bun dev
-
Open your browser
Navigate to http://localhost:3000 to see the application.
Run the test suite:
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage
npm run test:coveragenpm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run lint:fix- Fix ESLint issuesnpm run format- Format code with Prettiernpm run format:check- Check code formattingnpm test- Run testsnpm run test:watch- Run tests in watch modenpm run test:coverage- Run tests with coverage
# Build the application
npm run build
# Start the production server
npm startPUBLIC_API_BASE_URLPUBLIC_API_KEY
The application is fully responsive and optimized for:
- Mobile devices (320px+)
- Tablets (768px+)
- Desktop (1024px+)
Live Demo: https://inditex-sigma.vercel.app/