Skip to content

This is the official repository for the Hike Tracker Project, developed by Team 10 from the Software Engineering II Course at Politecnico di Torino.

Notifications You must be signed in to change notification settings

darxsky/Hike-Tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SE2022-10-HikeTracker

This is the official repository for the Hike Tracker Project, developed by Team 10 from the Software Engineering II Course at Politecnico di Torino.

Analysis

SonarCloud

Lines of Code Code Smells Technical Debt Duplicated Lines (%) Bugs Maintainability Rating

Table of contents

  1. Technology Stack
    1. Frontend
    2. Backend
  2. Docker Instructions
    1. Docker compose
    2. Backend docker image
    3. Frontend docker image
  3. API Server
    1. GET
    2. POST
    3. PUT
    4. DELETE
  4. Database tables
  5. User Credentials
  6. Team

Technology Stack

Frontend

flutter dart

Backend

flutter dart

Docker Instructions

Docker compose

From the project directory, start up the application by running docker compose up .


Build the backend docker image

Open the terminal from the backend folder and run the following command:

sudo docker image build -t se2team10/se2hiketracker:be .

This will build a Docker image with the name se2team10/se2hiketracker and tagname be.

Push the image on docker hub

Run the following command:

docker push se2team10/se2hiketracker:be

Run the backend image container

Run the following command:

docker run -p 8080:5000 se2team10/se2hiketracker:be

This command binds the port 5000 configured in the container to the TCP port 8080, accessible from the browser.


Build the frontend docker image

Open the terminal from the frontend folder and run the following command:

sudo docker image build -t se2team10/se2hiketracker:fe .

This will build a Docker image with the name se2team10/se2hiketracker and tagname fe.

Push the image on docker hub

Run the following command:

docker push se2team10/se2hiketracker:fe

Run the frontend image container

Run the following command:

docker run -p 8080:5000 se2team10/se2hiketracker:fe

This command binds the port 5000 configured in the container to the TCP port 8080, accessible from the browser.

API Server

GET

  • /api/sessions/current

  • /api/hike

  • /api/hikesdetails/:hike_ID

  • /api/sendEmail

  • /api/user/verify/:token

  • /api/hut

  • /api/hutWithFilters

  • /api/completedHike

  • /api/parkingFromHike/:hike_ID

  • /api/getOnGoingHike

  • /api/locationToLinkHutOrParking

  • /api/linkHut/:hike_ID

  • /api/linkParking/:hike_ID

  • /api/user/verify/:token

  • /api/pointToLinkHut

  • /api/regions

  • /api/provinces/:region_ID

  • /api/municipalities/:province_ID

  • /api/border/:ID

POST

  • /api/sessions

  • /api/hike

  • /api/getReferencePointByHike/:hike_ID

  • /api/getAllReferencePointByHike/:hike_ID

  • /api/getGenericHutsPointByHike/:hike_ID

  • /api/addSchedule

  • /api/gpx

  • /api/addUser

  • /api/addHut

  • /api/addParking

  • /api/addReferencePoint

  • /api/linkHut

  • /api/linkParking

  • /api/linkReferencePoint

PUT

  • /api/id/:setVerified

  • /api/updateSchedule

  • /api/updateRefReached

DELETE

  • /api/sessions/current

Database tables

Table hike contains all the hikes details

ID name length (km) expected_time (h) ascent (m) difficulty start_point end_point description
1 Monte Tivoli 5 02:00 410 T Crissolo Monte Tivoli Really easy and frequented hike

Table location contains all the information of one specific point

location_name latitude longitude city province hike_ID start_end
Crissolo 44.415886 7.09184 Crissolo Cuneo 1 start

Table user contains all user details

ID name surname mail password salt role verified
2 Jennifer Lopez jennifer.lopez@hike.it 8b6050d373a65ad78349c9baa7c9b93b60c4ce7c4de47b9ac6f0e57afebd36c8 44f4316added2354 Local guide 1

Table parking_lot contains all the parking lot

ID name capacity latitude longitude city province user_ID
1 Parcheggio di Cortavetto 100 45.10281 7.16555 Cortavetto Torino 3

Table reference_point contains all the reference point for each hike

ID name type latitude longitude city province user_ID
1 Villaggio Albaron village 45.30241 7.224057 Balme Torino 1

Table hut contains all the huts

ID name description opening_time closing_time bed_num altitude latitude longitude city province phone mail website user_ID
1 Rifugio Ca Asti string description 08:00 22:00 60 2854 45.10281 7.16555 Rocciamelone Torino phone number jennifer.lopez@hike.it www.hikers.it 1

Table hike_user contains relation between table hike and table user

hike_ID user_ID
1 1

Table hike_gpx contains relation between table hike and table hike_gpx

ID gpx hike_ID
1 string xml 1

Table hike_user_ref contains relation between table hike , table user and table reference_point

hike_ID user_ID ref_ID ref_type
5 1 2 point

Table hike_user_parking contains relation between table hike , table user and table parking lot

hike_ID user_ID parking_ID ref_type
32 3 3 point

Table hike_user_hut contains relation between table hike , table user and table hut

ID path hut_ID type
3 1 1 point

Table hike_image contains all the images

hike_ID user_ID hike_ID ref_type
1 path 1 cover

Table border contains the coordinates that delimit a municipality

ID coordinates
1001 set of coordinates

Table municipality contains all the cities for each province

ID name province_ID
1272 Torino 1

Table province contains all the provinces of Piedmont

ID name province_ID
1 1 Torino

Table region contains all Italian regions

ID name
1 Piemonte

Users credentials

  • Local guide
Email: john.doe@hike.it
Password: Localguide1!
Email: jennifer.lopez@hike.it
Password: Localguide1!
Email: massimiliano.allegri@hike.it
Password: Localguide1!
  • Platform manager
Email: sandra.bullock@hike.it
Password: Manager4!
  • Hiker
Email: orlando.bloom@hike.it
Password: Hikerhiker2!
Email: julia.roberts@hike.it
Password: Hikerhiker2!
Email: tom.cruise@hike.it
Password: Hikerhiker2!
  • Hut worker
Email: lady.gaga@hike.it
Password: Hutworker3!
Email: ed.sheeran@hike.it
Password: Hutworker3!
Email: katy.perry@hike.it
Password: Hutworker3!

Team members

Matricola Surname Name
s301270 Gangemi Lorenzo
s305535 Santo Lorenzo
s299724 Zhu Fayou
s306136 Di Benedetto Giovanna
s303280 Mlaiji Manar
s295413 Giangreco Samuele

About

This is the official repository for the Hike Tracker Project, developed by Team 10 from the Software Engineering II Course at Politecnico di Torino.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published