Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ikramhasan/absence-manager


https://github.com/ikramhasan/absence-manager

Last synced: about 8 hours ago
JSON representation

Awesome Lists containing this project

README

        

# ๐Ÿš€ Flutter test driven development example

The purpose of this technical project is to showcase my test driven development capabilities

Project by [Ikramul Hasan](https://github.com/ikramhasan)

## How to run the project ๐Ÿš€

The easiest way to test the project is by navigating to the deployed site.

### [LIVE DEMO: https://ikramhasan.github.io/absence-manager](https://ikramhasan.github.io/absence-manager)

To run it manually in you local machine, follow the steps below:

Manual build process

1. Clone the repository

```bash
git clone https://github.com/ikramhasan/absence-manager.git
```

2. Navigate to the project directory

```bash
cd absence-manager
```

3. Install the dependencies

```bash
flutter pub get
```

4. Run the project

```bash
flutter run
```

## Product Requirements ๐Ÿ“

- [x] I want to see a list of absences including the names of the employees.
- [x] I want to see the first 10 absences, with the ability to paginate.
- [x] I want to see a total number of absences.
- [x] For each absence I want to see:
- [x] Member name
- [x] Type of absence
- [x] Period
- [x] Member note (when available)
- [x] Status (can be 'Requested', 'Confirmed' or 'Rejected')
- [x] Admitter note (when available)
- [x] I want to filter absences by type.
- [x] I want to filter absences by date.
- [x] I want to see a loading state until the list is available.
- [x] I want to see an error state if the list is unavailable.
- [x] I want to see an empty state if there are no results.
- [x] I can generate an iCal file and import it into outlook.
- [x] Dark Mode, and Light Mode support
- [x] Mobile and desktop responsive design
- [x] Settings page
- [x] Localization support (English and German)
- [x] Haptic feedback

## Technical Stuff ๐Ÿ’ป

### Code Coverage โœ…

Almost all the lines of this project has been tested with unit and widget tests. The project has 98% test coverage. Here's the test coverage report:

Verify

You can verify the test coverage by

1. Using the [lcov.info](coverage/lcov.info) file generated by flutter, or

2. By running the following command:

```bash
flutter test --coverage
```

and navigating to the generated `/coverage` directory.

### Pagination ๐Ÿ“„

There are two types of pagination implemented in the project:

1. **Infinite Scroll Pagination**: The absence list is paginated with infinite scroll. When the user reaches the end of the list, the next page is loaded automatically. This pagination will show up in mobile devices.

2. **Manual Pagination**: The user can manually change the page number from the settings page. This pagination will show up in desktop devices.

### Linting ๐Ÿงน

The codebase goes through a very strict linting process. You can find all the custom linting rules in the [analysis_options.yaml](analysis_options.yaml) file.

### Documentation ๐Ÿ“š

All the public functions, classes, variables, and enums are documented with Dartdoc.

### CI/CD ๐Ÿ”

The project is set up with Github Actions for CI/CD. The workflow is defined in the [.github/workflows/gh-pages.yaml](.github/workflows/gh-pages.yaml) file.

## Tech Stack ๐Ÿ› 

- Framework: [Flutter](https://flutter.dev/)
- State Management: [Flutter Bloc](https://bloclibrary.dev/)
- Persistance: [Hive](https://pub.dev/packages/hive)