A modern, scalable Angular e-commerce application built with cutting-edge technologies and best practices. This application features comprehensive state management, internationalization, authentication, validation, and a robust development workflow.
- Personal Project (currently maintained by a single developer)
- Designed with scalability and team collaboration in mind
- Team Size: 1 Developer (full-stack & DevOps responsibilities)
- Potential Expansion: Future-ready for designers, QA engineers, and backend contributors
- Start Date: August 2025
- Current Status: In active development
- Planned v1.0 Release: Q4 2025
- Development Approach: Agile-inspired, iterative releases
- Task Management: Trello Board
- Branching Strategy: Single main branch with direct commits
- Code Reviews: Self-review with automated linting & quality checks
This project is a modern e-commerce platform designed to provide a seamless online shopping experience. The application enables users to:
- Browse and search through product catalogs across multiple categories
- Add products to shopping cart and manage cart items
- Complete secure checkout process with Stripe payment integration
- View order history and track order status
- Manage user profiles and account settings
- Experience fully internationalized interface (English and Turkish)
- Enjoy responsive design across all devices
Live Demo: marketivo.erengaygusuz.com.tr
The application supports two main user types with specific capabilities:
Feature | Guest User | Authenticated User |
---|---|---|
Browse products | โ | โ |
View product details | โ | โ |
Search and filter products | โ | โ |
Add to cart | โ | โ |
Checkout process | โ | โ |
Order history | โ | โ |
Profile management | โ | โ |
Language switching | โ | โ |
Dark/Light mode toggle | โ | โ |
- Angular 20 - Latest Angular framework with standalone components
- TypeScript - Type-safe development
- SCSS - Enhanced styling capabilities
- TailwindCSS v4 - Utility-first CSS framework with PrimeNG integration
- PrimeNG - Comprehensive UI component library with Aura theme
- NgRx Store - Predictable state management with actions, reducers, and effects
- Facade Pattern - Clean abstraction layer between components and store
- Reactive Programming - RxJS for handling asynchronous operations
- Modular Architecture - Well-organized folder structure with clear separation of concerns
- Component-Based Design - Reusable, maintainable UI components
- Auth0 Integration - Secure authentication and authorization
- JWT Token Management - Automatic token handling with interceptors
- Protected Routes - Route guards for secure navigation with authorization-protected endpoints
- HTTP Interceptors - Automatic request/response processing
- Role-Based Access Control - Different permissions for guest and authenticated users
- Product Catalog - Browse products by categories with search and filtering
- Shopping Cart - Add, remove, and manage cart items with persistent storage
- Stripe Integration - Secure payment processing with multiple payment methods
- Order Management - Complete order tracking and history
- Responsive Design - Mobile-first approach with responsive layouts
- SEO Optimization - Search engine friendly structure
- Multi-language Support - English and Turkish translations
- Dynamic Language Switching - Runtime language changes
- Localized Content - Complete UI translation support
- Server-side Configuration - Environment-based language configuration
- RTL Support Ready - Right-to-left language support preparation
- FluentValidation-TS - Powerful TypeScript validation library
- Reactive Forms - Angular reactive forms with custom validators
- Real-time Validation - Instant feedback on user input
- Internationalized Error Messages - Localized validation messages
- Custom Validators - Business-specific validation rules
- Lazy Loading - Route-based code splitting for faster load times
- OnPush Change Detection - Optimized change detection strategy
- Tree Shaking - Dead code elimination for smaller bundles
- Service Workers - Offline support and caching strategies
- Image Optimization - Responsive images and lazy loading
- ESLint - Advanced code linting with TypeScript support
- Prettier - Automated code formatting
- Code Quality Checks - Pre-build validation scripts
- Development Certificates - HTTPS support for local development
- Hot Reload - Fast development with live updates
- Source Maps - Enhanced debugging experience
- Docker Support - Multi-stage Docker builds with Nginx
- Nginx Configuration - Production-ready web server setup
- Server-side Configuration - Runtime environment variable injection
- Multiple Environments - Development, staging, and production configs
- CI/CD Ready - Prepared for continuous integration workflows
- Health Checks - Application monitoring and status endpoints
- Node.js (v20 or higher)
- npm (v9 or higher)
- Docker (for containerized deployment)
- Git (for version control)
-
Clone the repository
git clone <repository-url> cd marketivo-frontend
-
Install dependencies
npm install
-
Environment Setup
The application uses server-side configuration for environment variables. Configure these variables in your deployment environment:
PROD
- Production flag (true/false)API_ADDRESS
- Backend API base URLSTRIPE_PK
- Stripe publishable keyAUTH_DOMAIN
- Auth0 domainAUTH_CLIENT_ID
- Auth0 client IDAUTH_AUDIENCE
- Auth0 API audienceDEFAULT_LANG
- Default language (en-US, tr-TR)SUPPORTED_LANGS
- Comma-separated supported languages
# Start development server with code quality checks
npm run start
# Start development server without checks (faster)
npm run start:no-check
# Start with HTTPS (recommended for Auth0)
npm run dev
# Start staging environment
npm run stage
# Start production environment locally
npm run prod
# Format and lint code
npm run code:fix
# Check code quality without fixing
npm run code:check
# Strict code quality check (no warnings allowed)
npm run code:check:strict
# Format code only
npm run format
# Lint code only
npm run lint
# Production build with code quality checks
npm run build
# Production build without checks
npm run build:no-check
# Watch mode for development
npm run watch
# Run unit tests
npm test
- Code Quality: Every build and start command runs code quality checks by default
- HTTPS Development: Use
npm run dev
for HTTPS development (required for Auth0) - Environment Switching: Use different commands for different environments
- Hot Reload: Changes are automatically reflected in the browser
src/
โโโ app/
โ โโโ components/ # Reusable UI components
โ โ โโโ app-auth-callback/ # Auth0 callback handler
โ โ โโโ app-cart-details/ # Shopping cart management
โ โ โโโ app-cart-status/ # Cart status indicator
โ โ โโโ app-checkout/ # Checkout process
โ โ โโโ app-footer/ # Application footer
โ โ โโโ app-language-selector/ # Language switching
โ โ โโโ app-layout/ # Main layout wrapper
โ โ โโโ app-login-status/ # Authentication status
โ โ โโโ app-menu/ # Navigation menu
โ โ โโโ app-menuitem/ # Menu item component
โ โ โโโ app-order-history/ # Order history display
โ โ โโโ app-product-details/ # Product detail view
โ โ โโโ app-product-list/ # Product catalog
โ โ โโโ app-profile-page/ # User profile management
โ โ โโโ app-sidebar/ # Sidebar navigation
โ โ โโโ app-topbar/ # Top navigation bar
โ โโโ facades/ # State management facades
โ โ โโโ auth.facade.ts # Authentication state
โ โ โโโ cart.facade.ts # Shopping cart state
โ โ โโโ checkout.facade.ts # Checkout process state
โ โ โโโ language.facade.ts # Language settings state
โ โ โโโ order-history.facade.ts # Order history state
โ โ โโโ product.facade.ts # Product catalog state
โ โโโ interceptors/ # HTTP interceptors
โ โ โโโ auth-interceptor.ts # JWT token injection
โ โ โโโ language-interceptor.ts # Language header injection
โ โโโ models/ # TypeScript interfaces and types
โ โ โโโ address-data.ts # Address form data
โ โ โโโ auth-info.ts # Authentication info
โ โ โโโ cart-item.ts # Shopping cart item
โ โ โโโ customer.ts # Customer information
โ โ โโโ order.ts # Order information
โ โ โโโ product.ts # Product information
โ โ โโโ ... # Additional models
โ โโโ services/ # Business logic services
โ โ โโโ ... # API and business services
โ โโโ store/ # NgRx store (actions, reducers, effects)
โ โ โโโ ... # Store configuration
โ โโโ validators/ # Form validation logic
โ โ โโโ ... # Custom validators
โ โโโ config/ # Application configuration
โ โโโ custom-config.ts # Environment configuration
โโโ assets/ # Static assets and styles
โ โโโ styles.scss # Global styles
โ โโโ tailwind.css # TailwindCSS imports
โ โโโ layout/ # Layout-specific styles
โโโ environments/ # Environment configurations
โ โโโ environment.ts # Production environment
โ โโโ environment.development.ts # Development environment
โ โโโ environment.staging.ts # Staging environment
โ โโโ environment.interface.ts # Environment interface
โโโ public/ # Public assets and i18n files
โโโ i18n/ # Internationalization files
โ โโโ en-US.json # English translations
โ โโโ tr-TR.json # Turkish translations
โโโ images/ # Static images
โโโ logo.png # Application logo
โโโ products/ # Product images
- Angular: ^20.0.0 - Latest Angular framework with standalone components
- TypeScript: ^5.7.0 - Strongly typed JavaScript superset
- RxJS: ^7.8.0 - Reactive Extensions for JavaScript
- PrimeNG: ^20.3.0 - Comprehensive Angular UI component library
- PrimeFlex: ^3.3.1 - CSS utility library for flexbox
- PrimeIcons: ^7.0.0 - Icon library for PrimeNG
- @primeuix/themes: ^1.2.1 - Modern theming system
- TailwindCSS: v4 - Utility-first CSS framework
- FontAwesome: ^6.7.2 - Icon library
- @ngrx/store: ^20.0.0 - State management library
- @ngrx/effects: ^20.0.0 - Side effects management
- @ngrx/store-devtools: ^20.0.0 - Development tools for NgRx
- @auth0/auth0-angular: ^2.2.3 - Auth0 integration for Angular
- JWT handling: Built-in JWT token management
- @ngx-translate/core: ^17.0.0 - Angular internationalization
- @ngx-translate/http-loader: ^17.0.0 - HTTP loader for translations
- @stripe/stripe-js: ^7.8.0 - Stripe payment integration
- @angular/cli: Latest - Angular command line interface
- ESLint: Latest - Code linting and quality assurance
- Prettier: Latest - Code formatting
- TypeScript ESLint: Latest - TypeScript-specific linting rules
- FluentValidation-TS: Latest - TypeScript validation library
- Angular Reactive Forms: Built-in form validation
- @angular-architects/native-federation: Module federation support
- NGSSC: Server-side configuration for Angular
- Docker: Multi-stage containerization
- Nginx: Production web server
- @angular-devkit/build-angular: Latest - Angular build tools
- Karma: Latest - Test runner
- Jasmine: Latest - Testing framework
The application uses NgRx for centralized state management with the following structure:
- Actions: Define what can happen in the application
- Reducers: Pure functions that handle state changes
- Effects: Handle side effects like API calls
- Selectors: Query the store for specific data
- Facades: Provide a clean API for components
Facades abstract the complexity of NgRx store operations:
// Example: AuthFacade usage
constructor(private authFacade: AuthFacade) {}
ngOnInit() {
this.isAuthenticated$ = this.authFacade.isAuthenticated$;
this.user$ = this.authFacade.user$;
}
login() {
this.authFacade.login();
}
FluentValidation-TS provides powerful, composable validation:
// Example: Form validation
export class CustomerValidator extends Validator<CustomerData> {
constructor() {
super();
this.ruleFor('email')
.notEmpty()
.withMessage('Validation.EmailRequired')
.emailAddress()
.withMessage('Validation.EmailFormat');
}
}
docker build -t marketivo-frontend .
docker run -p 80:80 \
-e PROD=true \
-e API_ADDRESS=https://api.marketivo.com \
-e STRIPE_PK=pk_live_your_stripe_key \
-e AUTH_DOMAIN=your-auth0-domain \
-e AUTH_CLIENT_ID=your-auth0-client-id \
-e AUTH_AUDIENCE=your-auth0-audience \
marketivo-frontend
version: '3.8'
services:
frontend:
build: .
ports:
- "80:80"
environment:
- PROD=true
- API_ADDRESS=https://api.marketivo.com
- STRIPE_PK=pk_live_your_stripe_key
- AUTH_DOMAIN=your-auth0-domain
- AUTH_CLIENT_ID=your-auth0-client-id
- AUTH_AUDIENCE=your-auth0-audience
- DEFAULT_LANG=en-US
- SUPPORTED_LANGS=en-US,tr-TR
- Create translation file:
public/i18n/{language-code}.json
- Update environment: Add language code to
SUPPORTED_LANGS
- Translation structure:
{ "Navigation": { "Homepage": "Home" }, "Validation": { "EmailRequired": "Email is required" } }
// In component
constructor(private translate: TranslateService) {}
ngOnInit() {
this.title = this.translate.instant('Navigation.Homepage');
}
<!-- In template -->
<h1>{{ 'Navigation.Homepage' | translate }}</h1>
The application supports runtime configuration through environment variables:
Variable | Description | Default |
---|---|---|
PROD |
Production mode | false |
API_ADDRESS |
Backend API URL | /api |
STRIPE_PK |
Stripe publishable key | Test key |
AUTH_DOMAIN |
Auth0 domain | Default domain |
AUTH_CLIENT_ID |
Auth0 client ID | Default client |
AUTH_AUDIENCE |
Auth0 API audience | Default audience |
DEFAULT_LANG |
Default language | en-US |
SUPPORTED_LANGS |
Supported languages | en-US,tr-TR |
For local HTTPS development, certificates are provided in the certs/
directory:
localhost.crt
- SSL certificatelocalhost.key
- Private key
Unit tests are not currently implemented but are planned for future development.
# Unit tests will be available in future versions
# npm test
npm run code:check:strict
The build process includes:
- Code Quality Check - ESLint and Prettier validation
- TypeScript Compilation - Type checking and compilation
- Angular Build - Application bundling and optimization
- NGSSC Integration - Server-side configuration setup
- Asset Optimization - Minification and compression
As this is currently a personal project developed by a single developer, contributions are welcome but managed differently than typical open-source projects:
- Solo Development: Currently developed and maintained by Eren Gaygusuz
- Task Management: Progress tracked on Trello Board
- Single Branch: Direct commits to main branch with thorough testing
- Quality Assurance: Automated linting, formatting, and manual testing
- Check the Trello Board to see current tasks and priorities
- Open an Issue to discuss your proposed contribution
- Fork the repository and create your feature branch
- Follow the development guidelines outlined below
- Submit a Pull Request with detailed description
- Follow the existing code style and architecture patterns
- Write meaningful commit messages following conventional commits
- Add tests for new features when applicable
- Update documentation for significant changes
- Run code quality checks before committing:
npm run code:check:strict
- ESLint: Follow the configured ESLint rules (no warnings allowed in strict mode)
- Prettier: Code formatting is automatically enforced
- TypeScript: Strict typing is required - no
any
types - Angular Style Guide: Follow official Angular style guidelines
- Component Architecture: Use standalone components and signals where appropriate
- State Management: Use facades for component-store interaction
We follow the Conventional Commits specification:
feat:
A new featurefix:
A bug fixdocs:
Documentation only changesstyle:
Changes that do not affect the meaning of the coderefactor:
A code change that neither fixes a bug nor adds a featureperf:
A code change that improves performancetest:
Adding missing tests or correcting existing testschore:
Changes to the build process or auxiliary tools
- Ensure all tests pass and code quality checks succeed
- Update the README.md if you've made significant changes
- Reference related Trello cards in your PR description
- Request a review from the maintainer
- Address feedback promptly and professionally
# Unit tests (planned for future implementation)
# npm test
# Run code quality checks
npm run code:check:strict
# Run full build to ensure everything works
npm run build
- Check the Trello Board for current development status
- Check existing GitHub issues first
- Create a new issue with detailed information for bugs or feature requests
- Contact the developer through GitHub for questions
Main product catalog with grid layout and search functionality
Alternative product list view with enhanced filtering options
Detailed product view with specifications and add to cart functionality
Application supports both dark and light themes for better user experience
Complete internationalization with English and Turkish language support
Shopping cart management with item quantity controls and total calculations
Secure checkout process with customer information and address forms
Real-time form validation with internationalized error messages
Order confirmation page with payment success notification
Complete order history with tracking and order details
User profile management with account settings and personal information
Secure authentication powered by Auth0 with multiple login options
This project is licensed under the MIT License - see the LICENSE file for details.
This means you are free to:
- Use the software for any purpose
- Change the software to suit your needs
- Share the software with your friends and neighbors
- Share the changes you make
- Tree Shaking: Dead code elimination
- Code Splitting: Route-based lazy loading
- Compression: Gzip and Brotli compression
- Minification: Production builds are minified
- OnPush Change Detection: Optimized change detection
- Signals: Modern reactivity where applicable
- Virtual Scrolling: For large lists
- Image Optimization: Responsive images and lazy loading
- Server-Side Rendering: Ready for SSR implementation
- Meta Tags: Dynamic meta tag management
- Structured Data: Schema.org markup
- Semantic HTML: Proper HTML structure
- ARIA Labels: Screen reader support
- Content Security Policy: CSP headers configured
- HTTPS Only: Secure communication enforced
- JWT Token Security: Secure token handling
- XSS Protection: Built-in Angular XSS protection
- CSRF Protection: Cross-site request forgery protection
- Input Sanitization: All user inputs are sanitized
Browser | Version |
---|---|
Chrome | 90+ |
Firefox | 88+ |
Safari | 14+ |
Edge | 90+ |
- Responsive Design: Mobile-first approach
- Touch Gestures: Touch-friendly interactions
- Progressive Web App: PWA capabilities ready
- Offline Support: Service worker integration ready
- Documentation: Check this README and related docs first
- Task Management: Track progress on Trello Board
- Issues: Use GitHub issues for critical bug reports
- Direct Contact: Reach out through GitHub profile
- Developer: Eren Gaygusuz
- Project Board: Marketivo Trello
- Repository: GitHub Repository
- This is a personal project with open contribution opportunities
- Be respectful and constructive in all interactions
- Provide detailed information when reporting issues
- Check the Trello board before suggesting new features
- Help improve documentation and code quality
- Angular Team - For the amazing framework
- PrimeNG Team - For the comprehensive UI library
- NgRx Team - For the powerful state management solution
- Auth0 - For secure authentication services
- Stripe - For payment processing integration
- Open Source Community - For the incredible ecosystem
- ๐ Adding Unit Tests - Implement comprehensive unit testing for all components and services
- ๐ Global Error Handler - Centralized error handling and user-friendly error messages
- ๐ Keycloak Integration - Replace Auth0 with Keycloak for authentication and authorization
- ๐ฎ Product Image Zoom - Adding zoom-in/zoom-out functionality for product images
- ๐ฎ Advanced Product Filters - Detailed filtering options for product list (price range, ratings, etc.)
- ๐ฎ Dynamic Object Mapping - Using dynamic-mapper for efficient object mapping
- ๐ฎ Multi-language Auth Pages - Extend internationalization to authentication pages
- ๐ฎ Shipping Integration - Using Karrio API for shipping calculations and tracking
- ๐ฎ CI/CD Pipeline - Using Jenkins for automated deployment pipeline
- ๐ Mobile Application - Native mobile app development
- ๐ AI Recommendations - Advanced AI-powered product recommendations
- ๐ Microservices Architecture - Migration to microservices-based backend
- ๐ Advanced Reporting - Comprehensive analytics and reporting systemtive development
๐ Marketivo Frontend - Modern E-commerce Experience
Built with โค๏ธ using Angular 20, NgRx, PrimeNG, and modern web technologies
๐ Homepage โข ๐ Documentation โข ๐ Report Bug โข ๐ก Request Feature
Made with passion for modern web development