How sabarees3578/inventory works
Purpose and Entry Points
This is an Expo/React Native inventory application focused on stock records, project-based inventory work, imports, barcode display, and item verification. The JavaScript bootstrap is index.js, which loads the root application component in App.js. Expo application metadata and build configuration live in app.json and eas.json.
Application Shell and Navigation
App.js establishes the top-level runtime composition, while src/navigation/AppNavigator.js defines the screen-level control flow. Navigation separates major workflows: authentication, inventory/database browsing, imports, projects, and verification. Shared visual primitives—including the application header and status presentation—are in src/components/AppHeader.js and src/components/StatusBadge.js.
Authentication and Session Boundary
Authentication begins at src/screens/auth/LoginScreen.js. Firebase configuration in src/firebase/config.js is the likely remote identity and database integration boundary; environment values are expected via .env.example. Authenticated navigation should gate access to the inventory and project workflows rather than embedding access logic in individual screens.
Inventory Data Domain
The central inventory browsing/detail flow is represented by src/screens/database/InventoryScreen.js, src/screens/database/StockListScreen.js, and src/screens/database/ItemDetailScreen.js. Firestore collection naming/contracts are centralized in src/firebase/collections.js, creating a boundary between UI screens and remote data layout. Item identification is surfaced through src/components/BarcodeDisplay.js.
Project Workflow
Projects provide a higher-level container for inventory operations. src/screens/projects/ProjectListScreen.js lists accessible projects, src/screens/projects/CreateProjectScreen.js creates them, and src/screens/projects/ProjectDashboardScreen.js acts as the project-specific operational hub. This flow likely scopes subsequent stock, import, and verification activity to a selected project.
Import, Verification, and Output Pipelines
External stock ingestion has separate spreadsheet sources: src/screens/import/ExcelImportScreen.js uses src/utils/excelParser.js, while src/screens/import/GoogleSheetImportScreen.js handles Google Sheets input. Verification supports barcode scanning through src/screens/verification/ScanVerifyScreen.js and manual fallback through src/screens/verification/ManualVerifyScreen.js. Processed inventory can be exported through src/utils/excelExporter.js and src/utils/pdfExporter.js.
Offline Persistence and Infrastructure
Firebase is the principal backend integration, configured under src/firebase/. Local/offline state is handled by src/storage/localStore.js and src/utils/offlineCache.js, forming a client persistence boundary that can support cached reads or deferred synchronization. Shared design tokens in src/constants/theme.js keep UI styling consistent across the native screens.
Main entry points: AppNavigator.js Screen navigation · ProjectDashboardScreen.js Project dashboard · InventoryScreen.js Inventory browser · ProjectListScreen.js Project management
Components 21
App Runtime
- JavaScript bootstrap
index.js - Application shell
App.js - Screen navigation · Gates and routes major application workflows.
src/navigation/AppNavigator.js
Data & Session
- Login
src/screens/auth/LoginScreen.js - Firebase integration · Identity and Firestore integration boundary.
src/firebase/config.js - Firestore contracts
src/firebase/collections.js
Inventory Workflows
- Project management · Lists and creates accessible inventory projects.
src/screens/projects/ProjectListScreen.js - Create project
src/screens/projects/CreateProjectScreen.js - Project dashboard · Scopes operational inventory activity to a selected project.
src/screens/projects/ProjectDashboardScreen.js - Inventory browser
src/screens/database/InventoryScreen.js - Stock list
src/screens/database/StockListScreen.js - Item detail
src/screens/database/ItemDetailScreen.js - Barcode display
src/components/BarcodeDisplay.js - Excel import
src/screens/import/ExcelImportScreen.js - Spreadsheet parser
src/utils/excelParser.js - Google Sheets import
src/screens/import/GoogleSheetImportScreen.js - Barcode verification
src/screens/verification/ScanVerifyScreen.js - Manual verification
src/screens/verification/ManualVerifyScreen.js
Offline & Output
- Offline persistence · Supports cached reads or deferred synchronization.
src/storage/localStore.js - Offline cache logic
src/utils/offlineCache.js - Inventory exports · Generates spreadsheet and PDF output.
src/utils/excelExporter.js
Connections 23
- JavaScript bootstrap → Application shell: loads
- Application shell → Screen navigation: hosts
- Screen navigation → Login: unauthenticated route
- Login → Firebase integration: signs in through
- Screen navigation → Project management: project workflow
- Screen navigation → Inventory browser: inventory workflow
- Screen navigation → Excel import: import workflow
- Screen navigation → Barcode verification: verification workflow
- Project management → Create project: creates
- Project management → Project dashboard: selects
- Project dashboard → Inventory browser: scopes operations
- Inventory browser → Stock list: browses stock
- Stock list → Item detail: opens item
- Item detail → Barcode display: displays identifier
- Excel import → Spreadsheet parser: parses
- Project dashboard → Google Sheets import: imports stock
- Project dashboard → Barcode verification: verifies stock
- Barcode verification → Manual verification: manual fallback
- Inventory browser → Firestore contracts: uses contracts
- Firestore contracts → Firebase integration: maps to
- Firebase integration → Offline cache logic: syncs with
- Offline cache logic → Offline persistence: persists
- Project dashboard → Inventory exports: exports processed inventory