A modern inventory management dashboard built with React, TypeScript, Vite, and Tailwind CSS.
This project focuses on a maintainable, component-driven architecture with reusable UI patterns, centralized styles, and isolated business logic through custom hooks.
- Componentized React architecture with short, focused components.
- Reusable modal system and shared button/form style tokens.
- Inventory table with:
- Full-text search across product, category, brand, model, details, and inventory fields.
- Column sorting (A-Z / Z-A) for product, category, brand, model, and stock.
- Single-row accordion behavior (only one expanded row at a time).
- Pagination with 10 items per page.
- Add Product modal with dynamic key/value detail rows.
- Right fixed stats sidebar with:
- Stock issues card and configurable alert threshold.
- Restock modal with low-stock table.
- Recent changes (latest 3) and full changes modal.
- Trending/overview cards.
- Shared mock data source used consistently across table, sidebar, and modals.
- React 19
- TypeScript
- Vite 8
- Tailwind CSS 4
- ESLint 10
src/
components/
AddProductModal/
InventoryDashboard/
InventoryHeader/
InventoryTable/
components/
SideNavBar/
StatsSidebar/
components/
TopNavBar/
common/
Modal/
buttons/
forms/
data/
mockInventory.ts
hooks/
useInventoryTable.ts
App.tsx
main.tsx
index.css
InventoryDashboardcomposes the page layout and coordinates primary UI areas.InventoryTableis presentation-focused and delegates stateful table behavior touseInventoryTable.StatsSidebarcomposes cards + modal flows using smaller specialized components.
components/common/Modalprovides a shared modal shell.components/common/buttons/styles.tscentralizes button style variants.components/common/forms/styles.tscentralizes form field and label styles.
- Mock domain data lives in
data/mockInventory.ts. - Table, sidebar summaries, and modal tables consume the same source to avoid data drift.
- Node.js 20+ (recommended)
- npm 10+ (recommended)
npm installnpm run devOpen the local URL shown in your terminal (typically http://localhost:5173).
npm run dev: Start Vite development server with HMR.npm run build: Type-check and create production build.npm run lint: Run ESLint on the codebase.npm run preview: Preview the production build locally.
To validate the project before shipping:
npm run lint && npm run buildInventory items are structured around:
- Basic fields:
id,name,brand,model,description. - Category relation:
category_id+ denormalizedcategoryobject. - Flexible metadata:
details[]as key/value pairs. - Multi-location stock:
inventories[]withlocation,quantity, andmin_quantity.
This model supports realistic inventory scenarios and powers both table and sidebar insights.
- Utility-first styling with Tailwind CSS.
- Shared style constants for repeated UI elements (buttons/forms).
- Tokens and global styles live in
src/index.css.
- Replace mock data with real API integration.
- Add create/update/delete persistence flows.
- Add automated tests (unit and integration).
- Add accessibility audits and keyboard-navigation enhancements.
- Add role-based actions and authentication.
No license has been defined yet for this repository.
