A complete local inventory management system with barcode scanning, desktop server, and mobile app.
- Barcode Scanning: Scan products to add them to inventory
- Product Management: Add products with images, MRP, and quantities
- Stock Tracking: Track product in/out with recipient details
- Desktop Dashboard: Real-time web interface to view all data
- Local Network: Works on your local WiFi network
- No Internet Required: Everything runs locally
- Python 3.7+ installed on your desktop
- Flutter SDK installed on your development machine
- Android Studio or VS Code for mobile development
- Both devices (desktop and mobile) on the same WiFi network
-
Navigate to the server folder:
cd server -
Install Python dependencies:
pip install -r requirements.txt
Or on Windows, run:
setup.bat
-
Find your computer's IP address:
- Windows: Open Command Prompt and type
ipconfig - Mac/Linux: Open Terminal and type
ifconfig - Look for "IPv4 Address" (usually starts with 192.168.x.x)
- Windows: Open Command Prompt and type
-
Start the server:
python app.py
Or on Windows:
start_server.bat
-
Test the server:
- Open your browser and go to
http://localhost:8080 - You should see the inventory dashboard
- Open your browser and go to
-
Update the server IP address:
- Open
lib/controllers/inventoryController.dart - Change line 7:
final String _baseUrl = "http://YOUR_IP_ADDRESS:8080"; - Replace
YOUR_IP_ADDRESSwith your computer's IP address
- Open
-
Install Flutter dependencies:
flutter pub get
-
Run the mobile app:
flutter run
- Open the mobile app and go to "Barcode Scanner"
- Scan a barcode of a product
- If the product is not found, tap "Add Product"
- Fill in the details:
- Product Name (required)
- MRP (optional)
- Initial Quantity
- Take a photo (optional)
- Tap "Save Product"
- Scan a barcode of an existing product
- Choose operation:
- Product IN: Add stock to inventory
- Product OUT: Remove stock from inventory
- Fill recipient details (for Product OUT):
- Recipient Name
- Phone Number
- Take photo
- Notes
- Confirm the transaction
- Open your browser and go to
http://YOUR_IP_ADDRESS:8080 - View real-time data:
- Total Products
- Total Quantity
- Total Transactions
- Low Stock Items
- Browse Products and Transactions tabs
- Auto-refresh every 30 seconds
If your computer's IP address changes:
-
Update the mobile app:
- Edit
lib/controllers/inventoryController.dart - Change the
_baseUrlto your new IP
- Edit
-
Restart the server and mobile app
- Database: All data is stored in
server/inventory.db - Images: Product images are saved in
server/uploads/ - API Endpoints: See
server/app.pyfor all available APIs
- Check if Python is installed:
python --version - Install dependencies:
pip install -r requirements.txt - Check if port 8080 is available
- Ensure both devices are on the same WiFi
- Check the IP address in
inventoryController.dart - Verify the server is running:
http://localhost:8080
- Check camera permissions in Android settings
- Ensure the barcode is clear and well-lit
- Try different barcode formats
The server provides these REST APIs:
GET /api/products- Get all productsGET /api/products/{barcode}- Get product by barcodePOST /api/products- Add new productGET /api/transactions- Get all transactionsPOST /api/transactions- Add new transaction
- This system runs on your local network only
- No data is sent to external servers
- All data is stored locally on your computer
- Use only on trusted networks
- User authentication
- Multiple warehouses
- Export/import data
- Barcode generation
- Advanced reporting
- Email notifications
If you encounter any issues:
- Check the console output for error messages
- Verify network connectivity
- Restart both server and mobile app
- Check the troubleshooting section above
Happy Inventory Management! 📦✨