Skip to content

smmohash/Partyholic-0.1.0

Repository files navigation

What is this?

This is an Android app. It consists of two parts:

The frontend (written in Java). The backend (the server) (written in Python).

Backend

Under the directory "Partyholic (backend)"

What this server is

This is a backend server for Partyholic. The client sends an image "poster of a Party" and the server returns the extracted details.

Description

this server runs on Flask framework and wait for an HTTPS connection from the app in a POST method. The Body of the request should have an image encoded in binary format. The response will be a .json file. The file includes the extracted data which is address, date, time, and the coordinates of the party.

Before instalation

  • This server uses an OCR-API for transforming the image into a String. And for this you need to get a free API-KEY for OCR-API.
  • Open the file image_processing.py
  • Replace the empty string in the variable api_key with your API-KEY.

Running it locally:

  • Clone the repo onto your machine.
  • Open the project folder via Pycharm or any IDE.
  • Create a new environment for Python (This demo is based on Python 3.8.5)
  • Install the required packages which is in requirements.txt
pip install -r requirements.txt
  • Run the file "main.py"
  • Test it independently from the frontend part, using Postman.

Running it on Heroku:

  • Create an account on Heroku or login if you have one :
  • Create a new app on Heroku and give it a name.
  • Open the Terminal in the directory where you cloned the repo from Github.
  • Login into your Heroku account:
heroku login
  • Give your credentials
  • Run the commands:
heroku git:remote -a <name of the app on Heroku that you chose>
git push heroku main
  • And now the server should be running on Heroku.

Usages example (locally)

Markdown Logo

Frontend

Under the directory "Partyholic (frontend)"

Preview:
Markdown Logo

What it is

This is the frontend of Partyholic. This is the part that the user gets the .apk file (you can find it in the repo, named "Partyholic 0.1.0.apk) of. It is done using Android Studio. So, we recommend using it to check it out. Since Android Studio has its own way of showing the project files, it will show you the structure of the project in the best way possible. The layout files under the directory "Partyholic (frontend)\app\src\main\res\layout" specify how the activities of the app look like. The .java files under "Partyholic (frontend)\app\src\main\java\p\p" have the functionality of the app.

Installation

The project was made with the following setting:

java version "1.8.0_281"
Java(TM) SE Runtime Environment (build 1.8.0_281-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.281-b09, mixed mode)`

  • Get an API-key from Google.
  • Open the file "local.properties" which is located in "Partyholic (frontend)"
  • Insert your API-key directly after "MAPS_API_KEY=" in the same line.
  • Insert your Java SDK directory directly after "sdk.dir=" in the same line.
  • Open the project.

About

Partyholic App

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published