Neliott / ScannergicBackend

0 stars 0 forks source link

Scannergic

Introduction

General idea of the project

Our idea is to develop an android application which would allow people with allergies to fill them in the app, scan the barcode of a product and quickly know if they can eat the product or not. So the application knows, according to the different allergies, which product can be eaten or not. To do this, the android app will be requesting the allergies contained in the product to an API.

The API will be developed in this part of the project so all the code you will find in it is related to the development of the API.

To get the other part of the project (Android App) please click here

Goal

This application aims at simplifying people with allergies' life allowing them to quickly know if they can eat a product or not.

Used technologies

API : ASP.NET / C#

Database : MySQL

Schematic diagram

SchémadePrincipe2

Prerequisites

To run

Server side :

To open documentation

How to setup the project

To clone the project run the following command :

git clone https://github.com/EliottJaquierCPNV/ScannergicBackendAPI

Then checkout on the right branch

git checkout develop

Once it is done you'll need to create the database with the script named DatabaseCreation.sql in SQL scripts/. Connect to your MySQL server using your Heidi or other SQL client and execute the script. If you want to put some test data in the DB to test the API, repeat the process with the Population.sql script.

Once done, go to ScannergicBackendAPI\Scannergic\ScannergicAPI\credentials.json and edit the database credentials to fit to yours.

Then go to the project folder where you cloned the project and click on the .sln file to open the project in Visual Studio. Run the project's tests by clicking this button :

image

In order ton run the project you need to click on this button :

image

A web page will open in your browser and you should see this

image

From there you can try the API and you're all set !

Note : you only need to run the project, on a server for example please follow the process described in the wiki.