Skip to content

Evengelius/spring_fastfood

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot


Spring | Fast-Food

This is a fast-food application.

Getting Started

Spring(boot) takes care of everything on the back end | server side.

Before going further, please make sure you are processing the repositories in order as follow :

Installing

1. git clone https://github.com/Evengelius/spring_fastfood.git your_desired_name

2. // Change the Project SDK version to 14 | Intellij
   File | Project Structure | Project Settings: Project | Project SDK : 14

3. // application.properties
   #Database Connection
    spring.datasource.url= jdbc:mysql://localhost:3306/fastfood?useSSL=false&serverTimezone=UTC&useLegacyDatetimeCode=false
    spring.datasource.username=yourUsername
    spring.datasource.password=yourPassword
    
4. Test it | Postman.

Functionnalities

CRUD - Create | Read | Update | Delete
CRUD operations on tables :

  • Commande
  • Burger
  • Boisson
  • Serveur
    • This table manages the admin users.
      You need to be logged in as an admin in order to access the admin panel and perform admin tasks : angular side.

Exception handling
Errors on the server side are handled by various exceptions returning an HTTP status: 400 - 500 - 404.

Authentication management | Spring Security
Implementation of the JSON Web Token | JWT.

Data mapping management
Implementation of the Data Transfer Object or DTO, with MapStruct.

API Endpoints | Postman

You need to be authenticated in order to use these endpoints.
Also, here the example stands for commands.
It can replaced by : drinks, burgers, or users.

Finally, in order to use these endpoints, you need to be authenticated.

GET
       /api/commands
       /api/commands/{id}
POST
       /api/commands
PUT
       /api/commands/{id}
DELETE
       /api/commands/{id}

-----------------------------

Authentication | JWT

POST
       /api/users/register
POST
       /api/users/login

Once logged in, it generates a JWT, that you need to put in, Authorization | Type : Bearer Token, in order to access the page that requires an authentication.

Screenshots | Demo

Registration

Authentication | Register

Hibernate | Query

Hibernate | Query

Login | JWT generated

Authentication | Login

Authenticated | Show Endpoint

Authentication | Authenticated

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages