A modern, real-time stock management application built for pipeline-selling companies. This MVP provides comprehensive inventory tracking, transaction history, and user authentication.
- Real-time Inventory Management - Track pipeline stock with live updates
- User Authentication - Secure login with email/password and Google OAuth
- Stock CRUD Operations - Add, edit, delete, and update stock quantities
- Transaction History - Complete audit trail of all stock movements
- Low Stock Alerts - Automatic notifications for items with โค5 units
- Search & Filter - Find items quickly by type, material, or dimensions
- Real-time Updates - Live synchronization across all devices
- Responsive Design - Works seamlessly on desktop and mobile
- Modern UI - Clean, intuitive interface built with TailwindCSS
- Cloud Database - Firebase Firestore for reliable data storage
- Secure Authentication - Firebase Auth with role-based access
- Frontend: React 18, React Router v6
- Styling: TailwindCSS
- Backend: Firebase (Firestore, Authentication)
- Icons: Lucide React
- Deployment: Ready for Vercel/Firebase Hosting
-
Clone the repository
git clone <repository-url> cd stock-management-mvp
-
Install dependencies
npm install
-
Set up Firebase
- Create a new Firebase project at Firebase Console
- Enable Authentication (Email/Password and Google providers)
- Create a Firestore database
- Get your Firebase config and update
src/firebase.js
-
Configure Firebase
// src/firebase.js const firebaseConfig = { apiKey: "your-api-key", authDomain: "your-project.firebaseapp.com", projectId: "your-project-id", storageBucket: "your-project.appspot.com", messagingSenderId: "your-sender-id", appId: "your-app-id" };
-
Start the development server
npm start
{
"id": "auto-generated",
"type": "PVC",
"length": "6m",
"diameter": "100mm",
"material": "PVC",
"quantity": 50,
"lastUpdated": "timestamp",
"createdBy": "userId"
}
{
"id": "auto-generated",
"pipelineId": "reference-to-pipeline",
"pipelineType": "PVC 6mร100mm",
"type": "incoming|outgoing",
"quantity": 10,
"date": "timestamp",
"handledBy": "userId"
}
- Overview statistics (total items, quantity, low stock alerts)
- Recent transaction history
- Quick action buttons
- Complete stock listing with search and filters
- Add new pipeline items
- Edit existing items
- Quick quantity updates
- Delete items with confirmation
- Complete audit trail of all stock movements
- Filter by transaction type and date
- Summary statistics (incoming, outgoing, net change)
- Email/password registration and login
- Google OAuth integration
- Protected routes for authenticated users
Create a .env
file in the root directory:
REACT_APP_FIREBASE_API_KEY=your-api-key
REACT_APP_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
REACT_APP_FIREBASE_PROJECT_ID=your-project-id
REACT_APP_FIREBASE_STORAGE_BUCKET=your-project.appspot.com
REACT_APP_FIREBASE_MESSAGING_SENDER_ID=your-sender-id
REACT_APP_FIREBASE_APP_ID=your-app-id
// Firestore Rules
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /pipelines/{document} {
allow read, write: if request.auth != null;
}
match /transactions/{document} {
allow read, write: if request.auth != null;
}
}
}
- Install Vercel CLI:
npm i -g vercel
- Deploy:
vercel
- Install Firebase CLI:
npm install -g firebase-tools
- Login:
firebase login
- Initialize:
firebase init hosting
- Build:
npm run build
- Deploy:
firebase deploy
- Invoice Scanning - Auto-populate stock details from invoice images
- Natural Language Search - "Show me all steel pipelines under 50mm"
- Predictive Analytics - Restocking recommendations based on usage patterns
- Smart Alerts - Intelligent low-stock predictions
- Barcode/QR Code Scanning - Quick item identification
- Export/Import - CSV/Excel data import/export
- Advanced Reporting - Custom date ranges, analytics dashboards
- Multi-location Support - Warehouse management
- Supplier Management - Track suppliers and reorder points
- Fork the repository
- Create a feature branch:
git checkout -b feature-name
- Commit changes:
git commit -am 'Add feature'
- Push to branch:
git push origin feature-name
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue in the repository
- Contact the development team
- Check the Firebase documentation for backend issues
Built with โค๏ธ for pipeline companies