Coder Social home page Coder Social logo

gzheyts / productsapp Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 265 KB

Demo application with Spring Boot and ReactJS, bootstrapped with JHipster and create-react-app

License: MIT License

Java 58.45% JavaScript 41.28% HTML 0.27%
redux middleware liquibase jpa jwt-token reactstrap axios spring-security dto rest-api java8 maven jhipster validation typeahead pagination grid spring-boot form create-react-app

productsapp's Introduction

Build Status License: MIT

ProductsApp

Screenshot from running application

About

This demo project was bootstrapped with create-react-app, spring-boot-v2 and also jhipster.

Try deployed instance with Heroku productsapp

Goals

The main goal is to integrate various technologies and principles in a single full-stack application.

Dependencies

Backend

Frontend

Overview

Clone project with

    git clone github.com/gzheyts/productsapp <project_root>

Running application

mvn -f <project_root>/pom.xml spring-boot:run 

Then navigate to localhost:8080

Running API

mvn -f <project_root>/pom.xml spring-boot:run -Dskip.yarn

This will run api on localhost:8080/api

Running Frontend dev server

cd <project_root>/src/main/webapp
yarn start

Will run frontend dev server at localhost:3000

Running server-side tests

To launch application's tests, run:

mvn -f <project_root>/pom.xml test -Dskip.yarn

API usage examples httpie

Register user request

http POST :8080/users/register username="user" password="password"

response

HTTP/1.1 200 
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Length: 0
Expires: 0
Pragma: no-cache
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block

Obtain JWT auth token for registered user

http POST :8080/login username="user" password="password"

response

HTTP/1.1 200 
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE1MzMxOTgxNTYsInN1YiI6InVzZXIifQ.zvw99k1_Nh1UTNI6ZCBHL3v6-boXvuiyBNEcFM2LVhW0Rc6pAN7lEEJpXcSsOrJy0_9ifzgcJvCJTE9C1hW-ig
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Length: 0
Expires: 0
Pragma: no-cache
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block

Access protected resources

http :8080/api/categories Authorization:"Bearer eyJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE1MzMxOTgxNTYsInN1YiI6InVzZXIifQ.zvw99k1_Nh1UTNI6ZCBHL3v6-boXvuiyBNEcFM2LVhW0Rc6pAN7lEEJpXcSsOrJy0_9ifzgcJvCJTE9C1hW-ig"

response


HTTP/1.1 200 
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Type: application/json;charset=UTF-8
Expires: 0
Pragma: no-cache
Transfer-Encoding: chunked
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block

{
    "content": [... ],
    "page": 0,
    "pageSize": 20,
    "total": 5
}

Logout

http :8080/logout Authorization:"Bearer eyJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE1MzMxOTgxNTYsInN1YiI6InVzZXIifQ.zvw99k1_Nh1UTNI6ZCBHL3v6-boXvuiyBNEcFM2LVhW0Rc6pAN7lEEJpXcSsOrJy0_9ifzgcJvCJTE9C1hW-ig"

productsapp's People

Contributors

gzheyts avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

stefanofiorenza

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.