- Adil Bozkurt Kebapcioglu – 2455954
- Ibrahim Ozkan – 2456275
- Introduction
- Project Structure
- Database Schema
- Installation
- Usage
- Project Statistics
- Difficulties Encountered
- Future Work
- Contributing
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.
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.
- Backend: PHP framework (Laravel), MySQL
- Frontend: Flutter framework, Location services
- Account Creation: Users must register an account to use the application.
- Role Based User Authentication: Different functionalities are available for users and admins.
- Business Listing: Users can view a list of businesses.
- Business Information Provider: Users can view detailed information about a business.
- Current In-door Population Counter: Users can see the current population inside a business.
- Business Management (Admin): Admins can create, edit, and delete businesses.
- Population Simulator (Admin): Admins can simulate population changes using a Poisson Algorithm.
- Business Population Statistic Generation (Admin): Admins can view population statistics for businesses.
- Scheduled Backup Handler: Admins can generate and manage backups.
- First, install composer, PHP, and MySQL on your machine.
- Clone the API folder to your "public" directory.
- Execute
composer install
to install the required libraries. - Edit your
.env
file and change the database credentials according to your needs. - Execute
php artisan migrate:fresh
to migrate the database. - Run
php artisan key:generate
to generate your app key. - Execute
php artisan db:seed
to generate test data (if needed). - Execute
php artisan serve
to start the API.
- Download the latest version of the APK file.
- Install the APK file.
- Launch the app.
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.
Different functionalities are available for users and admins. Admin functionalities such as business management and population simulation are accessible based on the user role.
Admins can create, edit, and delete businesses through the application. They can fill out the necessary information and manage business records.
Admins can simulate population changes using a Poisson Algorithm to generate random entries and exits, simulating real-world scenarios.
Admins can view population statistics for businesses, including historical data, which is displayed in graphs and tables.
Admins can generate and manage backups by launching the "backup.bat" file. Backup files are stored in the "storage/app/backups" directory.
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 |
Server Requirements (Recommended):
- 4GB RAM
- Intel Xeon E5 2697v2 4 core
- 40GB SSD
Application Requirements:
- Android 9 Pie
- SDK version 30
MYSQL (Provided by Cloud):
- 20GB DB Storage
- 1GB memory
- 1 vCPU 3.3 GHz Intel Scalable Processor
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.
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.
Contributions are welcome! Please open an issue or submit a pull request for any changes or improvements.