Skip to content

mtellect/styledbyesther_core_platform

Repository files navigation

StyledByEster Core Platform

A comprehensive e-commerce platform built with Flutter and Dart, featuring a modern admin dashboard, robust backend services, shared components, a powerful content management system, and planned AI-powered intelligent features (Work in Progress).

πŸ—οΈ Project Structure

This is a monorepo containing three main packages:

styledbyester_core/
β”œβ”€β”€ styledbyester-app/          # Flutter mobile & web application
β”œβ”€β”€ styledbyester-server/       # Dart backend server
└── styledbyester-shared/       # Shared models and utilities

πŸ“± StyledByEster App

A Flutter application providing both customer-facing features and comprehensive admin management with a modern content management system.

πŸ“– Detailed Documentation: See styledbyester-app/README.md for app-specific setup and development guides.

Features

πŸ›οΈ Customer Features

  • Product Catalog: Browse products with filtering and search
  • Shopping Cart: Add/remove items, quantity management
  • Checkout Process: Payment integration, shipping address management
  • Order Management: Track orders, view history
  • User Authentication: Login, registration, profile management

🏒 Admin Dashboard

  • Business Management:

    • Products: CRUD operations, inventory management, product library
    • Categories: Product categorization, category library, hierarchical organization
    • Materials: Material library and management
    • Filters: Advanced filter management system with Nigerian cultural context
    • Orders: Order tracking, status management, customer order history
    • Customers: User management, order analytics, customer details, activity tracking
    • Media: Image and video management for products
    • Content Management: Dynamic content creation and management
    • Discounts & Coupons: Create, manage, and analyze discount codes and coupons; apply to carts; track usage analytics
  • Content Management System:

    • Content Types: Homepage, PLP (Product Listing Page), PDP (Product Detail Page), Cart
    • Component-Based Design: Reusable content components (banners, carousels, grids, etc.)
    • Visual Editor: Drag-and-drop component configuration
    • Product & Category Integration: Link components to products or categories
    • Responsive Preview: Real-time preview across different screen sizes
    • Validation: Type-specific validation for components
  • Advanced Features:

    • Modal Sheets: Interactive customer, order, and content details
    • Data Tables: Sortable, paginated data with search and filtering
    • Real-time Updates: Live order and inventory tracking
    • Responsive Design: Works on mobile, tablet, and desktop
    • Dashboard Analytics: Sales metrics, order status, customer insights

Tech Stack

  • Framework: Flutter
  • State Management: Provider pattern with ChangeNotifier
  • Routing: AutoRoute for declarative navigation
  • UI Components: Custom admin widgets with Material Design
  • API Integration: RESTful API client with interceptors
  • Responsive Design: Adaptive layouts for all screen sizes

πŸ–₯️ StyledByEster Server

A Dart backend server providing robust API services for the e-commerce platform with content management capabilities and planned AI-powered intelligent features.

πŸ“– Detailed Documentation: See styledbyester-server/README.md for comprehensive server documentation, testing progress, and implementation details.

Features

  • RESTful APIs: Complete CRUD operations for all entities
  • Authentication: User registration, login, OTP verification
  • Payment Integration: Multiple payment providers support (Flutterwave, Paystack)
  • Order Management: Cart to order conversion, status tracking
  • Database Integration: Firebase Firestore with optimized queries
  • File Management: Media upload and storage
  • Search & Pagination: Efficient data retrieval with filtering
  • Content Management: Dynamic content storage and retrieval
  • User Activity Tracking: Comprehensive user behavior analytics
  • Discounts & Coupons: Discount code CRUD, validation, analytics, cart integration, and usage tracking
  • Filter Management: Advanced filter configuration system with Nigerian cultural context

API Endpoints

  • /api/v1/users - User management and activity tracking
  • /api/v1/products - Product catalog and management
  • /api/v1/categories - Category management
  • /api/v1/orders - Order processing and tracking
  • /api/v1/cart - Shopping cart operations
  • /api/v1/payments - Payment processing
  • /api/v1/media - File upload and management
  • /api/v1/content - Content management system
  • /api/v1/user-activities - User behavior tracking
  • /api/v1/discounts - Discount/coupon CRUD, validation, analytics, and usage
  • /api/v1/filter-configs - Filter configuration management

Tech Stack

  • Framework: Dart with Relic
  • Database: Firebase Firestore
  • Authentication: Firebase Auth
  • File Storage: Firebase Storage
  • Dependency Injection: GetIt service locator
  • Testing: Comprehensive unit and integration tests

πŸ“¦ StyledByEster Shared

