Skip to content

michal-luczak/JobOffers-SpringBootApplication

Repository files navigation

Job Offers - Backend

This project is a web application created in Spring Boot which allows users to search for and add new job offers. To build the architecture of the project, I used the Ports-and-Adapters pattern. This project's goal is to group offers from all sites in one place. You can check this project out by yourself on Swagger UI. If you want to see frontend also, you can go to JobOffers-ReactApp. To see full version of app deployed on AWS click here.

Diagram

ENDPOINT METHOD REQUEST RESPONSE FUNCTION
/token POST JSON BODY (credentials) JSON (JWT token) returns token after successfully authorization
/offers GET - JSON (offers) returns all offers
/offers POST JSON BODY (offer) JSON (uuid) creates new offer
/offers/{uuid} GET PATH VARIABLE (uuid) JSON (offer) returns offer with given uuid
/register POST JSON BODY (user) JSON (id) creates new user

Tech Stack

Code:
Static Badge Static Badge Postgres Redis MongoDB
Tests:
image image image image
CI/CD:
CircleCI
Other:
Docker Swagger image

Solved Problems

During the development of this project I had to face of a bunch of problems. These are a few of them.

  • Organize code with independent modules
  • Manage dependencies for these modules
  • Build code that is maximal encapsulated
  • Stick to predetermined architecture (Ports-and-Adapters)
  • Authorization with JWT token and Spring Security
  • Integration tests with TestContainers
  • Stick to the SOLID rules
  • AWS deploying with EC2 and ECR
  • Continuous integration and Continuous Deployment with CircleCi (to ECR AWS)
  • Organize work with GitHub flow

How to build the project on your own

To build the project:

  1. Clone the repository:
  2. git clone https://github.com/michal-luczak/JobOffers-SpringBootApplication.git
    
  3. Go to the folder with cloned repository
  4. Run the command:
  5. mvn package -DskipTests
    
  6. In folder target you should find a file named: application-{version}-SNAPSHOT.jar

To build the docker image with Docker Compose:

  1. Clone the repository:
  2. git clone https://github.com/michal-luczak/JobOffers-SpringBootApplication.git
    
  3. Go to the folder with cloned repository
  4. Run the command:
  5. docker-compose build
    
  6. By using:
    docker images
    

    You should see the image named as you set at services.job-offers.image on file docker-compose.yml. By default, it is the 509192113520.dkr.ecr.eu-central-1.amazonaws.com/job-offers:latest.

What I'm going to do in future

There are many things that I'm going to do in this project in the future. Few of them:

  • Hide the secrets (usernames and passwords for example to databases)
  • Add more parameters to Offers like: Company icon, more details about the offers etc.
  • Implement microservices architecture by using AWS, docker containerization and kafka for example
  • Add roles ADMIN, USER etc. Admins would be able to remove offers
  • Add email verification
  • Use the ElasticSearch to create opportunity to find some offers by title for example