Skip to content

Latest commit

Β 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’Ό Job & Internship Application Tracker Backend

Java Spring Boot Spring Security PostgreSQL Docker Render

A production-ready Job & Internship Application Tracker Backend Application built with Spring Boot 3, Spring Security (JWT), Spring Data JPA, PostgreSQL, H2 In-Memory Database, Docker, Spring Mail, and Swagger UI.

🌐 Live Deployed Application URL: https://job-and-internship-application-tracker.onrender.com
πŸ“‘ Live Interactive Swagger UI: https://job-and-internship-application-tracker.onrender.com/swagger-ui.html

This repository is crafted in a beginner student-friendly style with explicit getters, setters, constructors, builders, and detailed Hinglish comments throughout the codebase to help students understand, learn, and present Spring Boot backend architecture easily!


πŸ—οΈ Architecture Overview

graph TD
    Client[Client / Postman / Swagger / Frontend] --> REST[REST Controllers]
    REST --> AuthCtrl[Auth Controller]
    REST --> AppCtrl[Job Application Controller]
    REST --> DashCtrl[Dashboard Controller]
    REST --> RemindCtrl[Reminder Controller]
    
    AuthCtrl --> Sec[Spring Security + JWT]
    AppCtrl --> AppService[Job Application Service]
    DashCtrl --> DashService[Dashboard Service]
    RemindCtrl --> MailService[Email Reminder Service]
    
    AppService --> FileService[File Storage Service]
    AppService --> Repo[JPA Repositories]
    DashService --> Repo
    Sec --> UserRepo[User Repository]
    
    Repo --> DB[(PostgreSQL / H2 Database)]
    FileService --> Storage[(Local File Storage ./uploads)]
    MailService --> SMTP[SMTP Server / Spring Mail]
Loading

πŸ“‚ Project Layout

f:\Job & Internship Application Tracker
β”œβ”€β”€ .mvn/                              # Maven Wrapper
β”œβ”€β”€ uploads/                           # Resume file uploads storage
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main/
β”‚   β”‚   β”œβ”€β”€ java/com/tracker/job/
β”‚   β”‚   β”‚   β”œβ”€β”€ JobTrackerApplication.java
β”‚   β”‚   β”‚   β”œβ”€β”€ config/                # Security, Swagger, Mail, Web Config
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ SecurityConfig.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ OpenApiConfig.java
β”‚   β”‚   β”‚   β”‚   └── DataInitializer.java
β”‚   β”‚   β”‚   β”œβ”€β”€ controller/            # REST API Controllers
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AuthController.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ JobApplicationController.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ DashboardController.java
β”‚   β”‚   β”‚   β”‚   └── ReminderController.java
β”‚   β”‚   β”‚   β”œβ”€β”€ dto/                   # Request & Response DTOs
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ request/
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ RegisterRequest.java
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ LoginRequest.java
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ JobApplicationRequest.java
β”‚   β”‚   β”‚   β”‚   β”‚   └── StatusUpdateRequest.java
β”‚   β”‚   β”‚   β”‚   └── response/
β”‚   β”‚   β”‚   β”‚       β”œβ”€β”€ AuthResponse.java
β”‚   β”‚   β”‚   β”‚       β”œβ”€β”€ UserDto.java
β”‚   β”‚   β”‚   β”‚       β”œβ”€β”€ JobApplicationResponse.java
β”‚   β”‚   β”‚   β”‚       β”œβ”€β”€ DashboardStatsResponse.java
β”‚   β”‚   β”‚   β”‚       β”œβ”€β”€ ApiResponse.java
β”‚   β”‚   β”‚   β”‚       └── PagedResponse.java
β”‚   β”‚   β”‚   β”œβ”€β”€ exception/             # Custom Exceptions & Global Handler
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ResourceNotFoundException.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ BadRequestException.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ FileStorageException.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ UnauthorizedAccessException.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ErrorDetails.java
β”‚   β”‚   β”‚   β”‚   └── GlobalExceptionHandler.java
β”‚   β”‚   β”‚   β”œβ”€β”€ model/                 # JPA Entities & Enums
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ User.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Role.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ JobApplication.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ApplicationStatus.java
β”‚   β”‚   β”‚   β”‚   └── JobType.java
β”‚   β”‚   β”‚   β”œβ”€β”€ repository/            # Spring Data Repositories
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ UserRepository.java
β”‚   β”‚   β”‚   β”‚   └── JobApplicationRepository.java
β”‚   β”‚   β”‚   β”œβ”€β”€ security/              # JWT & Spring Security Utilities
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ JwtTokenProvider.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ JwtAuthenticationFilter.java
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ JwtAuthenticationEntryPoint.java
β”‚   β”‚   β”‚   β”‚   └── CustomUserDetailsService.java
β”‚   β”‚   β”‚   └── service/               # Service Layer & Implementations
β”‚   β”‚   β”‚       β”œβ”€β”€ AuthService.java
β”‚   β”‚   β”‚       β”œβ”€β”€ JobApplicationService.java
β”‚   β”‚   β”‚       β”œβ”€β”€ DashboardService.java
β”‚   β”‚   β”‚       β”œβ”€β”€ EmailReminderService.java
β”‚   β”‚   β”‚       β”œβ”€β”€ FileStorageService.java
β”‚   β”‚   β”‚       └── impl/
β”‚   β”‚   β”‚           β”œβ”€β”€ AuthServiceImpl.java
β”‚   β”‚   β”‚           β”œβ”€β”€ JobApplicationServiceImpl.java
β”‚   β”‚   β”‚           β”œβ”€β”€ DashboardServiceImpl.java
β”‚   β”‚   β”‚           β”œβ”€β”€ EmailReminderServiceImpl.java
β”‚   β”‚   β”‚           └── FileStorageServiceImpl.java
β”‚   β”‚   └── resources/
β”‚   β”‚       β”œβ”€β”€ application.properties
β”‚   β”‚       └── application-dev.properties
β”‚   └── test/                          # Unit & Integration Tests
β”œβ”€β”€ Dockerfile                         # Multi-stage Docker build
β”œβ”€β”€ docker-compose.yml                 # App + PostgreSQL orchestration
β”œβ”€β”€ pom.xml                            # Dependencies & plugins
└── Job_Tracker_Postman_Collection.json # Importable Postman collection

