A comprehensive full-stack inventory management system designed for multi-office companies to track computers, peripherals, printer items, and manage restock requests efficiently.
- Real-time inventory overview across all offices
- Interactive dashboard with metrics and recent activity
- Comprehensive reporting with multiple report types:
- Inventory Summary Reports
- Restock Request Analytics
- Activity Logs and Audit Trails
- Office-to-Office Comparisons
- Computers: Track make, model, serial numbers, and status across offices
- Peripherals: Manage mice, keyboards, monitors, and other accessories
- Printer Items: Track printer cartridges, paper, and supplies
- Serial Number Tracking: Individual serial number management for assets
- Priority-based requests: Low, Normal, High, Urgent
- Status tracking: Pending β Approved β Ordered β Received
- Multi-category support: Computers, Peripherals, Printer Items
- Make/Model integration: Link requests to existing inventory structure
- Office-based filtering: Office 1, Office 2, Office 3
- Centralized management with office-specific views
- Cross-office comparisons and analytics
- Dark/Light theme toggle
- Real-time validation and error handling
- Modular component architecture for maintainability
- React 18 with TypeScript for type safety
- Tailwind CSS v4 for modern styling
- React Router for navigation
- Vite for fast development and building
- Lucide React for consistent iconography
- Node.js with Express.js framework
- SQLite database with audit logging
- Joi for comprehensive data validation
- Rate limiting and security middleware
- CORS and Helmet for security
- Node.js β₯ 18.0.0
- npm β₯ 8.0.0
# Clone and setup everything
npm run setup# Start both frontend and backend servers
npm run devThe application will be available at:
- Frontend: http://localhost:5173
- Backend API: http://localhost:3001
cd sd-backend
npm install
npm run dev # Runs on http://localhost:3001cd sd-frontend
npm install
npm run dev # Runs on http://localhost:5173sd-inventory/
βββ sd-frontend/ # React TypeScript frontend
β βββ src/
β β βββ components/ # Reusable UI components
β β β βββ admin/ # Admin management components
β β β βββ common/ # Shared components
β β β βββ computers/# Computer management
β β β βββ peripherals/# Peripheral management
β β β βββ printer-items/# Printer item management
β β β βββ restock-requests/# Request management
β β βββ contexts/ # React contexts (Theme, Office)
β β βββ hooks/ # Custom React hooks
β β βββ pages/ # Page components
β β βββ services/ # API services
β β βββ types/ # TypeScript definitions
βββ sd-backend/ # Node.js Express backend
β βββ database/ # SQLite database and schema
β βββ models/ # Data models and business logic
β βββ routes/ # API route handlers
β βββ middleware/ # Custom middleware
β βββ validators/ # Input validation schemas
βββ package.json # Root package with scripts
GET /api/computers- List computers (with office filtering)GET /api/computers/:id- Get specific computerPOST /api/computers- Create new computerPUT /api/computers/:id- Update computerDELETE /api/computers/:id- Delete computer
GET /api/peripherals- List peripheralsPOST /api/peripherals- Create peripheralPUT /api/peripherals/:id- Update peripheralDELETE /api/peripherals/:id- Delete peripheral
GET /api/printer-items- List printer itemsPOST /api/printer-items- Create printer itemPUT /api/printer-items/:id- Update printer itemDELETE /api/printer-items/:id- Delete printer item
GET /api/restock-requests- List requests (with filtering)POST /api/restock-requests- Create new requestPUT /api/restock-requests/:id- Update request statusDELETE /api/restock-requests/:id- Delete request
GET /api/reports/inventory-summary- Inventory overviewGET /api/reports/restock-requests- Restock analyticsGET /api/reports/activity- System activity logsGET /api/reports/office-comparison- Cross-office comparison
GET /api/makes- Manufacturer managementPOST /api/makes- Create manufacturerGET /api/models- Model managementPOST /api/models- Create model
{
id: string;
make: string;
model: string;
quantity: number;
office: 'Office 1' | 'Office 2' | 'Office 3';
status: 'active' | 'inactive' | 'maintenance' | 'retired';
serial_numbers: SerialNumber[];
created_at: string;
updated_at: string;
}{
id: string;
item_name: string;
make?: string;
model?: string;
quantity: number;
office: Office;
status: ItemStatus;
serial_numbers: SerialNumber[];
}{
id: string;
item_category: 'computers' | 'peripherals' | 'printer_items';
item_description: string;
quantity_requested: number;
office: Office;
priority: 'low' | 'normal' | 'high' | 'urgent';
status: 'pending' | 'approved' | 'ordered' | 'received' | 'cancelled';
requested_by?: string;
notes?: string;
}- Input validation with Joi schemas
- Rate limiting to prevent API abuse
- CORS configuration for secure cross-origin requests
- Helmet for security headers
- SQL injection protection through parameterized queries
npm run dev- Start both frontend and backendnpm run build- Build for productionnpm run setup- Complete project setupnpm run clean- Clean all dependencies and database
npm run dev- Development servernpm run build- Production buildnpm run lint- Code lintingnpm run type-check- TypeScript checking
npm run dev- Development with auto-restartnpm run start- Production servernpm run test- Run testsnpm run lint- Code linting
This project follows modular architecture principles:
- Frontend: Modular React components, no hardcoded styles
- Backend: Modular routes and middleware
- Database: SQLite with proper indexing and relationships
Built for efficient multi-office inventory management
Simple, robust, and scalable
Simple, robust, and scalable