Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.
/ S.now Public archive

Service now experience - An experience worth living!

Notifications You must be signed in to change notification settings

thanoskalantzis/S.now

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

logo
Table of Contents
  1. About the Project
  2. Key Features
  3. Built with
    1. Web Server & MySQL Database configuration
    2. Android Application
    1. Employee Account
      1. Unique Key
      2. Security Purposes
      3. Main Idea
      4. Unique Key construction
  4. Better Approaches
  5. Disclaimer

About the Project

An Android Application that manages Data stored online.

This Application was originally developed as part of a University Project but has also been enhanced along the way!

Key Features

This Android Application allows:

  1. Customers to place Orders directly from within a physical Store,
  2. Employees of a Store to manage and edit Orders placed by Customers,
  3. Business owners to add, remove, and modify Products.

Built with

A plethora of technologies were used to build this Project:

  • Java
  • Android Studio
  • PHP
  • Online MySQL Database
  • Free Web Hosting

Deployment

Web Server & MySQL Database configuration

A Web Hosting Service was originally utilized to host both an online MySQL Database and the necessary Web Server to handle the HTTP Requests being made.

Hosting the provided PHP files on this Web Server resulted in being able to execute all Server side operations of this System (e.g. accessing the Database, performing Database queries and retrieving the returned results, constructing JSON responses, delivering the necessary content to the Web Server, etc).

Thus, to successfully use this Application, both a Web Server and a MySQL Database should first be configured so that the following conditions are fulfilled:

  1. There should be a Database structure as the sample one provided.
  2. The SQL file provided under the /Database directory can be used to create the necessary Database structure and populate the Database Tables with sample Data.
  3. The PHP files provided under the /Website & PHP/connect directory should be placed on the Web Server to be utilized.
    The provided PHP scripts can then be used to connect to the target Database and are the ones responsible for performing the necessary Database queries, constructing JSON responses based on the returned results, and delivering the necessary content per HTTP Request.
  4. With respect to the HTTP GET & POST Requests being performed:
    1. All HTTP Requests are performed on URLs of the following structure:
      getString(R.string.BASE_URL).concat("/connect/{php_file}.php")
      Where:
      1. getString(R.string.BASE_URL): returns the {BASE_URL} as defined within the String resources file (strings.xml),
      2. {php_file}: the name of the targeted PHP file.
        The targeted PHP file corresponds to the script file that will eventually process the HTTP Request on the Server side.
    2. The necessary query parameters are also constructed before an HTTP Request is performed.
      E.g. The necessary parameters used for Authentication purposes are the ones mentioned in the next "Android Application" section.

Android Application

The Android Application should be built after the necessary values are provided for the following String resources:

<!-- CUSTOMIZE -->
<string name="BASE_URL"><!-- PROVIDE BASE URL OF CUSTOM WEBSITE --></string>
<string name="DATABASE_SERVER"><!-- PROVIDE DATABASE SERVER LOCATION --></string>
<string name="DATABASE_NAME"><!-- PROVIDE DATABASE NAME --></string>
<string name="DATABASE_USERNAME"><!-- PROVIDE DATABASE USERNAME --></string>
<string name="DATABASE_PASSWORD"><!-- PROVIDE DATABASE PASSWORD --></string>

To customize the aforementioned String resources, the strings.xml file located under the /Android/app/src/main/res/values directory should be accordingly modified.

After all aforementioned steps are performed, build the Android Project and enjoy!

Usage

Employee Account

Note, that for a registered Employee to be able to start working on Customer Orders being made in a particular Store, this Employee should have first been added to the workforce of this particular Store by the Store owner.

Note, that an Employee should still have first created an account (registered) to the Application.

For a Store owner to add an Employee to the workforce of a particular Store, the Store owner should first log in, select the corresponding "Add employee" option, and provide the Tax Identification Number of that Employee.

How to place an Order

Unique Key

For the time being, the Application prompts the Customer to provide a unique key before an Order is successfully sent.

Security Purposes

This configuration has been set up in such a manner for security purposes:

  1. To confirm the location of the Customer,
  2. To uniquely identify the specific table at which the Customer is seated.

Main Idea

To achieve this, the main idea was to let the Customer scan a unique QR Code being placed on each table in a Store.

This QR Code will correspond to a unique value.

Upon that value is used, the System will be able to access the aforementioned information and the Order will automatically be sent.

If a valid QR Code is used by the Customer to uniquely verify that is indeed at the Store's location from which the Customer tries to place an Order, then the Order will successfully be sent to the Store.

Unique Key construction

For the time being, this unique key is constructed as follows:

{Tax Identification Number of the Store} + {Number of the specific table at which the Customer is seated}

Better Approaches

A better approach would be to replace the aforementioned functionality by letting the Customer directly proceed to checkout (paying stage).

Disclaimer

  • All Data used in this Project are made up / fictitious and do not correspond to reality.
  • Any reference to existing Businesses / or Individuals / or any similarity to actual existing Data is purely coincidental.
  • All Data has been purely created with the sole purpose of being used for demonstration purposes.
  • This Project is strictly educational and shall only be used for informational and demonstration purposes.
  • Neither this Project nor any part of it should be used in Production Environments / Systems.
  • Do not use this Project or any part of it for commercial purposes or monetary gain.