2.4 KiB
2.4 KiB
App Documentation
Project Overview
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 - Overview of our Flux-style architecture with Effector
- Flux vs. MVVM - Comparison between Flux and MVVM architectures
- Project Structure - Detailed explanation of our project structure
- Effector Guide - Comprehensive guide on how to use Effector
- TypeScript Conventions - TypeScript conventions for the project
Deployment & Development
- Deployment Guide - Instructions for deploying the application with path-agnostic configuration
- Local Development Guide - Instructions for running the application locally with different base paths
- Client-Side Environment Variables - Documentation for client-side environment variables
Components & Utilities
- Utility Functions - Documentation for utility functions used in the application
- NEW Components - 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 for detailed instructions on how to configure and deploy the application.