A shared package containing common models, enums, and utilities used across the app and server.

πŸ“– Detailed Documentation: See styledbyester-shared/README.md for shared package structure and usage guidelines.

Features

  • Data Models: User, Product, Order, Cart, Content models
  • Content Models: ContentComponentModel, CategoryPreviewModel, ProductPreviewModel
  • Enums: Status enums, payment types, order states, component types
  • Utilities: ID generation, validation helpers
  • Type Safety: Consistent data structures across platforms
  • Discount Models: DiscountModel, DiscountUsage, DiscountValidationResult, DiscountType, DiscountStatus
  • Filter Models: FilterConfigItem, FilterOption, FilterType, FilterSelectionType

Content Management Models

  • ContentModel: Core content structure with components
  • ContentComponentModel: Reusable component definitions
  • ComponentType: Enum for all available component types
  • CategoryPreviewModel: Lightweight category representation
  • ProductPreviewModel: Lightweight product representation

πŸ€– AI Integration & Intelligent Features (Work in Progress)

🎯 AI Strategy Overview

The platform is planning to integrate artificial intelligence to enhance user experience through intelligent product discovery, personalized recommendations, and cultural context awareness specific to Nigerian fashion.

⚠️ Note: AI features are currently in the conceptual and planning phase. Implementation is planned for future development phases.

πŸš€ Planned AI Capabilities

MVP Phase (Planned: 3-4 months)

  • Smart Product Discovery: Cultural context-aware search understanding Nigerian fashion terminology
  • Personalized Style Recommendations: Learn user preferences for traditional vs. modern Nigerian styles
  • Smart Filtering & Categorization: Planned AI-powered filter suggestions and dynamic categorization
  • Cultural Fashion Education: AI assistant explaining Nigerian fashion styles and cultural significance

Scalable Phase (Planned: 4-6 months)

  • Visual Style Matching: Image-based search for Nigerian fashion styles
  • Smart Inventory & Trend Prediction: Seasonal trends based on Nigerian climate and cultural events

πŸ—οΈ Planned AI Architecture

  • Dedicated AI Feature Module: Separate service layer with selective access to existing services
  • Cultural Intelligence: Understanding of Nigerian fashion context, materials, and cultural significance
  • Service Integration: AI services would compose with existing product, category, and user services
  • Scalable Design: Progressive enhancement from basic recommendations to advanced personalization

🎨 Nigerian Fashion Expertise (Planned)

  • Cultural Context: AI would understand occasions (work, church, celebrations, daily wear)
  • Material Intelligence: Expertise in Ankara, Adire, Aso-Oke, Bogolan, and other traditional textiles
  • Brand Knowledge: Understanding of Nigerian brands (Lagos Leather, Abuja Style, Kano Kicks)
  • Regional Variations: Awareness of Yoruba, Igbo, and Hausa style preferences

πŸ“Š Expected AI Outcomes (Projected)

  • Search Conversion: 15-25% improvement through better understanding of user intent
  • Product Discovery: 20-30% increase in product views through intelligent recommendations
  • User Engagement: 10-15% increase in session duration through personalized experiences
  • Cultural Education: Enhanced understanding of Nigerian fashion for international customers

πŸ“– Detailed AI Documentation: See styledbyester-server/readme/AI_INTEGRATION_STRATEGY.md for comprehensive AI implementation strategy and roadmap.

πŸ›οΈ Advanced Filter Management System

🎯 Filter System Overview

The platform features a comprehensive filter management system that goes beyond basic product filtering to provide culturally-aware, intelligent filtering experiences.

πŸš€ Key Features

  • Dynamic Filter Configuration: Admin-controlled filter options with real-time updates
  • Cultural Context: Nigerian materials, brands, and style preferences
  • Flexible Filter Types: Color, size, material, brand, price range, and custom filters
  • Filter Analytics: Track filter usage and effectiveness

πŸ—οΈ Filter Architecture

  • FilterConfigItem: Central filter configuration with options and metadata
  • FilterOption: Individual filter values with display names and descriptions
  • FilterType: Enumeration of filter categories (color, size, material, brand, etc.)
  • SelectionType: Single vs. multiple selection modes
  • Cultural Integration: Nigerian-specific materials, brands, and style preferences

πŸ“± User Experience

  • Dynamic Filter Ranking: Most relevant filters appear first
  • Cultural Awareness: Filters understand Nigerian fashion context and preferences
  • Real-time Updates: Filter options update based on available products and trends

πŸ“– Filter System Details: See the filter management implementation in the admin dashboard and product listing pages.

