Skip to content

Commit

Permalink
Merge pull request #237 from RunTerror/new_beacon
Browse files Browse the repository at this point in the history
App routing migration and data state class addition
  • Loading branch information
Akshatji800 committed Sep 28, 2024
2 parents 96dcb41 + 0226c95 commit 54a52a4
Show file tree
Hide file tree
Showing 223 changed files with 13,802 additions and 3,179 deletions.
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ANDROID_MAP_API_KEY=
IOS_MAP_API_KEY=
HTTP_ENDPOINT=
WEBSOCKET_ENDPOINT=
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: "🐞 Bug report"
about: Create a report to help us improve
title: ""
labels: "🐞 bug"
assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Demonstration**
If applicable, add screenshots or video to help explain your problem.

**Environment**
- Device/emulator being used: <device version/emulator>
- OS (iOS/ Android); If Android then android version: <OS: OS version>
- Flutter version: <flutter version>

**Additional context**
Add any other context about the problem here.

**Are you working on this issue? (Yes/No)**
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/custom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: Custom issue template
about: Describe this issue template's purpose here.
title: ''
labels: ''
assignees: ''

---

21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: "⭐️ Feature request"
about: Suggest an idea for this project
title: ""
labels: "🌟 feature"
assignees: ""
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.

**Are you working on this? (Yes/No)**
7 changes: 7 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Fixes #

Describe the changes you have made in this PR -

Screenshots of the changes (If any) -

Note: Please check Allow edits from maintainers. if you would like us to assist in the PR.
55 changes: 55 additions & 0 deletions .github/workflows/flutter-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Flutter CI

on:
push:
branches: [main, development]
pull_request:
branches: [main, development]

jobs:
test:
strategy:
matrix:
platform: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{matrix.platform}}
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: "12.x"
- uses: subosito/flutter-action@v2
with:
# Temporary fix to failing CI
flutter-version: '3.16.4'
architecture: x64
# channel: "stable"
- run: flutter pub get
- run: dart format . --set-exit-if-changed
- run: flutter analyze .
- run: flutter test

build:
strategy:
matrix:
platform: [windows-latest, macos-latest, ubuntu-latest]
runs-on: ${{matrix.platform}}
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: "12.x"
- uses: subosito/flutter-action@v2
with:
# Temporary fix to failing CI
flutter-version: '3.16.4'
architecture: x64
# channel: "stable"
- run: flutter pub get
- run: dart format . --set-exit-if-changed
- run: flutter analyze .
- run: flutter test
# - run: flutter build apk
# - uses: actions/upload-artifact@v1
# with:
# name: release-apk
# path: build/app/outputs/apk/release/app-release.apk
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
.buildlog/
.history
.svn/
*.env

# IntelliJ related
*.iml
Expand Down Expand Up @@ -44,3 +45,10 @@ app.*.map.json
/android/app/debug
/android/app/profile
/android/app/release

# Testing
/coverage/

# FVM Version Cache
.fvm/
.gitignore
39 changes: 37 additions & 2 deletions .metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,42 @@
# This file should be version controlled and should not be manually edited.

version:
revision: c5a4b4029c0798f37c4a39b479d7cb75daa7b05c
channel: stable
revision: "78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9"
channel: "stable"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
- platform: android
create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
- platform: ios
create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
- platform: linux
create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
- platform: macos
create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
- platform: web
create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
- platform: windows
create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
25 changes: 25 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "beacon",
"request": "launch",
"type": "dart"
},
{
"name": "beacon (profile mode)",
"request": "launch",
"type": "dart",
"flutterMode": "profile"
},
{
"name": "beacon (release mode)",
"request": "launch",
"type": "dart",
"flutterMode": "release"
}
]
}
90 changes: 73 additions & 17 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,31 +1,87 @@
# Beacon
[![Flutter CI](https://github.com/CCExtractor/beacon/actions/workflows/flutter-ci.yml/badge.svg)](https://github.com/CCExtractor/beacon/actions/workflows/flutter-ci.yml)

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.
## 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

For setting up the development environment, follow the steps given below.
You can test Beacon in your own development environment. This section shows you how:

1. For making changes to the project, fork this repository using the green button on this page.
### Prerequisites

2. Clone your fork or this repository, as applicable.
You'll need to set up the IDE and mobile device emulator, or any mobile testing device on your local system.

```bash
git clone https://github.com/<username>/beacon.git
cd beacon
```
**Flutter Environment**: You'll need to have the following installed:
1. [Flutter SDK](https://flutter.dev/docs/get-started/install)
2. [Android Studio](https://developer.android.com/studio)

3. Check for flutter setup and connected devices
***Ensure you are testing the app using Flutter version [3.0.1](https://docs.flutter.dev/development/tools/sdk/releases?tab=windows) and above.***

```bash
flutter doctor
```
For checking flutter version:
- Run `flutter --version` in terminal

4. Run the app using
```bash
flutter run --no-sound-null-safety
```
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](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
samples, guidance on mobile development, and a full API reference.

## Project Structure

This project follows MVVM architecture with following structure:

```bash
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

<img src="screenshots/1.jpg" width="24%" /> <img src="screenshots/2.jpg" width="24%"/> <img src="screenshots/3.jpg" width="24%"/> <img src="screenshots/4.jpg" width="24%"/>

## 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](https://github.com/CCExtractor/beacon/issues/new).

**To know the details about features implemented till Google Summer of Code'21 and future todo's please visit [this blog](https://blog.nishthab.tech/gsoc-2021-ccextractor-beacon)**

## Community

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

[![Slack](https://img.shields.io/badge/chat-on_slack-purple.svg?style=for-the-badge&logo=slack)](https://ccextractor.org/public/general/support/)
27 changes: 27 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at https://dart.dev/lints.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
13 changes: 13 additions & 0 deletions android/.settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
arguments=--init-script /var/folders/87/sjnhgg2s1dn1b0l2r0jrgxx80000gn/T/d146c9752a26f79b52047fb6dc6ed385d064e120494f96f08ca63a317c41f94c.gradle --init-script /var/folders/87/sjnhgg2s1dn1b0l2r0jrgxx80000gn/T/52cde0cfcf3e28b8b7510e992210d9614505e0911af0c190bd590d7158574963.gradle
auto.sync=false
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
connection.project.dir=
eclipse.preferences.version=1
gradle.user.home=
java.home=/opt/homebrew/Cellar/openjdk/21.0.2/libexec/openjdk.jdk/Contents/Home
jvm.arguments=
offline.mode=false
override.workspace.settings=true
show.console.view=true
show.executions.view=true
Loading

0 comments on commit 54a52a4

Please sign in to comment.