Coder Social home page Coder Social logo

nehjoshi / job-application-tracker Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 168 KB

A secure, reliable and easy to configure job status tracker API built with Spring Boot, PostgreSQL, Redis and AWS S3. Deployed on EC2 through API Gateway proxy.

Java 99.83% Dockerfile 0.17%

job-application-tracker's Introduction

Job Application Tracker

A secure, reliable and easy to configure job status tracker API.

What This Application is About

This Spring Boot application allows clients to organize job applications in a sorted fashion, optimized for quick retrieval and modification. Furthermore, certain API routes add a more social feel to the application, wherein users can check out trending companies that other applicants apply to. There is a full authentication workflow using JSON Web Tokens (JWT) that will be used as a filter through Spring Security. Redis is also used for caching repeated database queries (PostgreSQL) and AWS S3 is used for storing user media.

Getting Started

Follow these steps for configuring and running the application.

  1. Install all dependencies using the pom.xml file (I've used Maven).
  2. Create a .env file inside the root directory. If you choose not to create an environment file, you can directly set the following environment variables through your IDE:
    1. DB_URI: The URI of your database (I'm using PostgreSQL)
    2. DB_USERNAME: The username of your DB
    3. DB_PASSWORD: The password of your DB
    4. JWT_SECRET: A hexadecimal 256-bit secret that will be used for JWTs
    5. S3_ACCESS_KEY: The access key of your S3 bucket
    6. S3_SECRET_KEY: The secret key of your S3 bucket
    7. S3_BUCKET_NAME: The name of your S3 bucket
  3. If you change the name of the above environment variables, make sure to update the /src/main/resources/application.yml file with these changes.
  4. Run the application.

Endpoints

There are three unprotected (i.e, unsecured) endpoints, that will not be passed through the security filter. These are:

  1. GET /api/v1/user: A test route. Returns "Hello World!"
  2. POST /api/v1/user/auth/register: Registration route. Returns EmailAlreadyExistsException for a reused email. Otherwise, returns a ResponseEntity object with a status code 201.
  3. POST /api/v1/user/auth/login: Returns IncorrectCredentialsException for wrong usernames/passwords. Otherwise, returns status code 200.

The following endpoints are secured through the security filter chain, and each request must have a valid bearer token in its 'Authentication' header:

  1. POST /api/v1/user/profile-picture: Accepts a multipart file with a maximum size of 1MB for profile picture. Returns IOException for any processing operations, otherwise a status code 201.
  2. GET /api/v1/user/profile-picture: Fetch user's profile picture. Returns IOException for any processing operations, otherwise a status code 200.
  3. POST /api/v1/application/new: Accepts an ApplicationDto object. Creates a new application associated with the user fetched from the security context holder and returns a status code 201.
  4. GET /api/v1/application/all/{pageNumber}: Returns a list of all applications of the specified page number, and if none found, returns an empty list. Note that the service function for this route is cached with Redis.
  5. PUT /api/v1/application/edit/{applicationId}: Accepts the ID of the application to be edited as the path variable, and the application as the request body. If application isn't found, returns ApplicationNotFoundException, otherwise returns 201.
  6. DELETE /api/v1/application/${applicationId}: Deletes an application with the specified ID. If application isn't found, returns ApplicationNotFoundException, otherwise returns 204.
  7. GET /api/v1/application?company-name={name}: Finds all applications of the authenticated user whose company names start with the specified company name. Returns an empty list for no applications found, with status code 200.
  8. GET /api/v1/application/social?page={}: Finds the most recent applications with the status "Applied" according to the page number. Returns 200.

job-application-tracker's People

Contributors

nehjoshi avatar

Stargazers

 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.