A simple Point of Sale (POS) application built with Flutter with clean architecture design. The application is designed to be used both online and offline. The application's local data (sqflite) will be automatically synchronized with the cloud data (firestore) when the application detects an internet connection.
This application uses an offline-first approach, where data will be stored in the local database first and then in the cloud database if there is an internet connection. If there is no internet connection, all actions performed by the user (create, update, delete) will be recorded as 'QueuedActions' in local database and will be executed automatically when the internet connection available.
- Product Management: Add, update, and delete products.
- Sales Tracking: Record and manage sales transactions.
- User Authentication: Secure login and user management.
- Responsive UI: Used Material UI 3, support dark & light mode, and user-friendly error handler UI.
- Customizeable Theme: Customizeable & adaptive theme colors, text-style, etc.
-
Clone the repository:
git clone https://github.com/elrizwiraswara/flutter_pos.git cd flutter_pos
-
Install dependencies:
flutter pub get
-
Set up Firebase:
- Create a new project on Firebase.
- Follow the instructions to add Firebase to your Flutter app here.
- Enable google authentication provider
- Update cloud firestore rules to allow read write operation
service cloud.firestore { match /databases/{database}/documents { match /{document=**} { allow read, write: if request.auth != null; } } }
- Add cloud firestore indexes to enable query
- Update firebase storage rules to allow read write operation
service firebase.storage { match /b/{bucket}/o { match /{allPaths=**} { allow read, write: if request.auth != null; } } }
-
Run the application:
flutter run
Contributions are welcome! Please open an issue or submit a pull request for any bugs, feature requests, or improvements.
This project is licensed under the MIT License - see the LICENSE file for details.