How nkasg/okemzhub-technext360 works
Okemzhub Inventory & Business Management is a FastAPI-backed platform for two retail businesses that share stock while keeping separate financial records. The principal workflow is staff/admin authentication, then managing products and stock, handling inventory requests, recording sales or expenses, and reviewing business activity; a served JavaScript frontend provides the user interface. The graph preserves the documented domain capabilities, with ORM models and request schemas shown as internal layers. Router-to-model links follow the source index; frontend/API wiring beyond the README’s static-serving statement is not established by the excerpts.
Main entry points: main.py App entry · dependencies.py Access dependencies · auth.py Authentication · stock_batches.py Stock batches
Components 29
Application runtime
- App entry
app/main.py - Database sessions
app/database.py - Runtime settings
app/core/config.py
Identity and access
- Password and JWT
app/core/security.py - Authentication
app/routers/auth.py - Access dependencies
app/dependencies.py - User accounts
app/routers/users.py - User records
app/models/user.py - Login auditing
app/routers/login_logs.py - Login log records
app/models/login_log.py - User schemas
app/schemas/user.py
Shared inventory
- Product catalog
app/routers/products.py - Product records
app/models/product.py - Inventory items
app/routers/inventory.py - Inventory records
app/models/inventory.py - Stock batches
app/routers/stock_batches.py - Stock batch records
app/models/stock_batch.py - Inventory requests
app/routers/inventory_requests.py - Request records
app/models/inventory_request.py - Inventory schemas
app/schemas/inventory.py - Product schemas
app/schemas/product.py
Business operations
- Sales tracking
app/routers/sales.py - Sale records
app/models/sale.py - Expense management
app/routers/expenses.py - Expense records
app/models/expense.py - Business identities
app/models/business.py
Web client
- API client
frontend/static/js/api.js - Single-page frontend
frontend/static/js/app.js
Other components
- Staff or admin
Connections 46
- Staff or admin → Single-page frontend: uses
README.md - Single-page frontend → API client: uses
- App entry → Database sessions: initializes
app/main.py - App entry → Authentication: registers
app/main.py - App entry → User accounts: registers
app/main.py - App entry → Product catalog: registers
app/main.py - App entry → Inventory items: registers
app/main.py - App entry → Inventory requests: registers
app/main.py - App entry → Stock batches: registers
app/main.py - App entry → Sales tracking: registers
app/main.py - App entry → Expense management: registers
app/main.py - App entry → Login auditing: registers
app/main.py - App entry → Single-page frontend: serves
README.md - Database sessions → Runtime settings: reads settings
app/database.py - Authentication → Password and JWT: verifies and signs
app/routers/auth.py - Authentication → Access dependencies: gets database
app/routers/auth.py - Authentication → User records: looks up
app/routers/auth.py - Authentication → Login log records: records attempts
app/routers/auth.py - Access dependencies → Password and JWT: decodes token
app/dependencies.py - Access dependencies → User records: loads user
app/dependencies.py - User accounts → Access dependencies: requires access
app/routers/users.py - User accounts → User records: manages
app/routers/users.py - User accounts → User schemas: validates
app/routers/users.py - Login auditing → Access dependencies: requires access
app/routers/login_logs.py - Login auditing → Login log records: queries
app/routers/login_logs.py - Product catalog → Access dependencies: requires access
app/routers/products.py - Product catalog → Product records: manages
app/routers/products.py - Product catalog → Product schemas: validates
app/routers/products.py - Inventory items → Access dependencies: requires access
app/routers/inventory.py - Inventory items → Inventory records: manages
app/routers/inventory.py - Inventory items → Inventory schemas: validates
app/routers/inventory.py - Stock batches → Access dependencies: requires access
app/routers/stock_batches.py - Stock batches → Stock batch records: manages
app/routers/stock_batches.py - Stock batches → Inventory records: updates
app/routers/stock_batches.py - Stock batches → Inventory schemas: validates
app/routers/stock_batches.py - Inventory requests → Access dependencies: requires access
app/routers/inventory_requests.py - Inventory requests → Request records: manages
app/routers/inventory_requests.py - Inventory requests → Inventory records: updates
app/routers/inventory_requests.py - Sales tracking → Access dependencies: requires access
app/routers/sales.py - Sales tracking → Sale records: records
app/routers/sales.py - Sales tracking → Inventory records: updates
app/routers/sales.py - Expense management → Access dependencies: requires access
app/routers/expenses.py - Expense management → Expense records: manages
app/routers/expenses.py - Sale records → Business identities: scopes business
app/models/sale.py - Expense records → Business identities: scopes business
app/models/expense.py - User records → Business identities: belongs to
app/models/user.py