Skip to content

Software Construction course, 2020. RESTful API using Spring Boot and Spring MVC. Node.js application

License

Notifications You must be signed in to change notification settings

SirojiddinSaidmurodov/RESTaurantCompanion-server

Repository files navigation

RESTaurant Companion (server)

This application build according the software constructing course in 2020 autumn. The main goals of making this server to get know how to build REST-ful API and how to use rules of REST for making web applications. I made the server for application called RESTaurant companion, which can be used for administrating the orders in cafes, restaurants or somewhere like that.

Content

Building database

I used MySQL 8.0 as my SQL-server

scheme

The ER-diagram of database

❕I used INT to represent enum value from user class:

CREATE TABLE IF NOT EXISTS `user`
(
    id         SERIAL PRIMARY KEY,
    `name`     CHAR(40),
    `login`    CHAR(40),
    `password` CHAR(255),
    `userType` INTEGER DEFAULT 0 NOT NULL
) comment = 'Basic user entity';

❗For running Java code you will need to create user (my database is called restaurant):

CREATE USER 'rest_comp'@'localhost' IDENTIFIED WITH sha256_password BY 'password';
GRANT ALL ON restaurant.* TO 'rest_comp'@'localhost';

You can find SQL-script used for building the database here.

RESTful web-server

❕You can use Postman for testing your REST API

RESTaurant Companion

Read more about Spring and REST API

Spring Guide

Architectural Styles and the Design of Network-based Software Architectures. Roy Thomas Fielding

Client web-application

You can find client web application here

Developing yourself

❗ For running RESTful server you need any SQL server running on your machine (or sql-server on a container if you're running Docker)

Running

  1. Install MySQL or any other SQL-server. Run the schema.sql and create user rest_comp with the password password.

  2. Make sure that you have JRE.

  3. Download the latest JAR package from releases and run:

     java -jar "RESTaurant companion.jar"

Development

You will need the JDK 14.

  1. Clone the repository.

  2. Open in IntelliJ IDEA.

About

Software Construction course, 2020. RESTful API using Spring Boot and Spring MVC. Node.js application

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages