Skip to content

mcrayssac/SAE-S3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

357 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LAKESIDE SPORTS FESTIVAL 🏊🏼‍♀️

AN REST-API USING NODEJS, POSTGRESQL, VUEJS

    The goal of this project is to create an application with:

  • 👩‍💻 A visual part written in Javascript with VueJs.
  • 💻 A database implemented with PostgreSQL,
  • 💾 A server written in NodeJs, which is the link between the browser and the database, as a REST-API and which is also used to send Javascript created in VueJS to the browser.

    This organization allows the browser, through user interactions with the application's graphical interface, to send requests to the API server.

Depending on the type of request and its associated data (JSON objects), the API server will execute certain instructions to update the database, and/or extract informations from it to produce new data sent to the browser.

You can find more instructions here

PROTOTYPES AND STORYBOARDS

PUBLIC

https://trello.com/b/mL03H8Zy/storyboard-utilisateur

SERVICE PROVIDER

https://trello.com/b/cfiJzkql/storyboard-prestataire

ORGANIZER

https://trello.com/b/nnZTz9Kf/storyboard-organisateur


INSTALLATION

Clone the repository.

Before launching the application you must make sure you have a PostgreSQL and MongoDB database.

POSTGRESQL :

  1. Create a database named sae_s3

create database sae_s3;

  1. Launch the database creation script located in SAE-S3/BDD/script.sql \i script.sql

  2. Open the file in BDD/data.sql, this file will feed the BDD. You will see lines similar to this :

    \COPY AGE (libelle_age) FROM C:\Users\lena3\OneDrive\Documents\IUT_Windows\S3\SAE-S3\BDD\AGE.csv' DELIMITER AS ','; select * from AGE;

  3. Select with CTRL+R the path and replace it with your path to the BDD file. Example: C:\Users\yourName\Downloads\SAE-S3\BDD Return to your postgresql terminal, run the data.sql script:

\i data.sql

MONGODB :

  1. Open a terminal and head to SAE-S3/web_socket
  2. Run the mongosh command
  3. use sae_s3
  4. load("./database/insert/accounts.js")

load("./database/insert/messages.js")

The last step is to modify the PostgreSQL db.js file to connect to the database. The file is located in api/database/db.js. Open this file and modify the username and password with your credentials.

Now that the databases are in place here is how to launch the application:

  1. Open four terminals. Check that you are in the SAE-S3 directory. In the first terminal, run the following commands:
cd api
npm install
npm start
  1. Second terminal :
cd auth_api
npm install
npm start
  1. Third terminal :
cd vuejs
npm install
npm run serve
  1. Fourth terminal:
cd web_socket
npm install
npm start

Open the browser and go to http://localhost:8080


OVERVIEW OF THE WEBSITE

The website starts and we arrive at http://localhost:8080. On this page, you can find a summary of the festival which is a collection of donations for the association APF France Handicap.

alt text

Going on http://localhost:8080/map, we can find an interactive map with restaurants, clubs, shops and the association we work with. Filters are available on the right.

alt text

If a person wants to become a service provider, he may ask the organizer to become one.

alt text

Waiting for the organizer to accept the request ...

alt text

When the request is sent, the organizer can observe all the requests that has been sent to him.

alt text

Once the request is accepted, the service provider will now have an account.

About

SAE S3

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •