Skip to content

Latest commit

 

History

History
75 lines (69 loc) · 2.48 KB

README.md

File metadata and controls

75 lines (69 loc) · 2.48 KB

ERP - Java Trainees 2023

Project for Trainees deployed on Koyeb

Client Requirement

As a Guest user, I can

  • view homepage
  • Sign Up to be an employee with minimal information

As an Admin user, I can

  • Log in
  • VIEW & EDIT my profile info (first name, last name...)
  • CRUD Users
  • CRUD Roles (Only 2 Roles: ADMIN, Employee)
  • CRUD Organizations
  • CRUD Employees
  • Log out

As an Employee user, I can

  • Log in
  • VIEW & EDIT my profile info (first name, last name...)
  • VIEW My Account Balance
  • VIEW Organizations
  • Log out

Technology

  • Language: Java 17
  • Build Tool: Gradle
  • Spring Boot: 2.7.10
  • Database: H2

Features

  • Server-Side (using Template Engine)
    • /login ()
    • /users
    • /roles
    • /organizations
    • /employees
  • REST API
    • /api/login (JWT)
    • /api/signup (public)
    • /api/users (secured, authorized to ADMIN only)
    • /api/roles (secured, authorized to ADMIN only)
    • /api/organization (secured, authorized to ADMIN for CRUD, VIEW for EMPLOYEE)
  • API Doc: Swagger
  • Mapper: Mapstruct
  • Code Formatter: Spotless
  • Apply Spring Security
  • Global Exception Handler
  • Implement JPA Auditing
  • Write Unit Test
  • Setup different database driver in a different profile
  • Config CORS
  • Upgrade to Spring Boot 3
  • Deployment (profile: develop)
  • Update Documentation (README.md)

How to Build & Run

  1. Install Java 17 (LTS) of any distribution. You can try Amazon Corretto 17. You can find the installation instructions here: https://docs.aws.amazon.com/corretto/latest/corretto-17-ug/what-is-corretto-17.html
  2. Open this project with your preferred IDE. We prefer IntelliJ IDEA Ultimate Edition. Other IDEs like VS Code or Spring Tools Suite (STS) will do.
  3. To build the project execute the following command:
    ./gradlew clean build
    
    Executing that command will generate a jar under "build/libs" folder which you can run using the following command:
    java -jar erp-0.0.1-SNAPSHOT.jar
    
    or, You can run the app directly by following the command:
    ./gradlew bootRun
    
    or, you can run via your preferred IDE's RUN/PLAY button.
  4. After running the application, it will be up & running at http://localhost:8080
  5. You can also access the Swagger API Doc at: http://localhost:8080/swagger-ui/index.html# . You can go ahead and execute the Organization's REST APIs I prepared for you guys to play with.