How quanghiep03198/fe-wms works
Main Components
• Public / Landing pages (in the “public” folder)
• Auth module (found under “src/app/(auth)”) for login, authorization, and department APIs.
• Features modules (located in “src/app/(features)”) which include multiple layouts (e.g., dashboard, finished production in/outbound, reports, warehouse, etc.) and their corresponding sub-components.
• Shared UI elements and reusable components (in “src/components/shared” and “src/components/ui”) such as banners, navigation elements, error boundaries, loaders, etc.
• Service Layer: Illustrate the service modules (from “src/services”) that manage API calls for authentication, orders, inventory, report generation, RFID, and warehouse procedures. This layer is the communication bridge between the UI and the backend.
• State Management: Show the “src/stores” directory, which contains state management (like auth.store) that holds application state data.
• Providers & Configurations: Include application-wide providers (in “src/providers”) such as the router, theme, and query-client providers. Also, note that global configurations (from “src/configs”) and internationalization settings (from “src/i18n”) support the entire application.
• Infrastructure & Deployment: Even though this project is mainly a front-end application, include a node for deployment/infrastructure (files in the “infrastructure” folder and configurations like “ecosystem.config.cjs”). These show how the app is hosted and managed.
Relationships and Interactions
• Global configurations (app.config, axios.config, navigation.config) support the behavior of both services and the UI layer.
• The internationalization modules (i18n) feed language and localization data to UI components, with a connection to providers for global access.
Architectural Patterns and Design Principles
• Modularity: The project is built in a highly modular way by splitting the system into “auth”, “features”, and “public” sections, along with a clear separation between UI components, state (stores), and API services.
• Component Driven: The extensive use of sub-folders under “src/app” (with many layout-specific directories) shows a component-driven approach.
• Clean Separation of Concerns: There is a clear separation between presentation (UI components and storybook for documentation), business logic (services and state management), and configuration/infrastructure.
• Provider Pattern: Use of context providers and hooks ensures that dependencies like theming, routing, and API querying are decoupled and accessible across the application.
Technologies and Frameworks
• React with TypeScript – central to the UI.
• Tailwind CSS & PostCSS for styling (see tailwind.config.js, postcss.config.js).
• Storybook for UI component documentation (in “.storybook”).
• API handling via Axios or similar (indicated by axios.config.ts).
• State management likely using React hooks (see “src/stores” and custom hooks in “src/common/hooks”).