🎯 Key Features

  • User Authentication & Authorization:

    • Secure Registration & Login endpoints.
    • Stateless JWT (JSON Web Token) Bearer authentication.
    • Role-based Access Control (ROLE_USER, ROLE_ADMIN).
    • BCrypt Password Hashing.
  • Job Application Tracking (CRUD):

    • Add, View, Update, and Delete Job/Internship Applications.
    • Tracking fields: Company Name, Job Title, Job Type (FULL_TIME, INTERNSHIP, PART_TIME, CONTRACT), Location, Salary/Stipend, Applied Date, Deadline, Interview Date, Notes, and Job Posting Link.
    • Application Lifecycle Status Workflow: APPLIED β†’ OA (Online Assessment) β†’ INTERVIEW β†’ SELECTED / REJECTED.
  • Multi-Criteria Search, Filtering & Pagination:

    • Search applications by Company, Job Title, or Location.
    • Filter applications by status (APPLIED, OA, INTERVIEW, SELECTED, REJECTED).
    • Paginated & Sorted REST API responses (Pageable, Sort).
  • Resume Attachment Handling:

    • Upload PDF, DOC, or DOCX resume files for specific applications.
    • Secure local file storage (./uploads/resumes/).
    • Download attached resume files via REST API.
    • Delete resume attachments.
  • Dashboard Analytics & Statistics:

    • Total application metrics.
    • Status breakdown counts (Applied, OA, Interview, Selected, Rejected).
    • Calculated Response Rate % & Selection Rate %.
    • Upcoming deadlines widget (next 7 days).
    • Recent applications list.
  • Automated Email Reminders:

    • Scheduled background cron job (@Scheduled(cron = "0 0 9 * * ?")) checking application deadlines within 48 hours and sending HTML formatted reminder emails via Spring Boot Starter Mail.
    • Test email trigger endpoint.
  • Developer & Deployment Assets:

    • Swagger UI interactive documentation (/swagger-ui.html).
    • H2 Web Console (/h2-console).
    • Multi-stage Dockerfile and docker-compose.yml.
    • Ready-to-import Postman Collection (Job_Tracker_Postman_Collection.json).

πŸš€ Getting Started

Prerequisites

  • Java 17 or higher
  • Maven (or use included ./mvnw.cmd wrapper)
  • Docker & Docker Compose (Optional, for containerized run)

Running Locally with H2 Database (Fastest - Zero DB Setup)

# Clone the repository
git clone https://github.com/krishna3163/Job-And-Internship-Application-Tracker.git
cd Job-And-Internship-Application-Tracker

# Run using Maven Wrapper
.\mvnw.cmd spring-boot:run

Once started:

Running with Docker Compose (PostgreSQL DB + App Container)

docker-compose up --build

🌐 Free Deployment on Render.com

Iss project ko Render.com par 100% Free deploy karne ke liye simple steps:

  1. Render.com par account banayein aur New + > Web Service select karein.
  2. Apne GitHub repository krishna3163/Job-And-Internship-Application-Tracker ko connect karein.
  3. Configuration settings set karein:
    • Name: job-tracker-backend
    • Language / Environment: Docker
    • Region: Singapore (or nearest)
    • Instance Type: Free
  4. Environment Variables add karein:
    • SPRING_PROFILES_ACTIVE: dev (H2 Database ke liye instant deployment without external DB)
    • APP_JWT_SECRET: 9a2f8c4e6b1d3a5f7e9c2b4a6d8f1e3c5a7b9d2e4f6a8c1e3b5d7f9a2c4e6b1d
  5. Create Web Service par click karein. Application live URL https://job-and-internship-application-tracker.onrender.com par start ho jaayegi! πŸŽ‰

