Skip to main content
Long Tran
💬
0 discussions

Admin site

I. Functionality

  1. Add Product Descriptions: Administrators can easily add and update product information.
  2. Generate QR Codes: Upload an Excel file to generate QR codes for product tracking.
  3. Manage Registration Fields: Customize the fields required for warranty registration.
  4. Manage User Roles: Assign roles and permissions to users for system access.

II. Roles

  1. Admin: Full access to all features and functionalities.
  2. QRCode: Access to QR code generation and management.
  3. Add Model: Permission to add new product models.
  4. Edit Model: Permission to edit existing product models.
  5. Manage: Permission to manage user.

III. Packages

1. Dependencies

Package NameDescriptionLinkVersion
@mdxeditor/editorMDX editor for React@mdxeditor/editor^3.0.1
@thumbtack/thumbprint-reactThumbtack's React components@thumbtack/thumbprint-react^14.18.0
@thumbtack/thumbprint-scssThumbtack's SCSS components@thumbtack/thumbprint-scss^4.0.3
addA function that adds two numbersadd^2.0.6
axiosPromise based HTTP client for the browser and node.jsaxios^1.6.5
jsqrA pure JavaScript QR code decoding libraryjsqr^1.4.0
reactA JavaScript library for building user interfacesreact^18.2.0
react-beautiful-dndBeautiful and accessible drag and drop for lists with Reactreact-beautiful-dnd^13.1.1
react-domServes as the entry point to the DOM and server renderers for Reactreact-dom^18.2.0
react-hook-formPerformant, flexible, and extensible forms with easy-to-use validationreact-hook-form^7.51.3
react-iconsSVG React icons of popular icon packs using ES6 importsreact-icons^5.0.0
react-playerA React component for playing a variety of URLs, including YouTubereact-player^2.14.1
react-router-domDOM bindings for React Routerreact-router-dom^6.21.1
react-toastifyReact notification libraryreact-toastify^10.0.4
usehooks-tsReact hook libraryusehooks-ts^2.10.0
yarnA package manager that doubles down as project manageryarn^1.22.21

2. Dev Dependencies

Package NameDescriptionLinkVersion
@types/reactTypeScript definitions for React@types/react^18.2.43
@types/react-beautiful-dndTypeScript definitions for react-beautiful-dnd@types/react-beautiful-dnd^13.1.8
@types/react-domTypeScript definitions for React-DOM@types/react-dom^18.2.17
@vitejs/plugin-reactOfficial Vite plugin to handle React files@vitejs/plugin-react^4.2.1
autoprefixerPostCSS plugin to parse CSS and add vendor prefixesautoprefixer^10.4.16
eslintAn extensible linter for identifying and reporting on patterns in JavaScripteslint^8.55.0
eslint-plugin-reactReact specific linting rules for ESLinteslint-plugin-react^7.33.2
eslint-plugin-react-hooksESLint rules for React Hookseslint-plugin-react-hooks^4.6.0
eslint-plugin-react-refreshESLint plugin for React Refresheslint-plugin-react-refresh^0.4.5
postcssA tool for transforming CSS with JavaScript pluginspostcss^8.4.33
sassCSS pre-processor with syntax advancementssass^1.70.0
tailwindcssA utility-first CSS framework for rapid UI developmenttailwindcss^3.4.1
viteNext generation frontend toolingvite^5.0.8

IV. Environment Variables

Variable NameDescriptionDefault Value
VITE_SERVER_URLAPI URL for the client sitehttp://localhost:3000
VITE_ASSET_URLURL for static assetshttp://localhost:3999/assets

V. Source Tree

