simonesestito / shops-queue-android

Android app of Shops Queue service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

App logo Shops Queue (Android app)

Android CI

Download latest APK

This repository is part of the Shops Queue project.

Other related repositories:

Table of contents

Screenshots

Introduction

An idea to save time and avoid queues outside supermarkets and other shops in general.

This is a project made for my graduation exam. In the last year we usually study Java, and that's what determined the language to use for the app, instead of Kotlin.

It was created during the Coronavirus lockdown in Italy. The idea came from a post on Facebook written in March 2020 by the Italian Minister of Agricultural, Food and Forestry Policies. It's also inspired by the system most post offices already use to save time.

Features

A user on this platform can cover different roles:

  • Simple user
  • Shop owner
  • Administrator

User

A user must sign up to use the platform.

He can discover all the shops nearby which use this system to manage queues. Of course, shops can be found by their name or address too.

There's the possibility to queue at the store when you're still at home, arriving at the shop only when it's your turn.

A user will receive a push notification (via Firebase Cloud Messaging) when it's almost his turn.

Shop owner

A shop owner must reach out to an administrator to receive an appropriate account and to register his business on the platform.

After that, he can manage the queue of his shop and call the next customer.

Administrator

An administrator can manage all accounts (both users and shop owners) and all shops.

Security

A user must verify its e-mail address after signing up.

When the user logs in, its password is NEVER saved on the user's device. Instead, an access token is securely stored in SharedPreferences. Other installed apps aren't allowed to access SharedPreferences, apart from rooted devices. Whenever it's possible, the access token is encrypted using Jetpack Security library.

If the access token is sniffed, a user will be able to immediately revoke it from the "Active sessions" menu. The password will never be discovered by an attacker.

UI Design

The app heavily uses the Google Material Components library.

The app graphical layout is based on the principles of the Material Design.

It provides both a light and a dark theme. The theme to use is determined by looking at the current theme the user applied on the entire phone, if any. By default, it uses the light theme.

Also... ( ͡° ͜ʖ ͡°)

Project architecture

This app follows the MVVM pattern, as recommended by Google in the last years.

The View layer is responsible for the interaction with the user. It handles click events and displays the data.

It stores and works with the data available in the ViewModel layer. A ViewModel is a special class which exposes the current state of the View, often using a LiveData object. This project uses a custom LiveData, called LiveResource.

Then, we have the Model layer, where all the data comes from. In this specific app we have no local SQL databases, so this layer includes SharedPreferences and Retrofit classes.

General data flow in the app:

App data flow

Navigation

This project follows the Single Activity Architecture and the Jetpack Navigation Library.

It has a single Activity, which is the entry point of the app. Every other piece of the user's flow is implemented as a Fragment. Every part of the app is divided into different sub-graphs.

The app uses Deep Links to go immediately to the login fragment. It's used as a redirect URI after the email address is validated.

Dependency Injection

Dependency Injection is a design pattern used in Object-Oriented Programming. It allows the instantiation of a class which depends on another, and so on.

This project uses Google Dagger.

Everything that concerns dependency injection, is located here.

Continuous Deployment (CD)

It's a release process that automatically deploys new versions of the software.

This project uses GitHub Actions.

Every time a new commit is pushed to this repository, a workflow is triggered. A new version of the app is compiled on GitHub servers, shrank using Android R8, signed with the release certificate and, finally, pushed to the app's storage bucket to let everyone download it.

The file which describes the workflow and the build process is android.yaml

License

Copyright 2020 Simone Sestito

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

About

Android app of Shops Queue service

License:GNU General Public License v3.0


Languages

Language:Java 99.8%Language:Shell 0.2%