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