Chuyển tới nội dung chính

Cấu trúc thư mục

Monorepo root

vppos-admin/
├── apps/ # Tất cả Micro-Frontend applications
│ ├── container/ # Host app (port 8080)
│ ├── auth/ # Xác thực (port 8082)
│ ├── dashboard/ # Tổng quan (port 8081)
│ ├── inventory/ # Hàng hóa (port 8084)
│ ├── ... # Và 9 modules khác
│ └── docs/ # Tài liệu (Docusaurus)
├── core/ # Shared package (@vppos/core)
├── infra/ # Infrastructure (K8s, Nginx)
├── scripts/ # Build & deploy scripts
├── turbo.json # Turborepo config
├── pnpm-workspace.yaml # Workspace config
└── .gitlab-ci.yml # CI/CD pipeline
thông tin

Danh sách đầy đủ 13 modules cùng port → xem Tổng quan hệ thống

Cấu trúc mỗi module MFE

Tất cả modules trong apps/ tuân theo cấu trúc chuẩn:

apps/<module-name>/
├── README.md # Tài liệu module (auto sync → Docusaurus)
└── src/
├── pages/ # Trang chính (mỗi feature 1 folder)
│ └── <feature>/
│ ├── index.tsx # Page component
│ └── components/ # Sub-components riêng cho page
├── services/ # RTK Query endpoints (*.service.ts)
├── types/ # Domain API types (*.type.ts)
├── schema/ # Zod schemas (*.schema.ts)
├── config/ # baseApi, httpClient, axiosBaseQuery
├── store/ # Redux store (configureStore)
├── routes/ # Route definitions
├── hooks/ # App-specific hooks
├── constants/ # App-specific constants
├── components/ # App-specific shared components
├── utils/ # App-specific utils
├── App.tsx # Provider + Toast + Routes
├── RemoteApp.tsx # MFE entry (tokenSync + url sync)
└── bootstrap.tsx # React root mount

Core package

core/
├── .storybook/ # Storybook config
└── src/
├── ui/react/ # Shared UI components (~40 components)
├── hooks/ # Shared hooks
├── utils/ # Shared utilities
├── types/ # Shared TypeScript types
├── constants/ # Shared constants
├── config/ # Shared config
├── http/ # HTTP client setup
├── styles/ # Theme CSS (Tailwind v4)
├── stories/ # Storybook stories
└── assets/ # Shared assets