๐ŸŒ AIๆœ็ดข & ไปฃ็† ไธป้กต
Skip to content

๐ŸŒŸ Modern e-commerce platform solving slow, outdated online shopping experiences with Angular 19, PrimeNG, and Tailwind CSS v4 - delivering lightning-fast SSR performance and mobile-first responsive design.

License

Notifications You must be signed in to change notification settings

miguelbtcode/techmart-frontend

Repository files navigation

TechMart - Modern E-commerce Platform

A modern, high-performance e-commerce platform built with Angular 19, PrimeNG, and Tailwind CSS v4.

Angular TypeScript PrimeNG Tailwind CSS License

Features

Customer Features

  • ๐Ÿ›๏ธ Product Catalog - Advanced filtering, search, and pagination
  • ๐Ÿ›’ Shopping Cart - Persistent cart with real-time updates
  • ๐Ÿ’ณ Checkout Process - Multi-step checkout with payment integration
  • ๐Ÿ‘ค User Accounts - Registration, login, profile management
  • ๐Ÿ“ฆ Order Tracking - Real-time order status and delivery tracking
  • โญ Reviews & Ratings - Product reviews and rating system
  • ๐Ÿ’ Wishlist - Save favorite products for later

Admin Features

  • ๐Ÿ“Š Dashboard - Sales analytics and key performance indicators
  • ๐Ÿ“ฆ Product Management - CRUD operations with image management
  • ๐Ÿ“‹ Order Management - Order processing and fulfillment
  • ๐Ÿ‘ฅ Customer Management - User accounts and customer analytics
  • ๐Ÿ“ˆ Reports - Sales reports and business intelligence
  • โš™๏ธ Settings - Store configuration and preferences

Technical Features

  • ๐Ÿš€ Server-Side Rendering (SSR) - Optimized for SEO and performance
  • ๐Ÿ“ฑ Responsive Design - Mobile-first approach with Tailwind CSS
  • โšก Angular Signals - Modern reactive state management
  • ๐ŸŽจ Modern UI - PrimeNG components with custom Tailwind styling
  • ๐Ÿ”’ Authentication - JWT-based authentication with route guards
  • ๐Ÿ“Š Real-time Updates - Live inventory and order status
  • ๐ŸŒ™ Dark Mode - Theme switching capability

Tech Stack

Frontend

  • Framework: Angular 19 with Standalone Components
  • UI Library: PrimeNG 19 with Aura Theme
  • Styling: Tailwind CSS v4 with Lightning CSS
  • State Management: Angular Signals
  • HTTP Client: Axios with interceptors
  • Notifications: NGX-Toastr
  • Icons: PrimeIcons

Development Tools

  • Language: TypeScript 5.7
  • Build Tool: Angular CLI with Vite
  • Package Manager: npm
  • Linting: ESLint + Prettier
  • Testing: Jasmine + Karma
  • CI/CD: GitHub Actions

Quick Start

Prerequisites

  • Node.js 18+
  • npm 8+
  • Git

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/techmart-app.git
    cd techmart-app
  2. Install dependencies

    npm install
  3. Start development server

    npm start
  4. Open your browser

    http://localhost:4200
    

Available Scripts

Command Description
npm start Start development server
npm run build Build for production
npm run build:ssr Build with server-side rendering
npm test Run unit tests
npm run test:watch Run tests in watch mode
npm run e2e Run end-to-end tests
npm run lint Run ESLint
npm run format Format code with Prettier

Project Structure

src/
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ core/                    # Core functionality
โ”‚   โ”‚   โ”œโ”€โ”€ guards/              # Route guards
โ”‚   โ”‚   โ”œโ”€โ”€ interceptors/        # HTTP interceptors
โ”‚   โ”‚   โ”œโ”€โ”€ models/              # TypeScript interfaces
โ”‚   โ”‚   โ””โ”€โ”€ services/            # Core services
โ”‚   โ”œโ”€โ”€ features/                # Feature modules
โ”‚   โ”‚   โ”œโ”€โ”€ auth/                # Authentication
โ”‚   โ”‚   โ”œโ”€โ”€ catalog/             # Product catalog
โ”‚   โ”‚   โ”œโ”€โ”€ cart/                # Shopping cart
โ”‚   โ”‚   โ”œโ”€โ”€ checkout/            # Checkout process
โ”‚   โ”‚   โ”œโ”€โ”€ dashboard/           # Admin dashboard
โ”‚   โ”‚   โ”œโ”€โ”€ orders/              # Order management
โ”‚   โ”‚   โ””โ”€โ”€ users/               # User management
โ”‚   โ”œโ”€โ”€ layout/                  # Layout components
โ”‚   โ”‚   โ”œโ”€โ”€ header/              # Navigation header
โ”‚   โ”‚   โ”œโ”€โ”€ footer/              # Footer
โ”‚   โ”‚   โ””โ”€โ”€ sidebar/             # Navigation sidebar
โ”‚   โ”œโ”€โ”€ services/                # Business logic services
โ”‚   โ”‚   โ”œโ”€โ”€ auth/                # Authentication service
โ”‚   โ”‚   โ”œโ”€โ”€ cart/                # Cart service with Signals
โ”‚   โ”‚   โ”œโ”€โ”€ catalog/             # Product service
โ”‚   โ”‚   โ””โ”€โ”€ orders/              # Order service
โ”‚   โ””โ”€โ”€ shared/                  # Shared components
โ”‚       โ”œโ”€โ”€ components/          # Reusable components
โ”‚       โ”œโ”€โ”€ directives/          # Custom directives
โ”‚       โ””โ”€โ”€ pipes/               # Custom pipes
โ”œโ”€โ”€ assets/                      # Static assets
โ”œโ”€โ”€ environments/                # Environment configs
โ””โ”€โ”€ styles.css                   # Global styles

Architecture

State Management with Angular Signals

TechMart uses Angular Signals for reactive state management:

@Injectable({
  providedIn: "root",
})
export class CartService {
  private _items = signal<CartItem[]>([]);
  private _loading = signal(false);

  // Public readonly signals
  readonly items = this._items.asReadonly();
  readonly loading = this._loading.asReadonly();
  readonly totalItems = computed(() => this._items().length);
  readonly totalPrice = computed(() => this._items().reduce((sum, item) => sum + item.price * item.quantity, 0));

  // Actions
  addItem(product: Product, quantity = 1) {
    this._items.update((items) => {
      const existingItem = items.find((item) => item.productId === product.id);
      if (existingItem) {
        return items.map((item) => (item.productId === product.id ? { ...item, quantity: item.quantity + quantity } : item));
      }
      return [...items, { productId: product.id, quantity, ...product }];
    });
  }
}

CSS Architecture

The project uses a layered CSS approach with proper ordering:

/* styles.css */
@import "tailwindcss";
@plugin "tailwindcss-primeui";

/* CSS Layer Order: theme, base, primeng */

Development Guidelines

Component Structure

  • Use standalone components
  • Implement OnPush change detection
  • Follow Angular style guide
  • Use Signals for reactive state

Styling Guidelines

  • Mobile-first responsive design
  • Use Tailwind utility classes
  • Leverage PrimeNG components
  • Maintain consistent spacing (4px grid)

Code Quality

  • Write unit tests for services
  • Use TypeScript strict mode
  • Follow ESLint rules
  • Document complex logic

Deployment

Production Build

npm run build:ssr

Docker Deployment

docker build -t techmart-app .
docker run -p 80:80 techmart-app

Environment Variables

Variable Description Default
API_URL Backend API URL http://localhost:3000/api
NODE_ENV Environment development

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Commit Convention

Follow Conventional Commits:

  • feat: new features
  • fix: bug fixes
  • docs: documentation changes
  • style: formatting changes
  • refactor: code refactoring
  • test: adding tests
  • chore: maintenance tasks

Browser Support

Browser Version
Chrome 111+
Firefox 128+
Safari 16.4+
Edge 111+

Performance

  • โšก 5x faster full builds with Tailwind CSS v4
  • ๐Ÿš€ 100x faster incremental builds
  • ๐Ÿ“ฆ Tree-shaking with standalone components
  • ๐Ÿ—œ๏ธ Optimized bundles with Angular CLI

License

This project is licensed under the MIT License - see the LICENSE file for details.

Roadmap

  • Payment gateway integration (Stripe, PayPal)
  • Multi-language support (i18n)
  • PWA capabilities
  • Advanced analytics dashboard
  • Mobile app with Ionic
  • Microservices backend
  • AI-powered product recommendations

Support


Made with โค๏ธ by Miguel Barreto

About

๐ŸŒŸ Modern e-commerce platform solving slow, outdated online shopping experiences with Angular 19, PrimeNG, and Tailwind CSS v4 - delivering lightning-fast SSR performance and mobile-first responsive design.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published