đī¸ Asset Valuer Pro Repository Structure
â ī¸ Important Note:
This documentation describes the source code repository structure, but the actual source code is maintained in a separate repository and is not included in this documentation repository.
đī¸ Overviewâ
The Asset Valuer Pro (AVP) application codebase consists of two primary components:
- Web Application (.NET Core and React) - Located in
assetvaluerpro-avp/ - iOS Capture Application - Located in
assetvaluerpro-ioscapture/
This document outlines the high-level structure of these components.
đī¸ Web Application Structureâ
The web application follows a standard .NET solution architecture with several projects and a React frontend.
đī¸ Solution Structureâ
The main .NET solution file (AVP.sln) contains the following projects:
- API - Web API project for the backend services
- Application - Core application logic and business rules
- AVP.BackgroundTasks - Background processing services
- AVP.Test - Unit and integration tests
đī¸ Backend Architectureâ
The backend follows a clean architecture pattern with:
- Controllers (
API/Controllers/) - API endpoints that handle HTTP requests - Services - Business logic implementation
- Models - Data entities representing business objects
- Application - Application layer with commands and queries (CQRS pattern)
The main backend components include:
đ§ API Controllersâ
The API controllers handle incoming HTTP requests and are organized by domain entity:
AssetController.cs- Asset management endpointsAssetClassController.cs- Asset classification endpointsAssetHierarchyController.cs- Hierarchy managementComponentController.cs- Component managementJobController.cs- Valuation job managementValuationProfileController.cs- Valuation profile configuration- And many more specialized controllers
đ§Ž Application Logicâ
The application logic is organized using a Command Query Responsibility Segregation (CQRS) pattern:
- Commands - Operations that change state
- Queries - Operations that return data
- EventHandlers - Handle domain events
Each domain area (Assets, Jobs, Valuation, etc.) has its own set of commands and queries.
đ Frontend Structureâ
The frontend is a React application located in API/Web/ with:
- Components (
Web/src/components/) - Reusable UI components - Pages (
Web/src/pages/) - Page-level components - Models (
Web/src/models/) - TypeScript interfaces for data models - Contexts (
Web/src/contexts/) - React context providers - Hooks (
Web/src/hooks/) - Custom React hooks
Key frontend features:
- Built with React and TypeScript
- Uses Tailwind CSS for styling
- Implements a context-based state management
- Organizes components by feature/domain
đą iOS Capture Applicationâ
The iOS capture application is built with React Native (Expo) and consists of:
- App.tsx - Main application entry point
- src/ - Source code directory
- components/ - UI components
- screens/ - Screen components
- services/ - API and device services
- utils/ - Utility functions
đ Data Flowâ
The system follows this general data flow:
- Mobile app captures asset data and images
- Data is synchronized with the backend API
- Web application processes and displays the data
- Valuation calculations are performed in the backend
- Reports are generated based on the processed data
đ§ Key Filesâ
Backendâ
assetvaluerpro-avp/API/Startup.cs- API configurationassetvaluerpro-avp/API/Program.cs- Application entry pointassetvaluerpro-avp/API/Controllers/- API controllers
Frontendâ
assetvaluerpro-avp/API/Web/src/App.tsx- Main React componentassetvaluerpro-avp/API/Web/src/index.tsx- Frontend entry point
iOS Appâ
assetvaluerpro-ioscapture/App.tsx- Main app componentassetvaluerpro-ioscapture/app.config.ts- App configuration
đī¸ Dependency Structureâ
The application's dependencies flow in this order:
- API controllers depend on Application services
- Application services depend on Domain models
- Frontend components depend on API services through contexts and hooks
- iOS app depends on API services through service wrappers
đĄ Implementation Notesâ
- âšī¸ The backend uses a modern .NET Core architecture with dependency injection
- âšī¸ The frontend follows React best practices with functional components and hooks
- ⥠The codebase separates concerns between API, application logic, and domain models
- đ Communication between backend and frontend is via RESTful APIs