Code Monkey home page Code Monkey logo

spring-react-starter's Introduction

Build info:

Build Status Build Status Maintainability Test Coverage

Preview

Application available for preview on Heroku, login/password is admin/admin.

What is it

It's a starter for rapid application development with Spring Boot on backend and React on frontend. This application includes the following:

  • Configured Spring Security for protecting restricted resources.
  • Configured UserDetailsService for storing user information in database. Also, UserManager automatically creates administrator if it's not present. Admin's login is in application.yml configuration file, password will be printed to console at first run.
  • Configured REST authentication.
  • Configured CORS policy.
  • UI for user's management.
  • Part of dashboard with user management.
  • Travis-CI pipeline for application build, frontend and backend tests. I'm going to add automated deploy to Heroku in future releases.
  • Docker environment with PostgreSQL and pgAdmin (login/password for admin page is admin/admin). There is a special environment configuration for Windows because of issue with DB files storage.
  • Frontend is created with create-react-app as ordinary, promise middleware also was implemented.

How to use it

First of all, it's necessary to fork this repository (you can star it as well) and start your development in your favorite IDE. Backend runs on 8080 port, frontend is on 3000.

To start application the following commands might be executed:

./gradlew frontend:start
./gradlew bootRun -Dspring.profiles.action=dev

Also backend can be runned using some Spring Boot Starter in your IDE, most of them support it.

Both backend and frontend have hot update - frontend because of NodeJS server, frontend because of Spring Boot Dev Tools.

How to build it

There is a task for building single jar with backend and frontend.

./gradlew release

This task creates dist directory with app.jar file.

Heroku configuration

Application includes application-cloud.yml and Procfile for automated deploy to Heroku. Necessary stage task is also included.

Don't forget to add PostgreSQL provision.

Future plans

The following improvements are planned:

  • React DevTools for state monitoring
  • Misc

spring-react-starter's People

Contributors

aabarmin avatar

Watchers

 avatar

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.