Skip to content

Angular front-end for an e-commerce store with categories, product listings, product details, and a shopping cart. Built with Angular and TypeScript.

Notifications You must be signed in to change notification settings

Jaser1010/ecommerce-angular-store

Repository files navigation

Store Logo

E-Commerce Angular Store

Fashion Clothing Store Β· Angular 18 Β· TailwindCSS + Bootstrap 5


Angular TypeScript TailwindCSS Bootstrap RxJS

GitHub repo size GitHub last commit GitHub stars License: MIT


A modern, responsive fashion clothing e-commerce storefront built with Angular 18 standalone components. Browse clothing for Men, Women, and Kids across Shirts, T-Shirts, Pants, and Shoes β€” with an auto-sliding ad carousel, product detail pages, cart functionality, and a polished UI.


πŸš€ Quick Start Β· πŸ› Report Bug Β· πŸ’‘ Request Feature



πŸ“‘ Table of Contents

Click to expand


⚑ Highlights

πŸ›οΈ 3 Category Sections Complete product catalogs for Men, Women, and Kids β€” each with 4 subcategories: Shirts, T-Shirts, Pants, and Shoes. That's 12 product listing pages in total.

🎠 Auto-Sliding Ad Carousel Home page hero carousel with 3-second auto-advance, next/prev navigation, dot indicators, and hover-to-pause β€” all built with pure TypeScript, no external carousel library.

πŸ›’ Shopping Cart Service Injectable CartService with addToCart(), getCart(), and clearCart() methods. Cart state is managed in-memory and accessible from any component.

πŸ“± Responsive Design Dual CSS framework approach: TailwindCSS for utility-first styling + Bootstrap 5 for responsive grid and component classes. Hamburger menu for mobile navigation.

🧱 Standalone Components Built with Angular 18's modern standalone component architecture β€” no NgModules required. Each component declares its own imports for maximum encapsulation.

πŸ” Product Details Dedicated product detail page with image display, description, pricing, Add to Cart button, and Buy Now action β€” navigated via route parameter /product-list/:id.

πŸ“Έ 200+ Product Images Full product image library organized by category: men/men-shirts/, women/women-pants/, kids/kids-shoes/, etc. β€” real fashion photography, not placeholders.

🏠 Featured Products Home page showcases 12 featured products in a grid with product cards displaying image, name, and price β€” each linking to its detail page via viewDetails(productId).


πŸ› Architecture Overview

The application uses Angular 18 Standalone Components with a flat component-based architecture:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                          APP SHELL                          β”‚
β”‚  AppComponent (navbar + router-outlet + footer)             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚   Navbar    β”‚  β”‚    <router-outlet>    β”‚  β”‚  Footer   β”‚  β”‚
β”‚  β”‚  Component  β”‚  β”‚                      β”‚  β”‚ Component β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                   β”‚  β”‚  HomeComponent β”‚  β”‚                  β”‚
β”‚                   β”‚  β”‚  Ad Carousel   β”‚  β”‚                  β”‚
β”‚                   β”‚  β”‚  Product Grid  β”‚  β”‚                  β”‚
β”‚                   β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚                  β”‚
β”‚                   β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚                  β”‚
β”‚                   β”‚  β”‚  Categories    β”‚  β”‚                  β”‚
β”‚                   β”‚  β”‚  Men / Women   β”‚  β”‚                  β”‚
β”‚                   β”‚  β”‚  / Kids Grid   β”‚  β”‚                  β”‚
β”‚                   β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚                  β”‚
β”‚                   β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚                  β”‚
β”‚                   β”‚  β”‚ ProductDetails β”‚  β”‚                  β”‚
β”‚                   β”‚  β”‚ + CartService  β”‚  β”‚                  β”‚
β”‚                   β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚                  β”‚
β”‚                   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Service Layer

Service Scope Methods Description
CartService providedIn: 'root' addToCart(product), getCart(), clearCart() Global singleton managing the shopping cart state in-memory

πŸ“ Project Structure

ecommerce-angular-store/
β”‚
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ app.component.ts/html/css        # Root shell β€” navbar, carousel, footer, router-outlet
β”‚   β”‚   β”œβ”€β”€ app.routes.ts                    # Route definitions (16 routes)
β”‚   β”‚   β”œβ”€β”€ app.config.ts                    # App configuration + providers
β”‚   β”‚   β”œβ”€β”€ cart.service.ts                  # Global CartService (add/get/clear)
β”‚   β”‚   β”œβ”€β”€ routes.ts                        # Secondary routes file
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ 🏠 home/                         # Home page
β”‚   β”‚   β”‚   └── home.component.ts/html/css   # Featured products grid + ad slider + Special Offers
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ Categories/                   # Category hub
β”‚   β”‚   β”‚   └── Categories.component.ts/html # Category cards: Men / Women / Kids Γ— Shirts/T-shirts/Pants/Shoes
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ πŸ” product-details/              # Product detail page
β”‚   β”‚   β”‚   └── product-details.component.*  # Image, description, price, Add to Cart, Buy Now
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ ℹ️ about/                         # About Us page
β”‚   β”‚   β”‚   └── about.component.ts/html      # Company info with images
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ 🧭 navbar/                       # Navbar component
β”‚   β”‚   β”‚   └── navbar.component.ts/html/css # Responsive nav with hamburger menu
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ πŸ“’ ad-slider/                    # Ad slider component
β”‚   β”‚   β”‚   └── ad-slider.component.*        # Carousel sub-component
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ 🦢 footer/                       # Footer component
β”‚   β”‚   β”‚   └── footer.component.ts/html     # Quick Links, Services, Social Media
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ πŸ‘” men/                           # Men's product pages
β”‚   β”‚   β”‚   β”œβ”€β”€ MenShirts/                   # 20 shirts with hardcoded product data
β”‚   β”‚   β”‚   β”œβ”€β”€ men-tshirt/                  # T-shirts collection
β”‚   β”‚   β”‚   β”œβ”€β”€ men-pants/                   # Pants collection (16 products)
β”‚   β”‚   β”‚   └── men-shoes/                   # Shoes collection (18 products)
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ πŸ‘— women/                         # Women's product pages
β”‚   β”‚   β”‚   β”œβ”€β”€ women-shirts/                # 19 shirts
β”‚   β”‚   β”‚   β”œβ”€β”€ women-tshirts/               # T-shirts collection
β”‚   β”‚   β”‚   β”œβ”€β”€ women-pants/                 # Pants collection (13 products)
β”‚   β”‚   β”‚   └── women-shoes/                 # Shoes collection (9 products)
β”‚   β”‚   β”‚
β”‚   β”‚   └── πŸ‘Ά kids/                          # Kids' product pages
β”‚   β”‚       β”œβ”€β”€ kids-shirts/                 # 16 shirts
β”‚   β”‚       β”œβ”€β”€ kids-tshirts/                # T-shirts collection (10 products)
β”‚   β”‚       β”œβ”€β”€ kids-pants/                  # Pants collection (8 products)
β”‚   β”‚       └── kids-shoes/                  # Shoes collection (8 products)
β”‚   β”‚
β”‚   β”œβ”€β”€ assets/
β”‚   β”‚   └── images/                          # 200+ product photos
β”‚   β”‚       β”œβ”€β”€ men/                         # men-shirts/, men-pants/, men-shoes/, men-t-shirt/
β”‚   β”‚       β”œβ”€β”€ women/                       # women-shirts/, women-pants/, women-shoes/, women-t-shirt/
β”‚   β”‚       β”œβ”€β”€ kids/                        # kids-shirts/, kids-pants/, kids-shoes/, kids-t-shirts/
β”‚   β”‚       β”œβ”€β”€ ad1.jpg, ad2.jpg, ad4.jpg    # Carousel ad banners
β”‚   β”‚       β”œβ”€β”€ logo.jpg                     # Store logo
β”‚   β”‚       └── aboutUs.jpeg, aboutUs2.jpg   # About page images
β”‚   β”‚
β”‚   β”œβ”€β”€ index.html                           # Entry HTML
β”‚   β”œβ”€β”€ main.ts                              # Bootstrap standalone AppComponent
β”‚   └── styles.css                           # Global CSS imports (Tailwind directives)
β”‚
β”œβ”€β”€ angular.json                             # Angular CLI workspace config
β”œβ”€β”€ package.json                             # Dependencies (Angular 18 + Tailwind + Bootstrap)
β”œβ”€β”€ tailwind.config.js                       # TailwindCSS config
β”œβ”€β”€ postcss.config.js                        # PostCSS with Tailwind + Autoprefixer
β”œβ”€β”€ tsconfig.json                            # TypeScript compiler config
β”œβ”€β”€ eslint.config.mjs                        # ESLint flat config
└── .gitignore

πŸ› οΈ Tech Stack

Category Technology Version Purpose
Framework Angular 18.2 Component-based SPA framework
Language TypeScript 5.5 Type-safe JavaScript
Styling TailwindCSS 3.4 Utility-first CSS framework
UI Library Bootstrap 5.3 Responsive grid + components
Routing @angular/router 18.2 Client-side navigation
Reactive RxJS 7.8 Observable-based data streams
PostCSS PostCSS + Autoprefixer 8.4 CSS processing pipeline
Tooltips @popperjs/core 2.11 Bootstrap tooltip positioning
Linting ESLint + typescript-eslint 9.11 Code quality enforcement
Testing Karma + Jasmine 6.4 / 5.2 Unit testing framework
Build Angular CLI 18.2.3 Dev server, build, scaffolding

🎯 Features in Detail

🏠 Home Page

  • Hero Ad Carousel β€” 3 promotional banners with auto-slide (3s interval), prev/next arrows, dot indicators
  • Special Offers section
  • Featured Products Grid β€” 12 product cards with image, name, price, and "View Details" click navigation
  • Responsive layout adapting to mobile/tablet/desktop

πŸ“‚ Category Navigation

  • Category Hub β€” Visual grid with Men, Women, and Kids sections
  • Each section shows 4 subcategory links: Shirts, T-Shirts, Pants, Shoes
  • Animated category cards with hover effects

πŸ‘”πŸ‘—πŸ‘Ά Product Listing Pages (12 pages)

Each of the 12 product pages features:

  • Hardcoded product arrays with id, name, price, imageUrl, and description
  • Product cards in a responsive grid layout
  • Hover effects on product images
  • Sorting/filtering by price (ascending/descending/default)
  • Click-to-view product details
Category Shirts T-Shirts Pants Shoes
Men 20 products 11 products 16 products 18 products
Women 19 products 14 products 13 products 9 products
Kids 16 products 10 products 8 products 8 products

πŸ” Product Details

  • Full-page product view with large image display
  • Product name, description, and formatted price
  • Add to Cart button β†’ triggers CartService.addToCart() with confirmation alert
  • Buy Now button β†’ navigates to checkout flow
  • 404 redirect for invalid product IDs

πŸ›’ CartService

@Injectable({ providedIn: 'root' })
export class CartService {
  private cart: Product[] = [];
  addToCart(product: Product): void   // Push product into cart
  getCart(): Product[]                // Return all cart items
  clearCart(): void                   // Empty the cart
}

🧭 Navigation

  • Desktop: Horizontal navbar with Home, Categories, About, Contact links
  • Mobile: Hamburger toggle menu with animated show/hide (isMenuOpen state)
  • Active route highlighting with RouterLinkActive

🦢 Footer

  • Three-column layout: Company Description, Quick Links, Services
  • Social media links: Facebook, Twitter, Instagram
  • Clean layout with consistent brand styling

πŸš€ Quick Start

Prerequisites

Requirement Minimum Version Download
Node.js 18.x nodejs.org
npm 9.x Bundled with Node.js
Angular CLI 18.x npm install -g @angular/cli

Step-by-Step Setup

# 1. Clone the repository
git clone https://github.com/Jaser1010/ecommerce-angular-store.git
cd ecommerce-angular-store

# 2. Install dependencies
npm install

# 3. Start development server
ng serve
# or
npm start

# 4. Open in browser
# Navigate to http://localhost:4200

πŸ’‘ Tip: The app auto-reloads when you modify source files.

Other Commands

# Run unit tests
ng test

# Build for production
ng build

# Lint code
ng lint

πŸ—ΊοΈ Component Map

graph TD
    A[AppComponent] --> B[NavbarComponent]
    A --> C[RouterOutlet]
    A --> D[FooterComponent]
    
    C --> E[HomeComponent]
    C --> F[CategoriesComponent]
    C --> G[ProductDetailsComponent]
    C --> H[AboutComponent]
    
    F --> I[MenShirtsComponent]
    F --> J[MenTshirtComponent]
    F --> K[MenPantsComponent]
    F --> L[MenShoesComponent]
    
    F --> M[WomenShirtsComponent]
    F --> N[WomenTshirtsComponent]
    F --> O[WomenPantsComponent]
    F --> P[WomenShoesComponent]
    
    F --> Q[KidsShirtsComponent]
    F --> R[KidsTshirtsComponent]
    F --> S[KidsPantsComponent]
    F --> T[KidsShoesComponent]
    
    G --> U[CartService]
    
    style A fill:#DD0031,color:white
    style U fill:#3178C6,color:white
Loading

πŸ›€οΈ Routing

Path Component Description
/ HomeComponent Landing page with carousel + featured products
/Home HomeComponent Alias for home
/Categories CategoriesComponent Category hub with Men/Women/Kids
/Categories/MenShirts MenShirtsComponent Men's shirts catalog
/Categories/MenTshirt MenTshirtComponent Men's t-shirts catalog
/Categories/MenPants MenPantsComponent Men's pants catalog
/Categories/MenShoes MenShoesComponent Men's shoes catalog
/Categories/WomenShirts WomenShirtsComponent Women's shirts catalog
/Categories/WomenTshirts WomenTshirtsComponent Women's t-shirts catalog
/Categories/WomenPants WomenPantsComponent Women's pants catalog
/Categories/WomenShoes WomenShoesComponent Women's shoes catalog
/Categories/KidsShirts KidsShirtsComponent Kids' shirts catalog
/Categories/KidsTshirts KidsTshirtsComponent Kids' t-shirts catalog
/Categories/KidsPants KidsPantsComponent Kids' pants catalog
/Categories/KidsShoes KidsShoesComponent Kids' shoes catalog
/product-list/:id ProductDetailsComponent Product detail page
/about AboutComponent About the store

πŸ—ΊοΈ Roadmap

βœ… Completed

  • Angular 18 standalone component architecture
  • 12 product category pages (Men/Women/Kids Γ— Shirts/T-shirts/Pants/Shoes)
  • Product detail page with Add to Cart & Buy Now
  • CartService for cart management
  • Auto-sliding ad carousel with controls
  • Responsive navbar with hamburger toggle
  • Footer with Quick Links, Services, Social
  • About page
  • 200+ real product images
  • TailwindCSS + Bootstrap 5 hybrid styling
  • Price sorting (ascending/descending)
  • ESLint configuration

πŸ”œ Coming Soon

  • πŸ” User Authentication β€” Login/Register with JWT or Firebase Auth
  • πŸ’³ Checkout Flow β€” Complete checkout with payment integration (Stripe/PayPal)
  • πŸ›’ Cart Page β€” Dedicated cart page with quantity adjustment and total calculation
  • πŸ”Ž Search & Filter β€” Global product search with advanced filtering (size, color, price range)
  • πŸ—„οΈ Backend API β€” Connect to a real REST API instead of hardcoded product data
  • ❀️ Wishlist β€” Save favorite products for later
  • πŸ“± PWA Support β€” Progressive Web App for offline browsing
  • πŸ§ͺ E2E Tests β€” Cypress or Playwright end-to-end testing
  • 🐳 Docker β€” Containerized deployment

🀝 Contributing

Contributions are welcome! Fork the repo, create a feature branch, and submit a Pull Request.

git checkout -b feature/amazing-feature
git commit -m "feat: add amazing feature"
git push origin feature/amazing-feature

πŸ“„ License

Distributed under the MIT License.


πŸ‘€ Author

Jaser Kasim
Software Engineer

GitHub LinkedIn

If you found this project helpful, consider giving it a ⭐

Built with ❀️ using Angular 18 and TypeScript

About

Angular front-end for an e-commerce store with categories, product listings, product details, and a shopping cart. Built with Angular and TypeScript.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages