Code Monkey home page Code Monkey logo

simontaskmanager's Introduction

SimonTaskManager

A clean architecture Flutter application built using Bloc, Dio, and shared_preferences.

Overview

This project was initially an assessment, but I enjoyed it so much that I learned a lot in the process. If I had more time, I would have worked more on the UI design.

Architecture

This project is built using Clean Architecture together with Test Driven Development (TDD). I chose this architecture because it makes code easier to write, maintain, and scale. Below is a detailed explanation of the components and flow of the architecture:

Key Features

  • Clean Architecture: The app is structured following Clean Architecture principles.
  • Test Driven Development (TDD): Tests are written before the concrete implementations of classes, ensuring a high level of code reliability.
  • Dependency Inversion: The project follows dependency inversion principles, making the codebase flexible and easier to manage.
  • Dependency Injection: The project uses dependency injection to manage dependencies efficiently.

App Features

  • Login: Users can log in.
  • Logout: Users can log out.
  • Add new todo: Users can add a new todo.
  • Edit an existing todo: Users can edit an existing todo.
  • Delete an existing todo: Users can delete an existing todo with a swipe-to-delete gesture.
  • Pagination: Supports endless pagination.
  • Offline Cache: Supports offline caching.

Tools and Libraries

  • Bloc: For state management.
  • Dio: For handling HTTP requests.
  • shared_preferences: For local storage solutions.
  • Mockito: For creating mock versions of classes during testing.
  • get_it: For dependency injection.

Project Structure

The project is divided into several features, with each feature containing the following directories:

  • Data: Contains data sources, models, and repositories.
  • Domain: Contains entities, repositories, and use cases.
  • Presentation: Contains UI components like screens, widgets, and Bloc implementations.

Data Flow

  • Upwards Flow: Data flows upwards towards the UI.
  • Downwards Flow: Events flow downwards from the UI to the data layer.

Diagram

Below is a visual representation of the architecture (image credits: Reso Coder).

Clean Architecture Diagram

Testing

  • Mockito: Used for creating mock versions of classes.
  • Test Driven Development (TDD): Tests are written before the implementation of classes, following the TDD approach.

Snapshots

Below are snapshots of the application features.

App Screenshots

Screenshot Description
Add Feature Screenshot of the Add feature
Delete Feature Screenshot of the Delete feature
Edit Feature Screenshot of the Edit feature
Home Page Screenshot of the Home page
Login Page Screenshot of the Login page
Login Error Page Screenshot of the Login Error page

Conclusion

This project demonstrates the use of Clean Architecture in Flutter applications, ensuring a scalable, maintainable, and testable codebase.

Setup Instructions

To run this project, clone the repo, run flutter pub get, then run flutter run.

To log in, you can use the following credentials:

{
    "username": "emilys",
    "password": "emilyspass",
}

simontaskmanager's People

Contributors

tulesimon avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.