How ebrahimhossaincse/store-management-system-mock-server works
Main Components
a) Frontend Layer:
• HTML pages as client-side components:
• home.html (Dashboard)
• product.html (Product Management)
• category.html (Category Management)
• customers.html (Customer Management)
• orders.html (Order Management)
b) Backend Layer:
• Mock Server (index.js)
• Data Storage (db.json)
Architecture Style
a) Top Level (Client Tier):
• Individual HTML pages as components within this container
b) Middle Level (Server Tier):
• RESTful endpoints that handle different operations
c) Bottom Level (Data Tier):
• Db.json as the data storage layer
• Connection between the mock server and the data storage
Component Relationships
• HTTP requests from HTML pages to the mock server
• Data flow between the mock server and db.json
┌─────────────────────────────────────────┐
• Frontend Layer │
• ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐│
• Home │ │Prod.│ │Cat. │ │Cust.│ │Order││
• ┘ └─────┘ └─────┘ └─────┘ └─────┘│
• ┘
• ↕ HTTP/REST
┌─────────────────────────────────────────┐
• Mock Server (index.js) │
• ┘
• ↕ File I/O
┌─────────────────────────────────────────┐
• Data Storage (db.json) │
• ┘
Additional Elements
• Component types
Technical Details
• HTTP methods (GET, POST, PUT, DELETE)
• Data format (JSON)
• Key endpoints for each module
• Static asset handling (images folder)
Notes
• A title: "Store Management System Architecture"
• A version number
• A brief description of the mock server's role
• Technical constraints or limitations
Remember to:
• Use consistent styling throughout
• Related components together
• Clear boundaries between different layers
• Major interaction paths
• Document any assumptions made