How angelicaorgel9-source/frontend-salestracking works
MJ Prints Sales Tracking is a multi-portal sales and print-order application: customers browse products and submit orders, while employees and administrators handle order operations; the portals also expose customer, payroll, inventory, analytics, and account features. The React frontend routes portal screens and uses a shared API client to reach a Django REST backend. The README documents MongoDB-backed address and notification features and SMS-dependent verification. Some admin and employee screens use demo data; backend endpoint wiring and several screens were not sampled, so those relationships are shown only where documented or evidenced.
Main entry points: api.js API client · accounts/views.py Account endpoints · App.jsx Portal routing · orders/views.py Order endpoints
Components 25
Portal frontend
- Portal routing
src/App.jsx - Product browsing
src/pages/customer/ProductsServices.jsx - Order entry
src/components/customer/modals/NewOrderModal.jsx - Customer profile
src/context/CustomerProfileContext.jsx - Employee orders
src/pages/employee/Orders.jsx - Admin orders
src/pages/admin/Orders.jsx - Admin payroll
src/pages/admin/Payroll.jsx - Employee payroll
src/pages/employee/Payroll.jsx - API client
src/utils/api.js
Order and catalog
- Order endpoints
backend/orders/views.py - Order models
backend/orders/models.py - Order serializers
backend/orders/serializers.py - Product endpoints
backend/products/views.py - Product models
backend/products/models.py
Accounts and branches
- Account endpoints
backend/accounts/views.py - Account models
backend/accounts/models.py - Account permissions
backend/accounts/permissions.py - Account serializers
backend/accounts/serializers.py - Branch endpoints
backend/branches/views.py
Business operations
- Payroll endpoints
backend/payroll/views.py - MongoDB features
backend/config/mongodb.py - SMS verification
backend/accounts/sms.py
Other components
- Customer
- Employee
- Administrator
Connections 26
- Customer → Portal routing: opens portal
src/App.jsx - Employee → Portal routing: opens portal
src/App.jsx - Administrator → Portal routing: opens portal
src/App.jsx - Portal routing → Product browsing: routes to
src/App.jsx - Portal routing → Employee orders: routes to
src/App.jsx - Portal routing → Admin orders: routes to
src/App.jsx - Product browsing → Order entry: opens order
src/pages/customer/ProductsServices.jsx - Product browsing → API client: creates order
src/pages/customer/ProductsServices.jsx - Customer profile → API client: loads profile
src/context/CustomerProfileContext.jsx - Employee orders → API client: submits orders
src/pages/employee/Orders.jsx - Admin orders → API client: loads records
src/pages/admin/Orders.jsx - API client → Order endpoints: HTTP requests
README.md - API client → Account endpoints: HTTP requests
README.md - API client → Product endpoints: HTTP requests
README.md - API client → Payroll endpoints: HTTP requests
README.md - Order endpoints → Order models: uses models
backend/orders/views.py - Order endpoints → Order serializers: uses serializers
backend/orders/views.py - Order models → Product models: references products
backend/orders/models.py - Account endpoints → Account models: uses models
backend/accounts/views.py - Account endpoints → Account permissions: checks permissions
backend/accounts/views.py - Account endpoints → Account serializers: uses serializers
backend/accounts/views.py - Order endpoints → Account models: uses account data
backend/orders/views.py - Order endpoints → MongoDB features: uses MongoDB
backend/orders/views.py - Account endpoints → MongoDB features: uses MongoDB
backend/accounts/views.py - Account endpoints → SMS verification: sends verification
backend/accounts/views.py - Payroll endpoints → Employee payroll: serves employee view
README.md