How denispham1107/quanlycuahang works
Quản lý cửa hàng is a static, shared-data store-management web app with Firebase-backed accounts and a PWA shell. Users sign in, select a store, and manage cashbook income/expenses, purchasing, inventory, sales, and related histories and reports; admins also manage employee accounts and permissions. The browser app is concentrated in app.js, while functions/index.js provides employee operations and AI-backed reporting/action endpoints. The README documents the wider business capabilities; sampled excerpts do not expose all UI-to-data wiring, so uncertain links are omitted.
Main entry points: app.js Management web app · index.js AI reports and queries · firestore.rules Firestore access rules · service-worker.js Offline app shell
Components 19
Store operations
- Management web app
app.js - Income and expenses
app.js - Store overview
app.js - Activity history
app.js
Inventory and sales
- Purchasing
app.js - Inventory
app.js - Sales and bills
app.js - Customer records
app.js
Access management
- Authentication and profiles
app.js - Employee management
app.js - Employee functions
functions/index.js
AI assistance
- AI reports and queries
functions/index.js - AI action confirmation
functions/index.js
Firebase and PWA
- Firestore
- Firebase Authentication
- Firestore access rules
firestore.rules - Offline app shell
service-worker.js - OpenAI service
Other components
- Store staff
Connections 23
- Store staff → Management web app: uses
- Management web app → Authentication and profiles: signs in
- Management web app → Income and expenses: manages
- Management web app → Store overview: views
- Management web app → Activity history: reviews
- Management web app → Purchasing: manages
- Management web app → Inventory: manages
- Management web app → Sales and bills: creates and reviews
- Management web app → Customer records: maintains
- Management web app → Employee management: administers
- Authentication and profiles → Firebase Authentication: authenticates
- Authentication and profiles → Firestore: reads profile
- Management web app → Firestore: loads and saves state
- Firestore access rules → Firestore: governs access
- Employee management → Employee functions: calls
- Management web app → Employee functions: requests employee state
- Employee functions → Firestore: reads and mutates
- Management web app → AI reports and queries: sends AI queries
- Management web app → AI action confirmation: confirms AI actions
- AI reports and queries → Firestore: reads shared state
- AI reports and queries → OpenAI service: requests AI
- AI action confirmation → OpenAI service: uses AI service
- Management web app → Offline app shell: registers