# Merchant Operator App Documentation ## Project Overview Merchant Operator App is a browser-only React SPA for local businesses to manage their merchant records on a decentralized commerce network. It uses a peer-to-peer architecture with local-first data storage and synchronization through FogBox nodes. ## Agent Guidelines - **Architecture**: Use Flux-style with Effector for state management - **File Structure**: Follow domain-driven organization (model.ts, view-model.ts, ui/) - **TypeScript**: Use strict mode with proper typing - **Components**: Keep UI components pure and presentational - **State Management**: Use Effector events, stores, and effects - **API Models**: Use the generated DTOs from the API client - **Naming**: Use $ prefix for stores, Fx suffix for effects - **Exports**: Use named exports only, avoid default exports ## Architecture & Project Structure - [Architecture](./architecture.md) - Overview of our Flux-style architecture with Effector - [Flux vs. MVVM](./flux-vs-mvvm.md) - Comparison between Flux and MVVM architectures - [Project Structure](./project-structure.md) - Detailed explanation of our project structure - [Effector Guide](./effector-guide.md) - Comprehensive guide on how to use Effector - [TypeScript Conventions](./typescript-conventions.md) - TypeScript conventions for the project ## Deployment & Development - [Deployment Guide](./deployment.md) - Instructions for deploying the application with path-agnostic configuration - [Local Development Guide](./local-development.md) - Instructions for running the application locally with different base paths - [Client-Side Environment Variables](./client-env-vars.md) - Documentation for client-side environment variables ## Components & Utilities - [Utility Functions](./utils.md) - Documentation for utility functions used in the application - [NEW Components](./new-components.md) - Guide for using and adding components from the NEW directory ## Path-Agnostic SPA Deployment The application is configured for path-agnostic deployment, allowing it to be served from any base path without requiring a rebuild. This is particularly useful for: - Deploying to different environments (development, staging, production) - Serving the application from a subdirectory - Using the same build with different routing configurations See the [Deployment Guide](./deployment.md) for detailed instructions on how to configure and deploy the application.