Skip to content

University project created for the purpose of running a gym during the covid-19 period, via an online reservation system.

Notifications You must be signed in to change notification settings

ambrosdavid/GymApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LinkedIn

Logo

Gym App

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. Demo

About The Project

Product Name Screen Shot

"GymApp" is a university project related to the "Databases" course created for the purpose of managing a gym during the covid-19 period, via an online booking system, completely built from scratch.

Respectively for front-end, back-end and database the following tools have been used:

  • Front-end: The Angular 13 framework was used.
  • Back-End: Python, Flask and SQLAlchemy were used.
  • Database: PostgreSQL

In addition, Docker was used to manage containers running the processes: Flask-App (back-end) and PosgreSQL database, in isolated environments!

This is a really basic project based on a single postgreSQL database which is connected from a single flask rest-applications server which in turn communicates with the basic front-end webpage. The purpose of this project is also to dockerize as much as possible, in order to, after-all enable a easy blue-red pipeline for CI/CD scope.

Built With

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

  1. You should have installed Docker here in your local machine.

  2. And also docker-compose here.

  3. Before proceeding with the build and run of the project be carefull on setting correctly the POSTGRES_HOST env variable inside the Dockerfile file.

  4. In order to set it correctly check your own local machine ip, and set it as you see.

Setup PostgreSQL(docker)

Command line for the PostgreSQL docker container :

  • In the same folder of docker-compose.yml run :

    docker-compose up -d
  • To see the image and container you just created :

    docker image ls
    docker ps

Setup Flask Application(docker)

Command list for the Flask docker container :

  • In the same folder of the Dockerfile run :

    docker build -t flask:0.1 .
    docker run -dit -p 5000:5000 flask:0.1
    docker container logs -f {id}
    

Usage

Now you can interact with the rest-application server with Postman, for example :

curl --location --request POST 'http://127.0.0.1:5000/add' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name" : "Ivan",
    "price" : 3000,
    "breed" : "type"
}'
curl --location --request GET 'localhost:5000/'

For more examples, please refer to the (work in progress) Documentation

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Demo

Gym web app:

demo

Object diagram:

schemaAoggetti

ER diagram:

Relazionale

(back to top)

About

University project created for the purpose of running a gym during the covid-19 period, via an online reservation system.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published