How nguyen1976/trello-web works
Main Components
a. User Interface (UI) Layer:
• Pages: Located in the src/pages directory. This includes subdirectories for Auth, Boards, and Users, with dedicated files for individual board views (e.g., src/pages/Boards/_id.jsx) and user profiles.
• Components: UI components spread out in src/components (AppBar, ModeToggle, etc.) that construct the overall look and feel.
b. State Management and Context:
• Redux: See src/redux – activeBoardSlice and store.js indicate usage of Redux for global application state management.
• React Context: The ModeContext defined in src/context for theme or mode-related toggling.
c. API and Data Handling:
• APIs: The src/apis directory contains modules for API calls and mock data which suggest a separation between backend-like logic (even if just simulated) and UI components.
d. Utilities and Custom Libraries:
• Helpers: The src/utils folder includes helper functions like formatters, constants, and sorts.
• Custom Libraries: For example, the file in src/customLibraries/DndKitSensors.js indicates integration of drag-and-drop functionality.
e. Configuration and Bootstrapping:
• Entry Point: src/main.jsx and index.html form the starting point of the application.
• Build and Tool Configuration: Files like vite.config.js, jsconfig.json, and ESLint configuration (eslint.config.js).
• UI Frontend (split further into Pages and Reusable Components).
• State Management (Redux Store and Context Provider).
• API/Data Layer (APIs folder with endpoints/mocked data).
• Utility Modules (custom libraries and utilities).
• From Pages to Redux and/or Context for state updates.
• From UI components to the APIs layer, reflecting data fetches and updates.
• From APIs to the Redux store if simulated fetching and updating occur.
• Cross-component interactions, such as the AppBar sending navigation events or ModeToggle dispatching theme changes.
Architectural & Design Principles
• Clearly delineate the separation of concerns. For this project, the UI presentation layer is kept separate from the state management (Redux and Context) as well as from the business logic (API calls and custom interactions).
• Modularity: Each component or page is in its own directory, making them independent and reusable.
• Usage of modern React design patterns including component composition and hooks provided by Redux and Context APIs.