Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

🛒 Flutter POS (Point of Sale)

A robust, production-oriented Point of Sale application showcasing modern Flutter development practices. Built with Clean Architecture, BLoC state management, and a Domain-Driven Design approach.

Flutter Version Dart Version Architecture State Management License PRs Welcome

A perfect reference project for building scalable, offline-first Flutter applications.


📸 Previews

Note: Replace these placeholder links with actual screenshots of your application!

POS Dashboard     Cart View     Admin Panel

✨ Features

  • Offline-First Data: Uses drift (SQLite) for local persistence of products and sales.
  • Reactive State: Seamless UI updates driven by flutter_bloc.
  • Domain-Driven Business Logic: Highly decoupled architecture making business rules easy to test and maintain.
  • Cart Management: Dynamic shopping cart with standard 10% tax total calculations.
  • Admin Console: Easily add, edit, or delete products and review sales transaction history.
  • Secure Storage: Implementation of flutter_secure_storage and cryptography for secure data handling.
  • Receipt Generation (WIP): Setup included for PDF creation and printing using the pdf and printing packages.
  • Responsive Design: Two-panel layout supporting various screen sizes.

🏗️ Architecture

This project strictly adheres to Clean Architecture principles, dividing the system into three main layers to ensure separation of concerns, scalability, and testability:

1. Presentation Layer

  • State Management: Handled by flutter_bloc (e.g., CartBloc, ProductCatalogBloc).
  • UI Views: Built with Material 3. Examples include POSView and AdminHomeView.

2. Domain Layer

The core of the application containing business logic, entirely independent of other layers.

  • Entities: Product, CartEntity, TransactionRecord.
  • Use Cases: CalculateTotal, SaveTransaction.
  • Contracts (Repositories): ProductRepository, SalesRepository.

3. Data Layer

Handles data retrieval and persistence, implementing the domain repository contracts.

  • Data Sources: ProductLocalDataSource (Drift), MockProductRemoteDataSource.
  • Models: ProductModel.

Dependency Injection

All services, blocs, and repositories are managed and injected using get_it.


🛠️ Tech Stack


🚀 Getting Started

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/flutter_pos.git
    cd flutter_pos
  2. Install dependencies:

    flutter pub get
  3. Run the app:

    flutter run

🧑‍💻 Development Commands

Keep the code clean and well-tested using the following commands:

  • Analyze code (Linting):

    flutter analyze
  • Run unit tests:

    flutter test

🗺️ Roadmap & Next Steps

We are constantly working to improve this POS system. Here is what's on the horizon:

  • Testing: Add comprehensive unit tests for domain use cases, repository logic, and CartBloc transitions.
  • Checkout Validation: Implement stronger validation rules during the checkout flow.
  • Receipt Generation: Finalize and polish PDF receipt generation and printing functionality.
  • Persistent Cart: Introduce local storage caching to restore the cart state on app restart.
  • Reporting: Advanced sales charts and reporting in the Admin dashboard.

Development progress, next features, and bug backlogs are tracked in PROJECT_TRACKER.md.


🤝 Contributing

Contributions, issues, and feature requests are welcome! This is an open-source project and I would love to see how the community can help improve it.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details. (Note: Please ensure a LICENSE file is added to the repository).

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages