E-commerce platform for cosmetics and beauty products built with Next.js 15, React 19, and modern web technologies.
- Product Catalog - Browse products by category with dynamic filtering
- Shopping Cart - Add products, apply coupons, and manage quantities
- Checkout Flow - Multi-step checkout with identification, shipping, and payment
- User Authentication - Customer registration, login, and password recovery
- Customer Dashboard - Manage account data, addresses, orders, and security settings
- Payment Integration - PagBank integration with PIX and credit card support
- Admin Panel - Order management and invoice generation
- Shipping Calculation - Frenet API integration for shipping quotes
- ERP Integration - Bling API for invoice (NF-e) generation
- Framework: Next.js 15 with App Router and Turbopack
- Language: TypeScript 5
- Styling: Tailwind CSS 3.4 + Material UI 6
- Database: PostgreSQL with Prisma ORM
- Authentication: JWT with jose library
- Forms: React Hook Form + Zod validation
- Testing: Playwright for E2E tests
- State Management: React Context + Cookies
- Node.js 18+
- PostgreSQL database
- npm, yarn, pnpm, or bun
- Clone the repository:
git clone https://github.com/spikeboom/love-cosmetics-website.git
cd love-cosmetics-website- Install dependencies:
npm install- Set up environment variables:
cp .env.example .envConfigure the following variables:
DATABASE_URL- PostgreSQL connection stringJWT_SECRET- Secret for JWT tokensPAGBANK_TOKEN- PagBank API credentialsBLING_CLIENT_ID/BLING_CLIENT_SECRET- Bling ERP credentialsFRENET_TOKEN- Frenet shipping API token
- Run database migrations:
npx prisma migrate dev- Start the development server:
npm run devOpen http://localhost:3000 to view the application.
src/
├── app/ # Next.js App Router pages
│ ├── (admin)/ # Admin panel routes
│ ├── (global)/ # Main store routes
│ │ ├── (cliente-logado)/ # Authenticated customer area
│ │ ├── (loja)/ # Store pages (login, register)
│ │ └── (main)/ # Main pages (home, checkout, PDP)
│ └── api/ # API routes
│ ├── cliente/ # Customer authentication & data
│ ├── pagbank/ # Payment processing
│ ├── pedido/ # Order management
│ └── bling/ # ERP integration
├── components/ # Reusable React components
├── contexts/ # React Context providers
├── hooks/ # Custom React hooks
├── lib/ # Utility libraries
├── services/ # External API services
└── types/ # TypeScript type definitions
| Command | Description |
|---|---|
npm run dev |
Start development server with Turbopack |
npm run build |
Build for production |
npm run start |
Start production server |
npm run lint |
Run ESLint |
npm run test |
Run Playwright tests |
npm run test:headed |
Run tests with browser UI |
npm run test:ui |
Open Playwright test UI |
POST /api/cliente/auth/cadastrar- Register new customerPOST /api/cliente/auth/entrar- Customer loginPOST /api/cliente/auth/sair- LogoutPOST /api/cliente/auth/recuperar-senha- Password recovery
POST /api/pedido- Create new orderGET /api/pedido/admin- List orders (admin)POST /api/pedidos/[id]/gerar-nota- Generate invoice
POST /api/pagbank/create-order- Create PagBank paymentPOST /api/pagbank/webhook- Payment notifications
Private - All rights reserved.