Wake up, samurai β we have bugs to catch!
A vibe coded React frontend for a bookstore application, purpose-built as a sandbox for test automation practice.
This project was created as a test automation training ground. It's designed to be:
- Test-friendly β Every interactive element has
data-testidattributes - Realistic β Full e-commerce functionality (products, cart, orders, wishlist, reviews)
- Predictable β Consistent patterns for easy selector targeting
data-testid="page-name" β e.g., "cart-page"
data-testid="element-name" β e.g., "search-input"
data-testid="element-name-{id}" β e.g., "product-card-123"
data-testid="action-button" β e.g., "add-to-cart-button"
| Technology | Version | Purpose |
|---|---|---|
| React | 18.3.1 | UI Framework |
| TypeScript | 5.6.3 | Type Safety |
| Vite | 6.0.3 | Build Tool & Dev Server |
| Tailwind CSS | 3.4.15 | Styling |
| React Router | 6.28.0 | Client-side Routing |
| Axios | 1.7.7 | HTTP Client |
- Node.js 18+
- npm or yarn
- LittleBugShop Backend running on
localhost:5052
# Clone the repository
git clone https://github.com/farum12/LittleBugShop.FE.git
cd LittleBugShop.FE
# Install dependencies
npm install
# Start development server
npm run devThe app will be available at http://localhost:3000
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm run preview |
Preview production build |
npm run lint |
Run ESLint |
src/
βββ components/ # Reusable UI components
β βββ Header.tsx # Navigation header
β βββ Footer.tsx # Page footer
β βββ Layout.tsx # Main layout wrapper
β βββ ProductCard.tsx # Product display card
β βββ LoadingSpinner.tsx
β βββ ErrorMessage.tsx
βββ pages/ # Route pages
β βββ HomePage.tsx
β βββ ProductsPage.tsx
β βββ ProductDetailPage.tsx
β βββ CartPage.tsx
β βββ CheckoutPage.tsx
β βββ OrdersPage.tsx
β βββ WishlistPage.tsx
β βββ LoginPage.tsx
β βββ RegisterPage.tsx
β βββ ProfilePage.tsx
β βββ NotFoundPage.tsx
βββ services/ # API service layer
β βββ api.ts # Axios instance + interceptors
β βββ authService.ts
β βββ productService.ts
β βββ cartService.ts
β βββ orderService.ts
β βββ reviewService.ts
β βββ wishlistService.ts
βββ types/ # TypeScript interfaces
β βββ index.ts
βββ App.tsx # Router configuration
βββ main.tsx # Entry point
βββ index.css # Tailwind imports
Custom bug-themed color palette:
| Color | Hex | Usage |
|---|---|---|
| Bug Primary | #2d5a27 |
Main green |
| Bug Secondary | #8b4513 |
Brown accents |
| Bug Accent | #ffd700 |
Gold highlights |
| Page | Route | Features |
|---|---|---|
| Home | / |
Hero, featured products |
| Products | /products |
Search, filter, pagination |
| Product Detail | /products/:id |
Details, reviews, add to cart |
| Cart | /cart |
View/edit cart, apply coupons |
| Checkout | /checkout |
Shipping address, payment |
| Orders | /orders |
Order history |
| Wishlist | /wishlist |
Saved products |
| Login | /login |
Authentication |
| Register | /register |
New account |
| Profile | /profile |
User settings |
The frontend proxies API requests to the backend:
- Dev proxy:
localhost:3000/api/*βlocalhost:5052/api/* - Auth: JWT tokens stored in localStorage
- Interceptors: Auto-attach auth headers, handle 401 redirects
This app is your playground! Here's what you can practice:
- E2E Testing β Full user flows (browse β cart β checkout)
- Component Testing β Isolated component behavior
- API Testing β Mock or intercept service calls
- Visual Regression β Consistent UI with Tailwind
- Accessibility Testing β Semantic HTML structure
Recommended priority:
data-testidattributes (most stable)- Semantic roles (
button,link,textbox) - Text content (for assertions)
- CSS classes (Tailwind utilities are stable)
This is a vibe coded project β built with AI assistance (GitHub Copilot) in a single session. It's meant for learning and testing, not production use.
MIT
Built with π and β for the QA community