.
├── index.html - Main HTML file for the application.
├── package.json - File defining the project's dependencies, scripts, and metadata.
├── package-lock.json - Auto-generated file that locks the dependencies to specific versions.
├── postcss.config.js - PostCSS configuration file.
├── public - Directory containing static assets.
│ ├── logo-icon.png
│ └── vite.svg
├── README.md - Project documentation.
├── src - Source code directory.
│ ├── App.jsx
│ ├── assets - Directory containing images and other static assets.
│ │ ├── brother_logo_blue.png
│ │ ├── brother_logo.png
│ │ ├── notfound.png
│ │ └── react.svg
│ ├── components - Directory containing React components.
│ │ ├── common - Directory containing common components.
│ │ │ ├── ChangePasswordModal.jsx
│ │ │ ├── ConfirmationModel.jsx
│ │ │ ├── ConfirmModal.jsx
│ │ │ ├── Logo.jsx
│ │ │ ├── Modal.jsx
│ │ │ ├── RedStar.jsx
│ │ │ └── Select.jsx
│ │ ├── Layouts - Directory containing layout components.
│ │ │ ├── Header.jsx
│ │ │ └── index.jsx
│ │ ├── Navigator - Directory containing navigation components.
│ │ │ ├── index.jsx
│ │ │ ├── Logo.jsx
│ │ │ └── Tab.jsx
│ │ └── screens - Directory containing screen components.
│ │ ├── Authorized - Directory containing authorized components.
│ │ │ ├── Products - Directory containing product components.
│ │ │ │ ├── Edit - Directory containing edit components.
│ │ │ │ │ └── index.jsx
│ │ │ │ ├── index.jsx
│ │ │ │ └── Table - Directory containing table components.
│ │ │ │ ├── Body.jsx
│ │ │ │ ├── Expand - Directory containing expand components.
│ │ │ │ │ ├── index.jsx
│ │ │ │ │ ├── LongVideo.jsx
│ │ │ │ │ └── Playlist.jsx
│ │ │ │ ├── Header.jsx
│ │ │ │ ├── index.jsx
│ │ │ │ └── Row.jsx
│ │ │ ├── QR - Directory containing QR components.
│ │ │ │ ├── index.jsx
│ │ │ │ └── Table - Directory containing table components.
│ │ │ │ ├── Body.jsx
│ │ │ │ ├── Expand - Directory containing expand components.
│ │ │ │ │ └── index.jsx
│ │ │ │ ├── Header.jsx
│ │ │ │ ├── index.jsx
│ │ │ │ └── Row.jsx
│ │ │ ├── Settings - Directory containing settings components.
│ │ │ │ ├── Admin - Directory containing admin components.
│ │ │ │ │ └── index.jsx
│ │ │ │ ├── index.jsx
│ │ │ │ └── User - Directory containing user components.
│ │ │ │ ├── ActivationFields - Directory containing activation field components.
│ │ │ │ │ ├── Conditional.jsx
│ │ │ │ │ ├── index.jsx
│ │ │ │ │ └── Table - Directory containing table components.
│ │ │ │ │ └── index.jsx
│ │ │ │ ├── Config - Directory containing config components.
│ │ │ │ │ ├── AccountConfiguration - Directory containing account configuration components.
│ │ │ │ │ │ ├── Account - Directory containing account components.
│ │ │ │ │ │ │ ├── AuthType.jsx
│ │ │ │ │ │ │ └── index.jsx
│ │ │ │ │ │ └── index.jsx
│ │ │ │ │ ├── index.jsx
│ │ │ │ │ └── OnClientRegistrationFailed
│ │ │ │ │ └── index.jsx
│ │ │ │ ├── index.jsx
│ │ │ │ ├── PrintSample - Directory containing print sample components.
│ │ │ │ │ ├── index.jsx
│ │ │ │ │ └── ModalAddPosition.jsx
│ │ │ │ ├── Tabs - Directory containing tab components.
│ │ │ │ │ └── index.jsx
│ │ │ │ ├── Template - Directory containing template components.
│ │ │ │ │ ├── EditTemplate.jsx
│ │ │ │ │ └── index.jsx
│ │ │ │ └── Users - Directory containing user components.
│ │ │ │ ├── AccountList.jsx
│ │ │ │ ├── AddAccount.jsx
│ │ │ │ └── index.jsx
│ │ │ └── Videos - Directory containing video components.
│ │ │ ├── Addvideo - Directory containing add video components.
│ │ │ │ ├── AddVideoContext.jsx
│ │ │ │ ├── Header.jsx
│ │ │ │ ├── index.jsx
│ │ │ │ ├── LongVideo - Directory containing long video components.
│ │ │ │ │ ├── Add.jsx
│ │ │ │ │ ├── Control
│ │ │ │ │ │ ├── AddImage.jsx
│ │ │ │ │ │ └── index.jsx
│ │ │ │ │ ├── index.jsx
│ │ │ │ │ └── Video - Directory containing video components.
│ │ │ │ │ ├── Control.jsx
│ │ │ │ │ └── index.jsx
│ │ │ │ ├── Playlist - Directory containing playlist components.
│ │ │ │ │ ├── Add.jsx
│ │ │ │ │ ├── index.jsx
│ │ │ │ │ └── ListVideo.jsx
│ │ │ │ ├── reducer.js
│ │ │ │ └── useAddVideoContext.js
│ │ │ └── index.jsx
│ │ └── Unauthorized - Directory containing unauthorized components.
│ │ └── Login.jsx
│ ├── configs - Directory containing configuration files.
│ │ └── index.js
│ ├── context - Directory containing React context providers.
│ │ ├── AppContext.js
│ │ ├── AppProvider.jsx
│ │ └── reducer.js
│ ├── hooks - Directory containing custom hooks.
│ │ ├── useClickOutside.js
│ │ └── useDebounce.js
│ ├── index.css
│ ├── main.jsx - Entry point for the application.
│ └── utils - Directory containing utility functions.
│ ├── axiosClient.js
│ ├── compressObject.js
│ ├── getCompanyInfo.js
│ ├── getRouteCouldView.js
│ └── index.js
├── tailwind.config.js - Tailwind CSS configuration file.
├── vite.config.js - Vite configuration file.
└── yarn.lock - Auto-generated file that locks the dependencies to specific versions.

VI. Data Flow Diagram

alt text