Skip to content

An application demonstrating the use of Flutter for cross-platform application development

License

Notifications You must be signed in to change notification settings

capcodigital/learner-hub

Repository files navigation

Contributors Forks Stargazers Issues MIT License


Logo

Learner Hub

An application built in Flutter that showcases certifications and todo functionality.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgements

About The Project

Flutter Demo

  • This application was initially developed by using data from the Cloud Certifications pages of Confluence that could be retrieved using FastAPI via the Confluence API. This data was then displayed in a Flutter UI.

  • The application now uses firebase functions to fetch data from firestore database.

  • The application now has expanded with more features being integrated such as Authentication, profile, Todo

signup

Logo

Built With

Designs

HomeScreen

For details related to the user flow and usage, please visit the confluence page for this project.

Architecture

  • We pass data through cloud functions which is a serverless framework provided by Google Firebase. High level overview of the architecture can be seen below. For details about this please visit the confluence page for this project.

Architecture

  • For the frontend flutter application we use, we use layered architecture to follow Bob-Martin's clean Architecture where we use repository pattern for data layer and use Bloc pattern in presentation layer.More info

Architecture

## Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

  • Flutter
  • Firebase CLI

Flutter Installation

In order to run the application locally, you must have the Flutter SDK installed. Follow the steps within the Flutter Documentation to install the Flutter SDK on your local machine.

Firebase CLI Installation

In order to acess Firebase CLI, you must install it locally. Follow this steps

Installation

# clone the repo
git clone https://github.com/capcodigital/flutter-confluence.git

# configures the local env
source .env

Running the app locally.

To run the app locally you need flutter sdk and firebase cli installed as details provided in prerequisites section.

Steps to run firebase emulators.

  1. Open terminal app and go to functions folder inside your project folder.
  2. Run npm run serve.(if you don't have npm installed, follow this).

firebase functions

Steps to run flutter app locally.

  1. Open flutter app located in front-end/flutter_confluence of your project folder in Android Studio, Intellij or Visual Studio Code.
  2. Go to file named constants.dart and replace the static const BASE_API_URL = 'https://europe-west2-io-capco-flutter-dev.cloudfunctions.net/app'; with static const BASE_API_URL = 'http://localhost:5001/io-capco-flutter-dev/europe-west2/app';.
  3. Go to file named main.dart and add await FirebaseAuth.instance.useAuthEmulator('localhost', 9099); before runApp().
  4. Go to terminal and Run Flutter pub get.(This will load all dependencies).
  5. Once dependencies are loaded. Run Flutter run. and The app will be launched in default device.

Major libraries Used.

  • Flutter bloc: Bloc design pattern helps to separate presentation from business logic. Following the BLoC pattern facilitates testability and reusability. More info
  • Firebase Auth: Firebase Authentication provides backend services, easy-to-use SDKs, and ready-made UI libraries to authenticate users to your app.More info
  • Firebase Functions:Cloud Functions for Firebase is a serverless framework that lets you automatically run backend code in response to events triggered by Firebase features and HTTPS requests. More info.
  • Firebase Firestore:Cloud Firestore is a flexible, scalable database for mobile, web, and server development from Firebase and Google Cloud. More info.
  • Lottie: Lottie is a mobile library for Android and iOS that parses Adobe After Effects animations exported as json with Bodymovin and renders them natively on mobile.More info

Connecting To Firebase

  • Firebase is a Backend-as-a-Service (BaaS) app development platform that provides hosted backend services such as a realtime database, cloud storage, authentication, crash reporting, machine learning, remote configuration, and hosting for your static files.More info.

  • Before using Firebase on your application, you must first connect to your Firebase project with your application. Firebase provides well written documentation for different platforms. Follow these links for respective platforms:

Note: In Flutter hub application we already have google-services.json(For Android) and GoogleService-Info.plist(For IOS) files, please replace these files with the one provided in project setting console of your firebase app.

Usage

Test Suite

Tests help ensure that your app performs correctly before you publish it, while retaining your feature and bug fix velocity. We have used following types of test in the project..

  • Unit Test: tests a single function, method, or class.
  • Widget Test: tests a single widget
  • Integration Test: tests a complete app or a large part of an app.

more about testing in flutter can be found here.

Use following command

# to run test in terminal
flutter test   

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  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

If you would like to contribute to any Capco Digital OSS projects please read:

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgements