A boilerplate for Spring Boot
+ React
+ Typescript
projects with Hibernate
(H2
and MongoDB
)
Front-end:
React
andTypescript
boilerplate filesAntD
(Ant Design) React UI libraryAxios
promise-based HTTP Client
Back-end:
SpringBoot
boilerplate filesMaven
build project structureHibernate
Object Oriented Database ManagementH2
embedded database integrationMongoDB
NoSQL database integrationlog4j2
new generation loggingJUnit
unit tests
You should install above technologies and tools to your computer. You can search these instructions in Google.
First of all you need to configure the database. Properties are located in ./backend/src/main/resources/application.properties
file.
By default application is using H2 and MongoDB databases.
H2
in-memory database (name:testdb
).
MongoDB
database (name:demo-app-db
, user:user
, password:password
).
- Run
npm clean install --prefix frontend
to install front-end dependencies. - Run
npm run build:prod --prefix frontend
to build React/Typescript application. - Run
mvn clean compile -f backend
to compile a spring boot application. - Run
mvn install -f backend
to start spring boot application on embedded server.
By default
backend server
will be running on port8080
.
npm start --prefix frontend
to start front-end server for development.npm run start:prod --prefix frontend
to start front-end server with service-workers.mvn install -f backend
to start spring boot application on embedded server.
By default
frontend server
will be running on port3000
npm test --prefix frontend
- to run front-end unit tests.mvn test -f backend
- to run backend server tests.
Back-end:
- spring-boot-starter-web
- spring-boot-starter-security
- spring-boot-starter-data-jpa
- spring-boot-starter-data-mongodb
- spring-boot-starter-hateoas
- h2
- spring-kafka
- spring-boot-starter-log4j2
- lombok
- junit
- maven
Front-end:
springBoot-react-typescript-boilerplate
is released under the MIT License.