Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ratulsharker/webrest-starter

A scaffold project for starting a spring boot web, rest project.
https://github.com/ratulsharker/webrest-starter

bootstrap rest rest-api spring starter-project thymeleaf web

Last synced: 26 days ago
JSON representation

A scaffold project for starting a spring boot web, rest project.

Awesome Lists containing this project

README

        

# WebRest Starter #

This repository works as a scaffold for spring boot web mvc and rest service. This repository contains very common and basic implementation of authentication, authorization, user profile, user listing etc. It is mainly targeted for a product having admin panel for configuring data and serve rest services based on those configured data.

## Quick Start ##

You have to perform following steps to up and running

1. Pre requisites.
2. Clone the repostory.
3. Setup volume directories.
4. Build it.
5. Run it.

#### 1. Pre requisites ####
Following tools needed to be installled before starting

1. Maven
2. Java Development Kit (JDK 11+)
3. Docker

#### 2. Clone the repository ####
```sh
git clone https://github.com/ratulSharker/webrest-starter.git
```

#### 3. Setup volume directories ####
Inside the clone directories, create following directory structure where docker volume will be mounted.


webrest-starter
└── storage
├── mysql-data
├── root
└── temp

#### 4. Build it ####
Run following command to build the `jar` files inside the `target` folder.

```sh
mvn clean package
```

#### 5. Run it ####
Now run the project using docker as follows

```sh
docker-compose up
```

After running the project, all the necessary tables for project will be generated by hibernate. Visit http://localhost:8000/webrest-starter for the login screen.

Sample login using the following credential

- email : [email protected]
- password: secret

## Project Structure ##

There are three main packages

Common


This package contains common implementation for both REST & Web. It contains the configuration of beans, DTO declarations, Enum declaration, Entity declarations, Repository declaration, Service declarations and some Utils declarations.

REST


This package contains the implementation REST service specific. From the birds eye view, REST service's routes and controller declarations resides in this package. It shares the service portion from the Common package.

Web


This package contains Web related implementation. It declares a route file and their controller portion. Templates are served from templates inside of the resource folder. It shares the service implementations from Common package. For templating, Thymeleaf is being used. In the front end jQuery and Bootstrap is being used.