Skip to content

ibrahimozkn/PopTracker-Indoor-Population-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PopTracker-Indoor-Population-App

Authors

  • Adil Bozkurt Kebapcioglu – 2455954
  • Ibrahim Ozkan – 2456275

Table of Contents

Introduction

The PopTracker application enables businesses to share their live indoor population information with their customers. The system involves placing Arduino devices equipped with sensors at the entrances and exits of indoor areas. These devices detect if a person enters or exits the area and send this information to a backend server hosted by Amazon Web Services (AWS). The backend processes the data and stores it in an Amazon RDS database. Clients can view the population data of specific businesses in real time through a mobile application provided by the backend.

Project Structure

Cloud Services Utilized

The project consists of two main components: the frontend and the backend. The frontend communicates with the backend through HTTP requests. The backend utilizes the following cloud services:

  • AWS EC2: The backend runs on a virtual Linux machine provided by AWS, offering a public IP address for internet access.
  • AWS RDS: The backend uses the RDS service for database management, providing features such as security and scalability.

Technologies Used

  • Backend: PHP framework (Laravel), MySQL
  • Frontend: Flutter framework, Location services

Application Functionalities

  1. Account Creation: Users must register an account to use the application.
  2. Role Based User Authentication: Different functionalities are available for users and admins.
  3. Business Listing: Users can view a list of businesses.
  4. Business Information Provider: Users can view detailed information about a business.
  5. Current In-door Population Counter: Users can see the current population inside a business.
  6. Business Management (Admin): Admins can create, edit, and delete businesses.
  7. Population Simulator (Admin): Admins can simulate population changes using a Poisson Algorithm.
  8. Business Population Statistic Generation (Admin): Admins can view population statistics for businesses.
  9. Scheduled Backup Handler: Admins can generate and manage backups.

Database Schema

Schema

Installation

Backend Setup

  1. First, install composer, PHP, and MySQL on your machine.
  2. Clone the API folder to your "public" directory.
  3. Execute composer install to install the required libraries.
  4. Edit your .env file and change the database credentials according to your needs.
  5. Execute php artisan migrate:fresh to migrate the database.
  6. Run php artisan key:generate to generate your app key.
  7. Execute php artisan db:seed to generate test data (if needed).
  8. Execute php artisan serve to start the API.

Mobile Application Installation

  1. Download the latest version of the APK file.
  2. Install the APK file.
  3. Launch the app.

Usage

Account Creation

Users must register an account to use the application. They can fill out the registration form and click the "Register" button to submit their account registration request to the backend server.

Role Based User Authentication

Different functionalities are available for users and admins. Admin functionalities such as business management and population simulation are accessible based on the user role.

Business Management (Admin)

Admins can create, edit, and delete businesses through the application. They can fill out the necessary information and manage business records.

Population Simulator (Admin)

Admins can simulate population changes using a Poisson Algorithm to generate random entries and exits, simulating real-world scenarios.

Business Population Statistic Generation (Admin)

Admins can view population statistics for businesses, including historical data, which is displayed in graphs and tables.

Scheduled Backup Handler

Admins can generate and manage backups by launching the "backup.bat" file. Backup files are stored in the "storage/app/backups" directory.

Project Statistics

Time Frame & Work Division

Date (Week) Task Responsible
October 24 - 30 Initiate AWS EC2 Server Ibrahim Ozkan
October 24 - 30 Initiate AWS RDS Service Adil B. Kebapcioglu
October 24 - 30 Designing API Database Structure Adil B. Kebapcioglu
October 31 - November 6 Implementing Database Structure Adil B. Kebapcioglu
October 31 - November 6 Designing Mobile Application Interfaces Ibrahim Ozkan
October 31 - November 6 Implementing Auth API Adil B. Kebapcioglu
October 31 - November 6 Integrating Auth API to mobile application (login & register) Ibrahim Ozkan
November 7 - 13 Implementing Business CRUD API (Create, delete, update, read) Adil B. Kebapcioglu
November 7 - 13 Integrating Business CRUD API to mobile app (Business listing, business creation, removal, information read, editing business) Ibrahim Ozkan
November 14 - 20 Implementing Population API Adil B. Kebapcioglu
November 14 - 20 Integrating Population API to mobile app (Current business population counter, simulation of entrance and departure, population history listing, population history stats) Ibrahim Ozkan
November 21 - 27 Developing a database seeder at backend to generate test data Adil B. Kebapcioglu
November 28 - December 4 Hiding admin operations from user interface in mobile app Ibrahim Ozkan
December 5 - 11 Creating scheduled backup at backend Adil B. Kebapcioglu
December 12 - 18 Creating batch script for easy backup Ibrahim Ozkan
December 19 - 25 Deploying project to EC2 instance with RDS connection Ibrahim Ozkan
December 26 - January 1 Testing the application Ibrahim Ozkan, Adil B. Kebapcioglu

Hardware Requirements

Server Requirements (Recommended):

  • 4GB RAM
  • Intel Xeon E5 2697v2 4 core
  • 40GB SSD

Application Requirements:

  • Android 9 Pie
  • SDK version 30

Database Technologies

MYSQL (Provided by Cloud):

  • 20GB DB Storage
  • 1GB memory
  • 1 vCPU 3.3 GHz Intel Scalable Processor

Difficulties Encountered

The difficulties encountered while developing the project are listed below:

  • Payment (Credit card) barrier in both AWS and Google Maps, which caused the development of the project locally rather than in the cloud. This also prevented adding Google Maps view to our application since Flutter does not have a library for other map services.
  • Lack of shops selling Arduino tools in Cyprus, which caused the Arduino sensor implementation to be incomplete.

Future Work

We are planning to achieve these works in the future:

  • Add maximum population capacity to each company and display it in the company listing.
  • Increase the number of statistical data about companies available to admins, such as mean, median, max, and min population times.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any changes or improvements.