πŸ”‘ Default Credentials (Seed Data)

On application startup, demo user and 5 sample applications (Google, Microsoft, Amazon, Flipkart, Adobe) are automatically created:

  • Username: demo_student
  • Email: user@example.com
  • Password: password123

πŸ§ͺ Beginner Guide: How to Use Swagger UI & Test APIs (Kaam Kar Raha Hai Ki Nahi)

Agar aap beginner hain aur check karna chahte hain ki APIs live kaam kar rahi hain ya nahi, to Swagger UI sabse simple interactive testing tool hai!

πŸ“Œ Step-by-Step Testing Guide:

1. Swagger UI Interface Open Karein

Browser me live URL ya local link kholein:

2. User Login API Test Karein & JWT Token Praapt Karein

  1. Section 1. Authentication me POST /api/v1/auth/login par click karein.
  2. Top-right side me Try it out button dabayein.
  3. Request body me sample student credentials pass karein:
    {
      "usernameOrEmail": "user@example.com",
      "password": "password123"
    }
  4. Execute button par click karein.
  5. Response me 200 OK milega aur JSON data me accessToken (long JWT string) dikhega. Us token string ko Copy kar lein.

3. Swagger UI me Bearer Token Authorize Karein

  1. Swagger page ke bilkul top-right me 🟒 Authorize πŸ”“ button par click karein.
  2. Value box me copied accessToken string paste karein.
  3. Authorize click karke Close dabayein. (Ab sabhi protected endpoints aapke token se automatically verify ho jayenge!)

4. Dashboard Stats & Job Applications Test Karein

  • Dashboard Metrics Check: Section 3. Dashboard Analytics -> GET /api/v1/dashboard/stats -> Try it out -> Execute. Aapko live statistics (totalApplications: 5, response rate 80.0%, status counts) return honge!
  • Job Applications Search Check: Section 2. Job Applications Management -> GET /api/v1/applications -> Execute. Saari job applications paginated JSON format me fetch hongi!

πŸ“‘ REST API Endpoints Summary

1. Authentication (/api/v1/auth)

Method Endpoint Description Public / Protected
POST /api/v1/auth/register Register new user account Public
POST /api/v1/auth/login Login user & receive JWT token Public
GET /api/v1/auth/me Fetch logged-in user profile Protected (JWT)

2. Job Applications (/api/v1/applications)

Method Endpoint Description Public / Protected
POST /api/v1/applications Create new job application Protected (JWT)
GET /api/v1/applications Get paginated applications (with search & filter) Protected (JWT)
GET /api/v1/applications/{id} Get application details by ID Protected (JWT)
PUT /api/v1/applications/{id} Update application details Protected (JWT)
PATCH /api/v1/applications/{id}/status Quick status transition (APPLIED β†’ OA β†’ INTERVIEW) Protected (JWT)
DELETE /api/v1/applications/{id} Delete application Protected (JWT)
POST /api/v1/applications/{id}/resume Upload & attach PDF/DOCX resume Protected (JWT)
GET /api/v1/applications/{id}/resume Download attached resume file Protected (JWT)
DELETE /api/v1/applications/{id}/resume Remove attached resume Protected (JWT)

3. Dashboard Analytics (/api/v1/dashboard)

Method Endpoint Description Public / Protected
GET /api/v1/dashboard/stats Fetch application metrics, status counts & rates Protected (JWT)

4. Email Reminders (/api/v1/reminders)

Method Endpoint Description Public / Protected
POST /api/v1/reminders/test-email Trigger test email to logged-in user Protected (JWT)
POST /api/v1/reminders/trigger-deadlines-job Manually run deadline reminder scan Protected (JWT)

πŸ“¬ Postman Collection Usage

  1. Open Postman and click Import.
  2. Select Job_Tracker_Postman_Collection.json from project root directory.
  3. Execute the Login User request under 1. Authentication.
  4. The test script will automatically capture and save the Bearer JWT token into {{jwt_token}} for all subsequent requests!

πŸ’» Hinglish Comments Code Style Sample

/**
 * JobApplicationServiceImpl: Job Applications business logic implementation.
 */
@Service
public class JobApplicationServiceImpl implements JobApplicationService {

    // Helper: Application ID verify karna aur Security Ownership Check karna
    private JobApplication getApplicationAndVerifyUser(Long applicationId, User user) {
        JobApplication application = jobApplicationRepository.findById(applicationId)
                .orElseThrow(() -> new ResourceNotFoundException("JobApplication", "id", applicationId));

        // Security Check: Verify that logged-in user owns this job application
        if (!application.getUser().getId().equals(user.getId())) {
            throw new UnauthorizedAccessException("Aap is job application ko access ya modify nahi kar sakte!");
        }

        return application;
    }
}

πŸ‘¨β€πŸ’» Author

About

Job & Internship Application Tracker Backend built with Java 17, Spring Boot 3, Spring Security, JWT, PostgreSQL, Docker, and Swagger UI.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages