GithubHelp home page GithubHelp logo

ccextractor / beacon Goto Github PK

View Code? Open in Web Editor NEW
57.0 14.0 144.0 2.56 MB

Flutter application to share location with a group. (under development)

Kotlin 0.04% Swift 0.95% Objective-C 0.01% Dart 81.96% HTML 0.51% Ruby 0.94% CMake 6.70% C++ 8.39% C 0.49%
flutter location-sharing

beacon's Introduction

Beacon

Flutter CI

About the Project

This project is a flutter build native interface to ease the group travelling (or hiking). By using this, the group leader would be able to share his location with the entire crew, and in case if someone loses contact with the group, he can quickly get in the right place by following the beacon.

Getting Started

You can test Beacon in your own development environment. This section shows you how:

Prerequisites

You'll need to set up the IDE and mobile device emulator, or any mobile testing device on your local system.

Flutter Environment: You'll need to have the following installed:

  1. Flutter SDK
  2. Android Studio

Ensure you are testing the app using Flutter version 3.0.1 and above.

For checking flutter version:

  • Run flutter --version in terminal

If your version is not upto date, follow these steps to upgrade:

  • flutter channel stable to switch to the channel having stable version of flutter updates
  • flutter upgrade to get the latest flutter version

Development Environment: For setting up the development environment, follow the steps given below.

  • Clone this repository after forking using git clone https://github.com/<username>/beacon.git
  • cd into beacon
  • Check for flutter setup and connected devices using flutter doctor
  • Get all the dependencies using flutter pub get
  • Create a .env file in the root folder, copy the content from .env.example and add respected key's value
  • Run the app using flutter run

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Project Structure

This project follows MVVM architecture with following structure:

beacon/lib/
├── components/                             # Shared Components such as dialog boxes, button, and other shared widgets
├── enums/                                  # enum files
|   └── view_state.dart                     # defines view states i.e Idle, Busy, Error
├── models/                                 # model classes: group, beacon, location, landmark, user
├── queries/                                # includes all graphql query strings
├── services/                               # services
|   ├── database_mutation_function.dart/    # Graphql Queries implementations
|   ├── navigation_service.dart/            # All required navigation services
|   └── ...                                 # all config files
├── utilities/                              # Utilities that includes constants file
├── views/                                  # Views/UI layer
|  ├── auth_screen.dart
|  ├── base_view.dart
|  ├── hike_screen.dart
|  ├── group_screen.dart
|  ├── home.dart
├── viewmodels/                             # Viewmodels layer
├── splash_screen.dart                      # Very first screen displayed whilst data is loading
├── router.dart                             # All routes to ease navigation
├── locator.dart                            # dependency injection using get_it
├── main.dart                               # <3 of the app

Screenshots

Contributing

Whether you have some feauture requests/ideas, code improvements, refactoring, performance improvements, help is always Welcome. The more is done, better it gets.

If you found any bugs, consider opening an issue.

To know the details about features implemented till Google Summer of Code'21 and future todo's please visit this blog

Community

We would love to hear from you! You may join gsoc-beacon channel of CCExtractor community through slack:

Slack

beacon's People

Contributors

aadeesh11 avatar adarsh-technocrat avatar akshatji800 avatar cfsmp3 avatar codewithkushagra avatar devansh12b2 avatar devmrfitz avatar harshitgulgulia avatar itsadityaksingh avatar literaleval avatar nb9960 avatar omegaviv avatar pavel401 avatar runterror avatar tanisha083 avatar techno-disaster avatar vkprogrammer-001 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

beacon's Issues

Sliding tab on Hike Screen

Is your feature request related to a problem? Please describe.
The sliding bar on the hike screen, when open, should close upon clicking anywhere else on the screen. Instead of it, when clicked anywhere on above, it initiates creating a landmark.

Describe the solution you'd like
Slide down the open tab to min-height upon clicking anywhere else.

Demonstration

Screen.Recording.2022-01-18.at.6.53.54.PM.mov

