Skip to content

DeepsanBhandari/Role-BasedJobPortalSystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Role-Based Job Portal Backend

Production-focused backend system built with Java & Spring Boot.
Demonstrates real-world backend concerns: authentication, authorization, business rules, testing, and CI.


Overview

This project is a role-based Job Portal backend designed to reflect how backend services are built and secured in real systems.

The focus is not UI, but:

  • enforcing business rules centrally
  • securing APIs correctly
  • keeping the system safe even if controllers change

Supported roles: Employer, Job Seeker


Core Backend Responsibilities Covered

  • REST API design
  • Stateless authentication using JWT
  • Role-based authorization
  • Service-layer business rule enforcement
  • Layered architecture (Controller → Service → Repository)
  • PostgreSQL persistence using JPA
  • Unit testing of critical logic
  • Continuous Integration (CI)

Tech Stack

  • Language: Java 17
  • Framework: Spring Boot, Spring MVC, Spring Security
  • Authentication: JWT (stateless)
  • Database: PostgreSQL, Hibernate / JPA
  • Testing: JUnit 5, Mockito
  • Build Tool: Maven
  • CI: GitHub Actions (Maven build, Java 17)
  • Deployment: AWS EC2 (environment-based configuration)

Architecture

controller/   -> REST endpoints
service/      -> Business logic & authorization rules
repository/   -> Data access (JPA)
dto/          -> API contracts
security/     -> JWT filters & security configuration
exception/    -> Global exception handling
config/       -> Application configuration

Key principle:
Authorization and validation are enforced in the service layer, not only at the controller level.


Functional Capabilities

Job Seeker

  • Register & login
  • Apply to job postings
  • View application history

Employer

  • Create, update, and delete job postings
  • View applicants
  • Accept or reject applications

Public

  • Browse job listings

Security Model

  • JWT-based stateless authentication
  • Role-based authorization (Employer vs Job Seeker)
  • Ownership checks for employer-managed job posts
  • Protection against unauthorized actions and invalid state changes

The system remains secure even if endpoints are misused.


Testing

Unit tests are written for critical backend logic, including:

  • authorization rules
  • prevention of duplicate job applications
  • job ownership validation
  • invalid operations and error cases

Testing focuses on service-layer behavior, not controller wiring.


CI / Build

  • GitHub Actions CI pipeline
  • Automatically builds the project on every push
  • Uses Java 17 and Maven
  • Ensures the backend compiles before merge

How to Run Locally

  1. Clone the repository
  2. Configure PostgreSQL credentials in application.yml
  3. Run the application:
    mvn spring-boot:run
  4. Test APIs using Postman or any REST client
  5. Authenticate to access protected endpoints (JWT required)

Deployment

  • AWS EC2
  • Any JVM-compatible cloud environment
  • Docker-supported platforms

Developer

Deepsan Bhandari
Backend Java Developer (Spring Boot)
Email: deepsanbhandari7@gmail.com
GitHub: github.com/DeepsanBhandari
LinkedIn: linkedin.com/in/deepsan7


Purpose of This Repository

This project exists to demonstrate:

  • backend engineering fundamentals
  • secure API design
  • disciplined architecture
  • readiness to contribute to real backend codebases

About

Spring Boot backend demonstrating service-layer authorization, JWT-based security, and role-driven business rules for a job portal system.

Topics

Resources

Security policy

Stars

Watchers

Forks

Contributors

Languages