πŸš€ Getting Started

Prerequisites

  • Flutter SDK (latest stable)
  • Dart SDK (latest stable)
  • Firebase project setup
  • Git

Installation

  1. Clone the repository

    git clone <repository-url>
    cd styledbyester_core
  2. Setup Firebase

    • Create a Firebase project
    • Add google-services.json to styledbyester-app/android/app/
    • Add GoogleService-Info.plist to styledbyester-app/ios/Runner/
    • Configure Firebase in styledbyester-server
  3. Install dependencies

    # App dependencies
    cd styledbyester-app
    flutter pub get
    
    # Server dependencies
    cd ../styledbyester-server
    dart pub get
    
    # Shared dependencies
    cd ../styledbyester-shared
    dart pub get
  4. Run the application

    # Start the server
    cd ../styledbyester-server
    dart run bin/server.dart
    
    # Start the Flutter app
    cd ../styledbyester-app
    flutter run

πŸ› οΈ Development

Code Organization

  • Feature-based Structure: Each feature has its own directory with models, services, and UI
  • Shared Components: Reusable widgets and utilities
  • Provider Pattern: Clean state management with ChangeNotifier
  • Service Layer: API abstraction and business logic
  • Content Management: Component-based content system
  • Filter Management: Advanced filtering system with cultural intelligence

Key Patterns

  • Widget Unification: Shared components between pages and modal sheets
  • Admin Information Cards: Flexible display components with multiple variants
  • Modal Sheets: Interactive overlays for detailed views
  • Data Tables: Consistent table implementations with sorting and pagination
  • Content Components: Reusable content blocks for dynamic layouts
  • Filter Components: Dynamic, culturally-aware filtering system

Content Management Architecture

  • Component-Based: All content is built from reusable components
  • Type-Safe: Strong typing with enums for component types
  • Flexible: Support for products, categories, media, and custom data
  • Responsive: Components adapt to different screen sizes
  • Validation: Type-specific validation rules

Testing

  • Unit Tests: Core business logic
  • Widget Tests: UI component testing
  • Integration Tests: End-to-end workflows
  • API Tests: Backend endpoint validation
  • Content Tests: Content management system validation
  • Filter Tests: Filter system functionality and cultural integration testing

πŸ“Š Admin Dashboard Features

Content Management

  • Content Creation: Visual editor for creating dynamic content
  • Component Library: 50+ pre-built components (banners, carousels, grids, etc.)
  • Product Integration: Link components to specific products
  • Category Integration: Link components to product categories
  • Visual Preview: Real-time preview of content across devices
  • Validation: Type-specific validation for components
  • Discount Integration: Add promotional banners, coupon entry, and discount logic to content components

Filter Management

  • Filter Configuration: Create and manage product filters with cultural context
  • Dynamic Options: Real-time filter option updates based on available products
  • Cultural Integration: Nigerian materials, brands, and style preferences
  • Filter Analytics: Track filter usage and effectiveness

Order Management

  • Order Listing: Paginated table with search and filtering
  • Order Details: Comprehensive order information with items and totals
  • Customer Orders: View all orders for specific customers
  • Status Tracking: Real-time order status updates
  • Order Activity: Complete order history and activity tracking

Customer Management

  • Customer Listing: User database with search capabilities
  • Customer Details: Profile information, order history, activity
  • Order Analytics: Total orders, order value, recent activity
  • Interactive Modals: Quick access to customer and order details
  • Activity Tracking: User behavior and interaction analytics

Product Management

  • Product Catalog: Complete product database
  • Category Management: Hierarchical product organization
  • Material Library: Material management for products
  • Media Management: Image and video handling
  • Product Library: Modal sheets for product selection
  • Filter Integration: Products automatically inherit category-based filters

Dashboard Analytics

  • Sales Metrics: Total sales, average order value, revenue trends
  • Order Status: Real-time order status distribution
  • Customer Insights: Customer growth, activity patterns
  • Product Performance: Top-selling products, inventory alerts
  • Weekly Reports: Automated weekly sales and activity reports
  • Filter Analytics: Filter usage patterns and effectiveness metrics

πŸ”§ Configuration

Environment Setup

  • Firebase configuration in firebase_options.dart
  • API endpoints in api_urls.dart
  • Environment variables for server configuration
  • Service locator configuration for dependency injection

Development Tools

  • Mock Data: Comprehensive test data generation
  • Development Scripts: Automated setup and testing
  • Code Generation: AutoRoute and build_runner integration
  • Content Injection: Scripts for populating content in Firebase
  • Filter Testing: Filter system validation and cultural integration testing

Content Management Configuration

  • Component Types: Configurable component library
  • Validation Rules: Type-specific validation configuration
  • Preview Settings: Responsive preview configuration
  • Media Integration: Image and video handling settings

πŸ“ˆ Performance

  • Optimized Queries: Efficient database operations
  • Lazy Loading: On-demand data fetching
  • Caching: Smart data caching strategies
  • Image Optimization: Compressed media handling
  • Content Optimization: Efficient content rendering and storage
  • Filter Optimization: Dynamic filter loading and cultural context caching

🎨 Content Management System

Component Types

  • Display Components: Banners, carousels, grids, lists
  • Product Components: Product cards, product lists, related products
  • Interactive Components: Filters, search, pagination, sorting
  • Content Components: Text, images, videos, rich text
  • E-commerce Components: Add to cart, buy now, wishlist
  • Promotional Components: Promotions, discounts, coupons, offers

Content Types

  • Homepage: Main landing page content
  • PLP (Product Listing Page): Category-specific product listings with advanced filtering
  • PDP (Product Detail Page): Individual product page content
  • Cart: Shopping cart page content

Features

  • Visual Editor: Drag-and-drop component configuration
  • Real-time Preview: Live preview of content changes
  • Responsive Design: Components adapt to screen size
  • Validation: Type-specific validation rules
  • Version Control: Content versioning and history
  • Publishing: Content publishing and scheduling

πŸ“š Documentation & Resources

πŸ“– Main Documentation

πŸ€– AI Integration Documentation (Planned)

πŸ”§ Server Implementation Documentation

πŸ§ͺ Testing & Progress Reports

πŸ›’ E-commerce Features

🎨 Content Management System

πŸ› οΈ Development Tools

πŸ” Feature-Specific Documentation

🀝 Contributing

  1. Follow the existing code structure and patterns
  2. Use the established naming conventions
  3. Add tests for new features
  4. Update documentation as needed
  5. Follow the commit message conventions
  6. Test content management features thoroughly
  7. Validate filter system functionality and cultural integration

πŸ’Έ Discounts & Coupons Feature

Overview

The platform now supports a comprehensive discounts and coupons system:

  • Admin Management: Create, edit, activate/deactivate, and analyze discount codes from the admin dashboard.
  • Cart Integration: Customers can apply valid coupons to their cart; discounts are validated and reflected in real-time.
  • Analytics: Track usage, redemptions, and performance of each discount code.
  • API: Endpoints for CRUD, validation, analytics, and usage tracking.

Key Models

  • DiscountModel: Represents a discount/coupon, including type, value, status, and restrictions.
  • DiscountUsage: Tracks each time a discount is used (cart/order/user).
  • DiscountValidationResult: Result of validating a coupon for a cart.

Admin Features

  • List, search, and filter discounts
  • View discount details, usage analytics, and applicable products/categories
  • Create new discounts with flexible rules (percentage, fixed, min/max, usage limits, etc.)
  • See live analytics on coupon usage and performance

Customer Experience

  • Enter coupon codes in the cart
  • See applied discounts, coupon badges, and savings in real-time
  • Only valid/active coupons are accepted

API Endpoints

  • POST /api/v1/discounts - Create a discount
  • GET /api/v1/discounts - List/search discounts
  • GET /api/v1/discounts/:id - Get discount details
  • POST /api/v1/discounts/validate - Validate a coupon for a cart
  • GET /api/v1/discounts/:id/usage - Get usage analytics
  • POST /api/v1/carts/:cartId/coupons/validate - Validate coupon for a specific cart

See the codebase for full details and usage examples.

🎯 Platform Vision

StyledByEster is more than just an e-commerce platformβ€”it's a culturally aware fashion ecosystem that:

  • Preserves and promotes Nigerian fashion traditions and cultural heritage
  • Educates international customers about authentic Nigerian style and materials
  • Empowers local designers and brands through intelligent discovery and recommendations
  • Builds a global community around Nigerian fashion excellence
  • Plans to leverage AI technology to provide culturally-aware, personalized experiences

The platform's unique value proposition lies in its deep understanding of Nigerian fashion culture combined with modern e-commerce technology and planned intelligent features.

πŸ“„ License

[Add your license information here]


StyledByEster Core Platform - A modern, scalable e-commerce solution with advanced content management capabilities, advanced filter management with cultural context, and planned AI-powered intelligent features, built with Flutter and Dart.

Empowering Nigerian fashion through technology and cultural awareness.

About

StyledByEsther is an e-commerce fashion clothing line platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors