Folder Structure
Author: Carmine Antonio Bonavoglia Creation Date: 29/10/2025
Last Reviewer: Carmine Antonio Bonavoglia Last Updated: 30/10/2025
The ARShades Studio project follows a structured, scalable architecture designed to separate concerns and facilitate maintainability. This document outlines the directory hierarchy and explains the purpose of each major folder within the application.
Project Tree Structure
ARShades_Studio_V2/
├── src/
│ ├── assets/
│ │ ├── file/
│ │ ├── fonts/
│ │ ├── hdr/
│ │ ├── icon/
│ │ ├── images/
│ │ └── lottie/
│ ├── components/
│ │ ├── AR3dViewer/
│ │ ├── ARSCatalog/
│ │ ├── ARShades3dViewerCustomThree/
│ │ ├── Admin/
│ │ ├── Analytics/
│ │ ├── Components/
│ │ ├── DataConsumption/
│ │ ├── Gateways/
│ │ ├── Home/
│ │ ├── LocalRenderer/
│ │ ├── Login/
│ │ ├── ModelViewer/
│ │ ├── MyCatalogues/
│ │ ├── OrderPage/
│ │ ├── ProductDetail/
│ │ │ ├── VariantDetails/
│ │ │ ├── VariantsList/
│ │ │ ├── VirtualTryOn/
│ │ │ └── hooks/
│ │ ├── Profile/
│ │ ├── SupportModal.js
│ │ ├── ThumbnailGenerator/
│ │ ├── CenteredLoader.js
│ │ ├── DashboardLayout.js
│ │ ├── EmptyCard.js
│ │ ├── ErrorBoundary.js
│ │ └── PrivateRoute.js
│ ├── config/
│ │ ├── firebase.js
│ │ └── version.js
│ ├── data/
│ │ ├── analytics/
│ │ ├── chat/
│ │ ├── customizer/
│ │ ├── ecommerce/
│ │ ├── email/
│ │ ├── todo/
│ │ ├── base.js
│ │ └── utils.js
│ ├── frameValidation/
│ │ ├── modal/
│ │ ├── pages/
│ │ └── services/
│ ├── hooks/
│ │ └── useTrackedImageLoad.js
│ ├── models/
│ ├── pages/
│ │ ├── AR3dViewer.js
│ │ ├── ARSCatalog.js
│ │ ├── ARSCatalogSPA.js
│ │ ├── ARSProductDetail.js
│ │ ├── ARShades3dViewer.js
│ │ ├── Admin.js
│ │ ├── Analytics.js
│ │ ├── CatalogueDetail.js
│ │ ├── CompleteRegistration.js
│ │ ├── Components.js
│ │ ├── DataConsumption.js
│ │ ├── FrameValidation.js
│ │ ├── Gateways.js
│ │ ├── Home.js
│ │ ├── Login.js
│ │ ├── MaterialPresets.js
│ │ ├── MyCatalogues.js
│ │ ├── OrderPage.js
│ │ ├── Profile.js
│ │ ├── Renderer.js
│ │ └── [additional page components]
│ ├── redux/
│ │ ├── Catalogues/
│ │ ├── MainBrands/
│ │ ├── Profiles/
│ │ ├── actionType.js
│ │ ├── analytics/
│ │ ├── authentication/
│ │ ├── brand/
│ │ ├── brandViewer/
│ │ ├── cart/
│ │ ├── catalog/
│ │ ├── chat-app/
│ │ ├── config/
│ │ ├── customizer/
│ │ ├── email-app/
│ │ ├── filter/
│ │ ├── index.js
│ │ ├── licenses/
│ │ ├── model/
│ │ ├── notifications/
│ │ ├── occhiale/
│ │ ├── product/
│ │ ├── profile/
│ │ ├── rootReducer.js
│ │ ├── selectors/
│ │ ├── selectors.js
│ │ ├── service/
│ │ ├── sidebar.js
│ │ ├── slices/
│ │ ├── store.js
│ │ ├── theme/
│ │ ├── todo/
│ │ └── wishlist/
│ ├── route/
│ │ └── ProtectedRoute.js
│ ├── services/
│ │ ├── api/
│ │ ├── cache/
│ │ ├── data/
│ │ ├── firebase/
│ │ ├── hooks/
│ │ ├── utils/
│ │ ├── OnBordingUtils.js
│ │ ├── catalogueService.js
│ │ ├── edit3dViewer.js
│ │ ├── emailService.js
│ │ ├── home.js
│ │ └── profile.js
│ ├── styles/
│ │ ├── ARShades3dViewerCustom/
│ │ ├── ARShades3dsTemplate/
│ │ ├── ARShadesDemo/
│ │ ├── Dashboard/
│ │ ├── FrameValidation/
│ │ ├── Home/
│ │ └── ModelViewer/
│ ├── theme/
│ │ ├── ThemeContext.js
│ │ ├── ThemeToggle.js
│ │ ├── brandColors.js
│ │ └── theme.js
│ ├── utils/
│ │ ├── catalogEvents.js
│ │ ├── notifications.js
│ │ ├── numberFormatting.js
│ │ └── secureStorage.js
│ ├── docs/
│ ├── App.css
│ ├── App.js
│ ├── App.test.js
│ ├── chartSetup.js
│ ├── fonts.css
│ ├── index.css
│ ├── index.js
│ ├── logo.svg
│ ├── reportWebVitals.js
│ └── setupTests.js
├── public/
│ ├── index.html
│ ├── manifest.json
│ ├── robots.txt
│ └── fonts/
│ └── atkinson/
├── build/
│ ├── asset-manifest.json
│ ├── index.html
│ ├── manifest.json
│ ├── robots.txt
│ ├── fonts/
│ │ └── atkinson/
│ └── static/
│ ├── css/
│ ├── js/
│ └── media/
├── docs/
├── firebase.json
├── package.json
├── README.md
└── update-version.js
Directory Overview
Root Level Configuration Files
package.json– Node.js project metadata, dependencies, and npm scripts for build and developmentREADME.md– Project overview, setup instructions, and quick-start guide
/src – Application Source Code
The heart of the application, containing all React components, logic, and utilities organised by concern and feature domain.
/src/assets – Static Resources
All static assets imported directly into the application code:
file/– Downloadable documents and reference filesfonts/– Custom font files including the Atkinson font familyhdr/– High Dynamic Range imagery for advanced 3D rendering and lightingicon/– SVG and raster icon assets used throughout the UIimages/– Product photography, brand assets, and UI imagerylottie/– Animated JSON files for Lottie animation library integration
/src/components – Reusable React Components
Modular React components organised by feature domain. Each folder typically contains related components, subcomponents, styles, and component-specific utilities.
Major Components:
-
ProductDetail/– Unified product display and management interfaceVariantDetails/– Individual variant validation and 3D previewVariantsList/– Variant list rendering with filtering and sortingVirtualTryOn/– Augmented reality virtual try-on functionalityhooks/– Custom hooks specific to product detail workflows
-
AR3dViewer/– Augmented reality viewer for immersive eyewear preview -
ModelViewer/– WebGL/Three.js 3D model viewing and manipulation -
Admin/– Administrative dashboard and management tools -
Analytics/– Analytics dashboards and data visualisation -
Login/– Authentication and login interface -
Profile/– User account and profile management -
Home/– Home page sections and hero components -
ARSCatalog/– Catalogue browsing and product discovery -
MyCatalogues/– User-owned catalogue management interface -
OrderPage/– Order creation, management, and checkout flow -
DataConsumption/– Data usage tracking and reporting -
Gateways/– Payment gateway and third-party integration components -
ThumbnailGenerator/– Thumbnail generation utilities and components
Utility Components:
CenteredLoader.js– Centralised loading spinner componentDashboardLayout.js– Reusable dashboard grid and layout wrapperEmptyCard.js– Empty state placeholder componentErrorBoundary.js– React error boundary for error handlingSupportModal.js– Customer support and help modalPrivateRoute.js– Route protection component (authentication guard)
/src/config – Configuration Management
Environment and feature configuration files:
firebase.js– Firebase SDK initialisation with authentication and database setupversion.js– Application version constants and version-related metadata
/src/data – Mock Data and Fixtures
Curated mock data sets used during development and for feature demonstrations:
analytics/– Sample analytics data and metricschat/– Chat message templates and conversation fixturescustomizer/– Customiser option defaults and presetsecommerce/– Mock product and order dataemail/– Email template and notification fixturestodo/– Task and todo list samplesbase.js– Base data structures and common fixturesutils.js– Data manipulation and transformation utilities
/src/frameValidation – Frame Validation Module
Dedicated feature module for the Frame Validation system, handling batch validation, quality assurance, and assignment management for 3D eyewear production:
pages/– Page-level components for the validation workflowmodal/– Modal dialogs for batch operations and validationsservices/– Business logic, API integration, and orchestration
/src/hooks – Custom React Hooks
Reusable React hooks encapsulating complex logic for use across multiple components:
useTrackedImageLoad.js– Hook for tracking and managing image loading states with callbacks
/src/models – Type Definitions and Models
Placeholder directory reserved for future TypeScript type definitions, PropTypes, and domain model classes (currently empty).
/src/pages – Route-Level Page Components
Top-level page components representing primary application routes and views. Each page typically orchestrates feature components and manages data loading for that route:
AR3dViewer.js– Augmented reality viewer pageAdmin.js– Administrator control panel and system managementAnalytics.js– Analytics dashboard and reportingFrameValidation.js– Frame validation workflow entry pointHome.js– Landing and home pageLogin.js– Authentication and user loginARSCatalog.js– Main catalogue browsing interfaceMyCatalogues.js– User catalogue management pageOrderPage.js– Order management and checkout interfaceProfile.js– User profile and account settingsDataConsumption.js– Data usage analytics pageCatalogueDetail.js– Individual catalogue detail and editingGateways.js– Payment and gateway integration interface
/src/redux – Global State Management
Redux store configuration, state slices, and selectors for centralised application state:
store.js– Redux store configuration and middleware setuprootReducer.js– Combined root reducer aggregating all slicesactionType.js– Redux action type constantsselectors.js– Memoised state selectors for efficient component subscriptionsslices/– Redux Toolkit slices for modular state management
State Domains:
authentication/– User login, session, and auth token statebrand/– Brand information and brand-specific configurationsbrandViewer/– Brand viewer state and preferencescatalog/– Product catalogue and listing stateproduct/– Product details and related metadatacart/– Shopping cart and order line itemsprofile/– User profile and account informationnotifications/– Application notifications and alertsanalytics/– Analytics data and dashboard statefilter/– Search filters and sorting preferencescustomizer/– Customiser settings and user selectionsCatalogues/– User-owned catalogues collectionMainBrands/– Main brand registry and metadataProfiles/– User profiles collectionlicenses/– Licensing and subscription state
/src/route – Routing and Route Guards
Navigation configuration and route protection components:
ProtectedRoute.js– Route guard component enforcing authentication before access
/src/services – API and Data Access Layer
Centralised data-access and external service integration layer, keeping API calls and external operations separate from UI components:
api/– REST API client and endpoint definitionsfirebase/– Firebase Realtime Database operations and Cloud Functions integrationcache/– Client-side caching strategies and cache managementdata/– Data fetching, transformation, and pagination utilitieshooks/– Custom hooks for service integration and data fetchingutils/– Service-related utility functionscatalogueService.js– Catalogue CRUD operations and managementemailService.js– Email sending and notification dispatchprofile.js– User profile API operationshome.js– Home page data and content servicesedit3dViewer.js– 3D model editing and manipulation servicesOnBordingUtils.js– User onboarding flow and first-time setup utilities
/src/styles – CSS Modules and Style Sheets
Organised CSS and styling modules, typically paired with corresponding component directories:
ARShades3dViewerCustom/– 3D viewer and AR preview stylesDashboard/– Dashboard layout and component stylingFrameValidation/– Frame validation interface and workflow stylesHome/– Home page and landing page stylingModelViewer/– WebGL model viewer stylingARShadesDemo/– Demo component and showcase stylingARShades3dsTemplate/– Template and template preview styling
/src/theme – Design Tokens and Theme Configuration
Centralised theme configuration enabling consistent UI/UX and easy theme switching:
theme.js– Primary theme definitions including colours, typography, spacing, and component variantsbrandColors.js– Brand-specific colour palettes and brand identity constantsThemeContext.js– React Context API for theme state managementThemeToggle.js– Theme switching component and provider
/src/utils – Utility Functions
General-purpose utility functions and helpers used across the application:
catalogEvents.js– Catalogue event tracking, analytics, and event handlersnotifications.js– Notification formatting, queuing, and display utilitiesnumberFormatting.js– Number, currency, and numeric value formatting utilitiessecureStorage.js– Secure local storage operations with encryption support
/src – Root Level Files
App.js– Application root component managing routing and providersApp.css– Global application stylesindex.js– React application entry point and ReactDOM renderingindex.css– Global CSS reset and base stylingchartSetup.js– Chart.js configuration and theme setupfonts.css– Font face declarations and font loadinglogo.svg– Application logo assetsetupTests.js– Jest and testing library configurationreportWebVitals.js– Web performance metrics reportingApp.test.js– Root component tests
/public – Static Files
Publicly accessible static files served directly by the web server without processing:
index.html– Main HTML entry point and SPA shellmanifest.json– Progressive Web App manifest for PWA capabilitiesrobots.txt– SEO robots configuration and crawling rulesfonts/– Publicly accessible font files
/build – Production Build Artefacts
Compiled, production-ready application bundle generated by the React build pipeline. Automatically recreated during deployment and not committed to version control.
index.html– Minified HTML with bundled scriptsstatic/css/– Minified CSS bundlesstatic/js/– Minified JavaScript bundlesstatic/media/– Processed media assetsasset-manifest.json– Asset to file mapping for caching strategies
/backups – Version Backups
Date-stamped and version-numbered snapshots for quick rollback and production archaeology:
- Date-stamped folders (e.g.,
01. 01-09-2025/) – Chronological backup snapshots - Version-numbered folders (e.g.,
2.5.0/,2.5.1/) – Tagged release versions Prod/– Current production build snapshot for immediate reference
/docs – Project Documentation
Docusaurus-based documentation site explaining product workflows, architecture decisions, operational playbooks, and troubleshooting guides.
Architecture Principles
Feature-Based Organisation – Components and logic are grouped by feature or domain rather than by file type, enabling independent feature development, testing, and scaling.
Service Layer Abstraction – All external API calls, Firebase operations, and third-party integrations are centralised in the /services directory, maintaining clear separation between data access and presentation logic.
Centralised State Management – Redux store is organised into logical slices, each managing a specific domain (authentication, products, cart, notifications, etc.) with corresponding selectors for efficient component subscriptions.
Reusable Hooks – Custom React hooks encapsulate complex logic and state management, promoting code reuse and reducing component complexity.
Theme Separation – Theming logic and design tokens are isolated in the /theme directory, enabling consistent styling and effortless brand customisation across the entire application.
Utility Consolidation – Helper functions are grouped logically by concern, promoting code reuse, maintainability, and a single source of truth for cross-cutting logic.
Modular 3D Integration – 3D viewing, AR capabilities, and model manipulation are encapsulated in dedicated components and services, keeping complex WebGL logic separate from business logic.
Development Workflow
Adding Routes – Create a new page component in /src/pages, then import and register in the application router within App.js.
Creating Feature Components – Organise related components in a feature folder under /src/components, including subcomponents, styles, and component-specific hooks.
Integrating External APIs – Implement API calls in /src/services/api/ or /src/services/firebase/, then export service functions for use in components or Redux slices.
Extending State Management – Create new Redux slices in /src/redux/slices/, add corresponding selectors in /src/redux/selectors/, then integrate into rootReducer.js.
Adding Static Assets – Place imported assets in /src/assets/ and publicly served assets (favicons, manifests) in /public/.
Styling Approaches – Use themed CSS modules in /src/styles/, import global styles in components, or apply theme tokens from /src/theme/ for consistent branding.
This structure supports scalability, maintainability, and clear separation of concerns throughout the ARShades Studio application.