Are you working on this? (Yes/No)
Yes

Oversized containers

There are a few instances wherein the box size is more compared to its contents.

The plugin geocoder uses a deprecated version of the Android embedding.

Describe the bug
The plugin geocoder uses a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.

To Reproduce
Compiling the app
e1

Expected behavior
geocoder should be replaced with geocoder2 1.0.0 or geocode 1.0.1

Environment

  • Device/emulator being used: <Android 10/Pixel 2 Xl>
  • OS (iOS/ Android); If Android then android version: <Android: 10>
  • Flutter version: <2.8>

Are you working on this issue? (Yes/No)
Yes, Please assign me this issue.

Design of Hike Screen

Describe the bug
The custom paint widget on the hike screen hides a part of the map from above. But upon pressing randomly anywhere on it, create landmark pop-up appears.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Hike Screen'
  2. Click on 'Custom Paint widget'
  3. See 'Create Landmark'

Expected behavior
Either the design should be minimized or removed for a better look and bigger map space so that users can see and create landmarks with more ease.

Demonstration

Screen.Recording.2022-01-18.at.6.54.21.PM.mov

Environment

  • Device/emulator being used: Pixel 4XL
  • OS (iOS/ Android); If Android then android version: <OS: 10>
  • Flutter version: 2.8.1

Are you working on this issue? (Yes/No)
Yes

Forgot password option

There's no forget password option on the login screen or a way to retrieve a forgotten password of one's account. This makes it really difficult for a user to log in once the password is forgotten.
Also, there's no feature of verifying an email address before creating an account with it.

No Exit Pop on Home or Authorisation screen

There is no emergency pop-up confirmation for exiting the home screen. Users may, by mistake, click the back button, and it would close the app. Instead, we could provide an emergency pop-up to confirm the exit of our users from the app.

Leader's name in nearby beacons is returned as null

Upon terminating the hike and coming back to home screen, my own beacon is shown as Anonymous.

Is this a bug or it is supposed to work this way?

Also note the difference of top-padding between the two columns

Location Permission

The app can't request for location permission in my device, and it needs to be manually permitted.

  • Is this the expected behavior ?
  • If so, it there any specific reason to not let the app ask for permission ?

No validation for Name field

Describe the bug
No error is thrown for the name field if left empty, on the Sign Up page.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Sign Up page'
  2. Click on 'Sign Up'
  3. See error

Expected behavior
The name field should also throw an error for not to be left empty.

Demonstration

Environment

  • Device/emulator being used: Pixel 4 XL
  • OS (iOS/ Android); If Android then android version: <OS: 10>
  • Flutter version: 2.8.1

Are you working on this issue? (Yes)

Feature to relay the beacon

A beacon can be transferred from one device to another, typically because there's a change in whoever is leading the group.
For this, changeLeader mutation needs to be used (Check playground link for details). Note: There might be a case when newLeader isn't active, for this, one need to update the location of each and every user beforehand (if beacon location is null then that might lead to process failure).

Offbeat Label and Hint Text

The label and hint text style have a few odd format settings.

The current 'Join a Hike' pop up has:

  • Black and Bold hint-text
  • Weirdly sized validate button
  • Too small label text

The current 'Create Hike' pop up has:

  • Different colors of hint text for both fields

We could change it to be more pleasant with our appflow by:

  • Changing validate button formatting
  • Assigning same text color and size to all the hint texts
  • Increasing the text size of Passkey label text

Adding tests

lib/components

  • beacon_card.dart
  • create_join_dialog.dart
  • dialog_boxes.dart
  • hike_button.dart
  • hike_screen_widget.dart
  • shape_painter.dart

Assign some of these to me.

Eye Icon change unnoticed

The eye icon in the password field changes its boldness upon clicking, which can be improved by allowing a slash to signify its state better.

Share route if beacon is active

Whenever a new location is fetched from beaconLocation subscription, it gets stored in the route list. This can be used to share route if the beacon is active.

[Tests]: Write Test for beacon project.

The following architecture needs to be followed while writing tests:

  • model_tests

  • service_tests

  • widget_tests

  • viewmodel_tests

  • Login Screen

  • Home page

  • beacon_card.dart

  • create_join_dialog.dart

  • dialog_boxes.dart

  • hike_button.dart

  • hike_screen_widget.dart

  • shape_painter.dart

For the Hike screen, MVVM architecture isn't followed so I am creating an issue for refactoring it, once it's done then tests can be added for that screen too.

Feel free to add/suggest anything that you think is missing.

Lack of tests

I think it's good to start writing tests before the codebase gets huge and unmanageable. Kindly add some coverage threshold (5% - 10% will be fine for now), so that before further PRs, contributors would focus on writing tests.

Feature to deactivate the beacon on leader's demand

Similar to issue #4 in this case too, beacon location should be pre-specified; otherwise, it might lead to process failure. Notification scheduler feature of flutter_local_notifications can also be used to inform users (leader as well as followers if any) when Hike has started.
As of now, startsAt field in beacon model is specified as DateTime.now while creating an hike, createHike dialog needs to be modified to pre-schedule the beacon.

Multiple Error messages being shown

Describe the bug
Whenever we try to sign up or log in and incur any error, we get shown up with 2 different error messages as shown below.
To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Log in or Sign up page'
  2. Enter any wrong input or password.
  3. See error.

Expected behavior
It should only be showing the main error message.

Demonstration

Screen.Recording.2022-01-19.at.2.09.04.PM.mov
Screen.Recording.2022-01-19.at.2.08.39.PM.mov

Environment

  • Device/emulator being used: Pixel 4XL
  • OS (iOS/ Android); If Android then android version: <OS: 10>
  • Flutter version: 2.8.1

Are you working on this issue? (Yes/No)
Yes

An about page and onboarding screen

An about page can be added having information related to the app's usage and functionality. Moreover, an onboarding screen for first-time users can be introduced to familiarize them with the app's environment!

Registered Users Signing up

Registered users, upon signing up, receive a message saying "Something went wrong"

Instead, they can be informed that they are already registered and should try logging in instead of signing up again.

Screenshot for details:

Are you working on this issue
Yes

Appearance of Sign In button

The SIGIN button for new users has a weird appearance.

  • Instead of SIGNIN we can show it as SIGN IN
  • Also we could change the width of the button to make it look more pleasant.

Multiple and unsure errors by dialog boxes

Describe the bug
There are multiple and unclarified issues shown upon clicking on dialog boxes. Validator issues hide due to snack bar issues being shown and proper issues aren't shown properly.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Home Screen'
  2. Click on 'Create Hike or Join Hike'
  3. Click Create or Validate button
  4. See error

Expected behavior
Errors and validators should work differently and show the particular error they represent. Multiple issues musn't arise.

Demonstration

Screen.Recording.2022-01-22.at.12.41.40.AM.mov
Screen.Recording.2022-01-22.at.12.41.57.AM.mov

Environment

  • Device/emulator being used: Pixel 4XL
  • OS (iOS/ Android); If Android then android version: <OS: 10>
  • Flutter version: 2.8.1

Are you working on this issue? (Yes/No)
Yes, I am working on solving this issue!

Overflow issue on homescreen.

Getting a overflow issue on Homescreen due to the 2 buttons.

overflow

I would like to work on this, please assign it to me.

Build Failure!

Hi! I am new to open source contribution. I forked the repository and ran the app in debug mode on my system but build failed and I am unable to understand what's the cause behind it. Someone please help!
I have attached the description of error.
help

Maintain state when network connectivity is lost

State of the Hike Screen shouldn't get affected when connectivity is lost. Hive has been used to store data in the local database so that when connectivity is lost, locally saved data can be consumed, but as of now, local data hasn't been used anywhere.

Marginal sizing improvements

Instead of using constants or MediaQuery sizing we could use sizer package for

  1. heights,
  2. widths,
  3. paddings, and
  4. margins,

It would improve simplicity of code and result in less overflow or overlapping errors in any screen size.

Project failing to build.

The debug log is:


/D:/FLUTTER%20SETUP/flutter/.pub-cache/git/flutter_duration_picker-285ff19ad8b440fb6b8727ea849b7ce679d67c75/lib/flutter_duration_picker.dart:440:39: Error: The getter 'subhead' isn't defined for the class 'TextTheme'.
- 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/D:/FLUTTER%20SETUP/flutter/packages/flutter/lib/src/material/text_theme.dart').
package:flutter/…/material/text_theme.dart:1
Try correcting the name to the name of an existing getter, or defining a getter or field named 'subhead'.
    final TextStyle style = textTheme.subhead;

                                      ^^^^^^^
2

FAILURE: Build failed with an exception.

* Where:
Script 'D:\FLUTTER SETUP\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1005

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'D:\FLUTTER SETUP\flutter\bin\flutter.bat'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Can anyone help me out?

Reverse list of user-created beacons

Describe the bug
The list of a user's beacons is in reverse order of recently created beacons.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Home Screen'
  2. Scroll down to 'Your Beacons'
  3. See the error

Expected behavior
It should have the recent beacons on top, and then the formers.

Demonstration
Screenshot_1642789912

Environment

  • Device/emulator being used: Pixel 4XL
  • OS (iOS/ Android); If Android then android version: <OS: 10>
  • Flutter version: 2.8.1

Are you working on this issue? (Yes/No)
Yes

Overflowing in beacon card

Describe the bug
Overflowing of beacon card in the home screen

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Home Screen'
  2. Create a 'New hike with long title'
  3. Scroll down to 'Beacon Tab'
  4. See error

Expected behavior
No overflowing should be noticed

Demonstration
photo_2022-01-15 00 28 44

Environment

  • Device/emulator being used: Samsung M40, Pixel 4XL
  • OS (iOS/ Android); If Android then android version: <OS: OS 10>
  • Flutter version: 2.8.1

Are you working on this issue? (Yes/No)
Yes, I am working on solving this problem

[Beacons]: Users can see beacons even after they have expired.

Users can see beacons even after they have expired in your beacon section.

Expected behaviour can be:
1. Either make a new tab showing expired beacons,
2. Do not show expired beacons entirely,
3. Show expired beacons at the very last in your beacons section.

I would like to work on this issue.

Only Capital Passkey Values allowed

Describe the bug
Only capital Passkey values are allowed. Users can't enter passkey in small cases even if the passkey's right.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'HomeScreen'
  2. Click on 'Join a Hike'
  3. Enter a passkey in small case
  4. See error

Expected behavior
User should be able to enter the hike with the right passkey, irrespective of upper or small case entered.

Demonstration

Screen.Recording.2022-01-21.at.8.50.13.PM.mov

Environment

  • Device/emulator being used: Pixel 4XL
  • OS (iOS/ Android); If Android then android version: <OS: 10>
  • Flutter version: 2.8.1

Are you working on this issue? (Yes/No)
Yes, I am working on this issue

Misaligned Buttons on dialogue box.

When you try to terminate a hike or logout, the yes/no buttons are misaligned.

How it is:
Current

How it can be:
Screenshot 2021-12-26 at 8 48 10 PM

I would like to work on this please assign it to me.

Expired Beacons

Shouldn't my expired beacons be showing 'EXPIRED' instead of remaining switched on upon passing given duration and asking me to terminate it again?

Notice the expiry time.

Use of deprecated duration picker widget

Hi! I am new to open source contribution. I am interested in contributing to this app. I went through the codebase and found that there's a deprecated implementation of duration picker. I would like to be assigned to this issue so that I can adapt it to a newer version.

Feature: Reminder for a pre-scheduled hike

After issue #5 is addressed we could further enhance it by allowing other users to pin a scheduled hike.
We could also give them notifications beforehand, on some set timers (say like 24 hours before -> 12 hours before -> 1 hour before), to be able to join the hike on time!

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.