TheBasic uses a number of projects to work properly:
- Spring Boot - Open source Java-based framework
- Maven Maven is a powerful project management tool that is based on POM (project object model)
- MySQL - Open-source relational database management system.
- AWS S3 - Amazon Simple Storage Service (Amazon S3) is an object storage service [Used for storing images].
- JJWT - JSON Web Token Support For The JVM
- Hibernate - More than an ORM
- HikariCP - HikariCP is a "zero-overhead" production ready JDBC connection pool
- Postman Simplify each step of building an API and streamline collaboration so you can create better APIs
The following items should be installed in your system:
- Java 8 or newer.
- git command line tool (https://help.github.com/articles/set-up-git)
- Your preferred IDE
- Eclipse
- Spring Tools Suite (STS)
- VS Code
Feature | Route |
---|---|
User registration with ROLE_USER | [ /api/account/register ] |
User login | [ /api/account/login ] |
User token refresh | [ /api/account/token/refresh ] |
User logout | [ /api/account/logout ] |
User profile picture or some image upload | [ /api/images/upload ] |
Get user details | [ /api/user/get ] |
Update user password | [ /api/user/update/password ] |
Update user details | [ /api/user/update/details ] |
The application needs mysql database. Before running make sure you have added database config in src/main/resources/application.yaml
spring:
datasource:
url: jdbc:mysql://sql12.freemysqlhosting.net:3306/sql12347916?useSSL=false&serverTimezone=UTC&useLegacyDatetimeCode=false&useSSL=false&createDatabaseIfNotExist=true
username: thebasicuser
password: wrongpassword
For testing you can create some free online mysql db instance from websites like https://www.freemysqlhosting.net/
In src/main/resources/application.yaml, Please add properties under 'amazonProperties'
amazonProperties:
endpointUrl: https://s3.us-east-2.amazonaws.com
accessKey: HEMANT-THEBASIC
secretKey: YES-ITS-DUMMY
bucketName: www.hemantdemo.com
Source src/main/resources/application.yaml
webapp:
auth:
tokenSecret: 926D96C90030DTHEBASICYA581BDBBC
tokenExpirationMsec: 86400000
Source src/main/resources/application.yaml
hikari:
minimumIdle: 5
maximumPoolSize: 15
connectionTimeout: 30000
idleTimeout: 600000
maxLifetime: 1800000
./mvnw spring-boot:run
./mvnw clean install