GitConnect - A Github application built in flutter
Tags: flutter, github, opensource, flutterapp
Published: 2020-10-20 11:10:19

### Introduction
Hey folks, For the past few months I have been working on an opensource flutter project.GitConnect is a github mobile app created in Flutter. The first version of the app is released on play store. As of now, the functionality of the app is quite simple. You can browse your recent activities, repositories, read their ‘readme’ files, view pull requests, issues, forks, stargazers, and commits.

The notifications and search features are also integrated, making it easier to browse the repositories and/or developers. GitConnect also has a dark theme. You can turn it on manually in the settings. By default, the application’s theme is a dark theme. 


### Functionalities
Below is a list of functionalities included in-app.
* Login with Github account
* See your public, private, and forked Repos
* See repo stargazers and fork Repos
* Activities
* Notifications
* Repositories
* Add to favorite
* Gists
* Commits
* Following/Followers
* View Gists and their files
* View users profile, contribution graph, activities, repositories, pull request, and issues
* Markdown and code highlighting support
* Search Users, Repos, Issues, Pull Requests, and Code
* Dual theme (Dark/Light)

### App Architecture
Application uses [BloC](https://bloclibrary.dev/#/architecture) architecture to manage app states. In order to implement BloC I use [flutter_bloc] (https://pub.dev/packages/flutter_bloc) package created by [Felix Angelov](https://twitter.com/felangelov). Using the bloc library allows us to separate our application into three layers:

* Presentation
* Business Logic
* Data
  - Repository
  - Data Provider



![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/0h5zrnnti1y0dmwea44e.png)

Here’s the overview of our project structure: In the lib folder, I have created the following folders:

* The UI folder has all the code for the app ui. It has 3 subfolders.
 - page : This folder has app screens.
 - theme: This folder has app-text styles,color codes, and themes.
 - widget: This folder consists global generic widget used in app.

* The resources folder contains 5 subfolders
 - Gatway: The gatway folder contains classes to make external calls, like calls to get user profiles, repositories list etc. These classes don’t care about the UI or how the UI wants to display the data. They can throw an exception when something goes wrong.
 - Service: This folder contains classes that are used to taken care of session management and local database.
 - Repository: This folder contains various repositories classes to pass data from API gateway to blocs and vice versa.
- GraphqlApi: This folder contains Github graphql queries.

* The Helper folder contains classes that convert the raw data from Services to the form that is useful in our app.

- Exceptions: This class gracefully handles exceptions that can occur in API call and convert them to messages which will be helpful to pass to blocs and display the message on screen if necessary.

* The model folder contains model classes.
* The bloc folder contains multiple blocs that hold almost the business logic of app to connect the UI and application logic.

### Package used
* [intl](https://pub.dev/packages/intl)
* [dio](https://pub.dev/packages/dio)
* [share](https://pub.dev/packages/share)
* [get_it](https://pub.dev/packages/get_it)
* [sqflite](https://pub.dev/packages/flutter_svg)
* [graphql](https://pub.dev/packages/graphql)
* [equatable](https://pub.dev/packages/equatable)
* [flutter_svg](https://pub.dev/packages/flutter_svg)
* [path_provider](https://pub.dev/packages/path_provider)
* [flutter_bloc](https://pub.dev/packages/flutter_bloc)
* [url_launcher](https://pub.dev/packages/url_launcher)
* [google_fonts](https://pub.dev/packages/google_fonts)
* [build_context](https://pub.dev/packages/build_context)
* [webview_flutter](https://pub.dev/packages/webview_flutter)
* [shared_preferences](https://pub.dev/packages/shared_preferences)
* [cached_network_image](https://pub.dev/packages/cached_network_image)

### App Preview
{% youtube 28Dcqr89N1g %}

### Links
App link:- [Play Store](https://play.google.com/store/apps/details?id=com.thealphamerc.flutter_github_connect)

Project source code link :- [Github](https://github.com/TheAlphamerc/flutter-GitConnect)

If you found a bug or want to suggest a feature report it here:- [Issues](https://github.com/TheAlphamerc/flutter-GitConnect/issues)


## Contributing

If you wish to contribute a change to any of the existing features or add new in this repo,
please review our [contribution guide](https://github.com/TheAlphamerc/flutter-GitConnect/blob/master/CONTRIBUTING.md),
and send a [pull request](https://github.com/TheAlphamerc/flutter-GitConnect/pulls). I welcome and encourage all pull requests. It usually will take me within 24-48 hours to respond to any issue or request.

## Project Created & Maintained By

[Sonu Sharma](https://github.com/TheAlphamerc) ([Twitter](https://www.twitter.com/TheAlphamerc)) ([Youtube](https://www.youtube.com/user/sonusharma045sonu/)) ([Insta](https://www.instagram.com/_sonu_sharma__))

I would love to hear from you. Please share your valuable feedback in the comments.
If you like the project do show love by giving star the repo.