Latest commit

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ApplyDrive: Job Aggregator Hiring Platform

ApplyDrive is a high-performance, enterprise-grade job aggregator and off-campus recruitment platform designed to curate, organize, and streamline off-campus hiring opportunities. The application is built using a highly secure decoupled architecture featuring React SPA client portals and a robust Spring Boot REST API backend.


Java 17Spring Boot 3.3.0React 18.3.1ViteTailwindCSSDocker


Table of Contents

  1. Key Features
  2. Architecture Overview
  3. Technology Stack
  4. Project Directory Map
  5. Local Development Setup
  6. Environment Configurations
  7. Dockerization Guide
  8. Production Deployment Topologies
  9. API Endpoint Specifications

Key Features

  • Secure Sessions & Authentication: JWT authentication utilizing secure, stateless HTTP-Only cookies (accessToken and refreshToken) for robust mitigation of Cross-Site Scripting (XSS) and Session hijacking risks.
  • Double Portal Architecture: Decoupled interface supporting both a Student Public Portal (for searching jobs, uploading resumes, tracking applications) and a comprehensive Admin Console.
  • Dynamic Job Ingestion: Custom scraper and importer service to ingest off-campus job drives dynamically from external feeds and listings.
  • Admin Command & Analytics: Admin dashboard for toggling user active status, registering partner companies, and monitoring candidate metrics.
  • Cloud Image/Resume Hosting: High-speed resume uploads and company logo mapping integrated directly with Cloudinary APIs.
  • Real-time Synchronization: Robust caching and synchronization services for efficient data fetching and minimal database load.

Architecture Overview

The following diagram illustrates the network flow, security boundary, and service communication of the ApplyDrive platform:

graph TD
subgraph ClientTier [Client Tier]
PublicClient["Student Portal - React SPA"]
AdminClient["Admin Portal - React SPA"]
end
subgraph RouterTier [Nginx Router]
Router{"Nginx Proxy / Docker"}
PublicClient -->|"Path: /portal"| Router
AdminClient -->|"Path: /admin"| Router
end
subgraph BackendTier [Spring Boot Backend]
API["Spring Boot REST Controllers"]
SecurityChain["Spring Security & JWT Filters"]
Services["Job, Company, User & Sync Services"]
Router -->|"API Proxy: /api/v1/**"| API
API <--> SecurityChain
API <--> Services
end
subgraph InfrastructureTier [External Services]
DB[("MySQL Relational DB")]
Cloudinary["Cloudinary CDN Store"]
SMTP["Brevo SMTP Server"]
Scraper["External Off-Campus Feeds"]
Services <-->|"Spring Data JPA / Hikari"| DB
Services --->|"Upload API / SDK"| Cloudinary
Services -.->|"Transaction Mails"| SMTP
Services --->|"Ingestion Job"| Scraper
end
style Router fill:#646CFF,stroke:#fff,stroke-width:2px,color:#fff
style ClientTier fill:#1b1b1f,stroke:#333,stroke-width:1px,color:#fff
style BackendTier fill:#222,stroke:#6DB33F,stroke-width:2px,color:#fff
style InfrastructureTier fill:#1b1b1f,stroke:#333,stroke-width:1px,color:#fff
Loading

Technology Stack

Backend Technologies

ComponentTechnologyDescription
LanguageJavaCore application runtime environment (Java 17)
FrameworkSpring BootCore REST API backend architecture (v3.3.0)
SecuritySpring SecurityStateless authentication using JWT cookies & Custom filters
DatabaseMySQLMain relational database management system
ORMHibernateData access layer, entity mappings and query parsing
Build SystemMavenProject dependencies compilation and builder
Cloud CDNCloudinaryDistributed media upload hosting API for resumes and logos
Mail DispatcherBrevoSMTP mailing engine configuration for transactional mailings

Frontend Technologies

ComponentTechnologyDescription
SPA LibraryReactComponent-driven user interface rendering (v18.3.1)
Build EngineViteBundler & high-speed development server (v5.2.11)
Style SheetTailwind CSSUtility-first responsive design spacing layout guidelines (v3.4.4)
UI ComponentsHeroUIBeautifully crafted premium React UI components (@heroui/react)
Data FetchingTanStack QueryDeclarative state management and asynchronous data queries
State ManagerReduxGlobal state container for token synchronizations and user info
AnimationsFramer MotionFluid web interactions and layout transition triggers

Project Directory Map

This repository is optimized for API development. Git tracking is strictly restricted to protect sensitive workspace configurations and isolate frontend UI code:

├── frontend/ # React Frontend Applications
│ ├── public-portal/ # Student portal files
│ │ └── src/services/ # HTTP client API Integrations (staged)
│ ├── admin-portal/ # Admin portal files
│ │ └── src/services/ # Admin client API Integrations (staged)
│ ├── package.json # Frontend dependency manifest
│ ├── tailwind.config.js # Styles design token configuration
│ └── Dockerfile # Multi-stage production Nginx serve file
│
└── spring-backend/ # Spring Boot Backend REST Service
├── src/main/java/com/jobportal/
│ ├── config/ # CORS configuration, database seeder config
│ ├── controller/ # REST Controllers (Auth, Jobs, Company)
│ ├── dto/ # Request & Response Data Transfer Objects
│ ├── entity/ # Hibernate Entity Definitions
│ ├── mapper/ # ModelMapper conversions
│ ├── repository/ # Spring Data JPA Repository interfaces
│ ├── security/ # Spring Security, JWT validation and cookie parsers
│ └── service/ # Service interfaces & implementations
├── src/main/resources/
│ ├── application.yml # Main environment configurations
│ └── application.yml.example # Template environment config placeholders
├── Dockerfile # Multi-stage containerization build file
└── pom.xml # Maven build dependencies config

Local Development Setup

Prerequisite Checklist

  • Java: JDK 17 installed
  • NodeJS: Version 18 or higher (along with npm)
  • Database: MySQL Server instance running locally

Running the Backend

  1. Create a MySQL database instance named job_aggregator_db:
    CREATEDATABASEjob_aggregator_db;
  2. Navigate to spring-backend/src/main/resources.
  3. Copy application.yml.example to application.yml:
    cp application.yml.example application.yml
  4. Fill in your credentials inside application.yml (database user/pass, Cloudinary credentials, and Brevo SMTP details).
  5. Start the Spring Boot application using Maven:
    cd spring-backend
    mvn clean compile
    mvn spring-boot:run

The backend server starts by default on port 8080 with context path /.

Running the Frontend

  1. Navigate to the frontend folder:
    cd frontend
  2. Install npm dependencies:
    npm install
  3. Run the Student Public Portal (accessible at http://localhost:5173):
    npm run dev:portal
  4. Run the Admin Portal (accessible at http://localhost:5174):
    npm run dev:admin

Both ports are configured to proxy API requests to your local backend on port 8080.


Environment Configurations

For deployments or container overrides, configure the variables listed below inside your environment or docker container configurations:

Variable NameDescriptionDefault / Example
SPRING_DATASOURCE_URLMySQL Database Connection URLjdbc:mysql://localhost:3306/job_aggregator_db
SPRING_DATASOURCE_USERNAMEDatabase Usernameroot
SPRING_DATASOURCE_PASSWORDDatabase Passwordyour_mysql_password
SPRING_MAIL_HOSTSMTP Server Host Addresssmtp-relay.brevo.com
SPRING_MAIL_PORTSMTP Server Connection Port587
SPRING_MAIL_USERNAMESMTP Mail Account Usernameyour_brevo_mail_username
SPRING_MAIL_PASSWORDSMTP Mail Account Passwordyour_brevo_mail_password
CLOUDINARY_CLOUD_NAMECloudinary Account Cloud Nameyour_cloudinary_cloud_name
CLOUDINARY_API_KEYCloudinary API Keyyour_api_key
CLOUDINARY_API_SECRETCloudinary API Secret Keyyour_api_secret
CLOUDINARY_FOLDERCloudinary Uploads Folderjob-app/images
JWT_SECRETBase64 JWT Secret KeyGenerate a secure Base64 256-bit string
PUBLIC_PORTAL_URLCORS Allowed Origin - Public Portalhttp://localhost:5173
ADMIN_PORTAL_URLCORS Allowed Origin - Admin Portalhttp://localhost:5174

Dockerization Guide

1. Build the Docker Images

Navigate to the root directory and build the multi-stage images:

Backend Image:

cd spring-backend
docker build -t job-backend:latest .

Frontend Image (combines public and admin portals served by Nginx):

cd ../frontend
docker build -t job-frontend:latest .

2. Run with Environment Variables

  1. Map Host Port 8080 to Container Port 8080 for the backend.
  2. Supply environment variables like SPRING_DATASOURCE_URL, SPRING_DATASOURCE_USERNAME, and SPRING_DATASOURCE_PASSWORD.
  3. Map Host Port 80 to Container Port 80 for the Nginx frontend. Access the public portal at http://localhost/portal and the admin portal at http://localhost/admin.

Production Deployment Topologies

Topology A: Unified JAR Distribution

To host both portals directly inside the backend JAR for a single-port deployment:

  1. Navigate to the frontend directory and build the assets:
    cd frontend
    npm run build:portal
    npm run build:admin
  2. Copy the production output assets into the Spring Boot resource folders:
    cp -r public-portal/dist/* ../spring-backend/src/main/resources/static/portal/
    cp -r admin-portal/dist/* ../spring-backend/src/main/resources/static/admin/
  3. Build the unified JAR:
    cd ../spring-backend
    mvn clean package -DskipTests
  4. Run the JAR:
    java -jar target/spring-backend-0.0.1-SNAPSHOT.jar

Access the portals at http://localhost:8080/portal/index.html and http://localhost:8080/admin/index.html.

Topology B: Split Containers (Nginx + Spring) — Recommended

Run the Frontend container served by Nginx alongside the Backend container, mapping backend CORS policies to allow the production Nginx domain names.


API Endpoint Specifications

Authentication Operations

HTTP MethodEndpointDescription
POST/api/v1/auth/registerCreate student account.
POST/api/v1/auth/loginAuthenticate student user, returns stateless JWT HttpOnly cookies (accessToken, refreshToken).
POST/api/v1/auth/refresh-tokenRequest new accessToken using refreshToken cookie.
POST/api/v1/auth/logoutEvict client auth cookies and terminate session.

Student Profiles (/api/v1/users/**)

HTTP MethodEndpointDescription
GET/api/v1/users/meFetch currently logged-in student profile details.
PUT/api/v1/users/meUpdate candidate profile metadata.

Partner Companies (/api/v1/companies/**)

HTTP MethodEndpointDescription
GET/api/v1/companiesRetrieve listing of partner employers.
POST/api/v1/companiesRegister a partner employer.

Job Board Operations (/api/v1/jobs/** & /api/v1/public/jobs/**)

HTTP MethodEndpointDescription
GET/api/v1/public/jobsPaginated job listings search.
GET/api/v1/jobs/{id}Fetch detailed job specification page.
POST/api/v1/jobs/importTrigger the job scraper and ingestion feed engine.

Cloud File Uploads (/api/v1/upload/**)

HTTP MethodEndpointDescription
POST/api/v1/upload/resumeProcess resume PDF uploads directly to Cloudinary.
POST/api/v1/upload/imageHandle avatar and company brand logo uploads to Cloudinary.

Admin Core Controllers (/api/v1/admin/**)

HTTP MethodEndpointDescription
POST/api/v1/admin/auth/loginAuthenticate administrative dashboard privileges.
GET/api/v1/admin/dashboard/analyticsFetch aggregated metrics (sign-up trends, active counts, jobs categories).
PATCH/api/v1/admin/users/{id}/statusToggle student account activation status (active vs. blocked).

About

ApplyDrive is a high-performance, enterprise-grade job aggregator and off-campus recruitment platform designed to curate, organize, and streamline off-campus hiring opportunities.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Latest commit

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ApplyDrive: Job Aggregator Hiring Platform

ApplyDrive is a high-performance, enterprise-grade job aggregator and off-campus recruitment platform designed to curate, organize, and streamline off-campus hiring opportunities. The application is built using a highly secure decoupled architecture featuring React SPA client portals and a robust Spring Boot REST API backend.


Java 17Spring Boot 3.3.0React 18.3.1ViteTailwindCSSDocker


Table of Contents

  1. Key Features
  2. Architecture Overview
  3. Technology Stack
  4. Project Directory Map
  5. Local Development Setup
  6. Environment Configurations
  7. Dockerization Guide
  8. Production Deployment Topologies
  9. API Endpoint Specifications

Key Features

  • Secure Sessions & Authentication: JWT authentication utilizing secure, stateless HTTP-Only cookies (accessToken and refreshToken) for robust mitigation of Cross-Site Scripting (XSS) and Session hijacking risks.
  • Double Portal Architecture: Decoupled interface supporting both a Student Public Portal (for searching jobs, uploading resumes, tracking applications) and a comprehensive Admin Console.
  • Dynamic Job Ingestion: Custom scraper and importer service to ingest off-campus job drives dynamically from external feeds and listings.
  • Admin Command & Analytics: Admin dashboard for toggling user active status, registering partner companies, and monitoring candidate metrics.
  • Cloud Image/Resume Hosting: High-speed resume uploads and company logo mapping integrated directly with Cloudinary APIs.
  • Real-time Synchronization: Robust caching and synchronization services for efficient data fetching and minimal database load.

Architecture Overview

The following diagram illustrates the network flow, security boundary, and service communication of the ApplyDrive platform:

graph TD
subgraph ClientTier [Client Tier]
PublicClient["Student Portal - React SPA"]
AdminClient["Admin Portal - React SPA"]
end
subgraph RouterTier [Nginx Router]
Router{"Nginx Proxy / Docker"}
PublicClient -->|"Path: /portal"| Router
AdminClient -->|"Path: /admin"| Router
end
subgraph BackendTier [Spring Boot Backend]
API["Spring Boot REST Controllers"]
SecurityChain["Spring Security & JWT Filters"]
Services["Job, Company, User & Sync Services"]
Router -->|"API Proxy: /api/v1/**"| API
API <--> SecurityChain
API <--> Services
end
subgraph InfrastructureTier [External Services]
DB[("MySQL Relational DB")]
Cloudinary["Cloudinary CDN Store"]
SMTP["Brevo SMTP Server"]
Scraper["External Off-Campus Feeds"]
Services <-->|"Spring Data JPA / Hikari"| DB
Services --->|"Upload API / SDK"| Cloudinary
Services -.->|"Transaction Mails"| SMTP
Services --->|"Ingestion Job"| Scraper
end
style Router fill:#646CFF,stroke:#fff,stroke-width:2px,color:#fff
style ClientTier fill:#1b1b1f,stroke:#333,stroke-width:1px,color:#fff
style BackendTier fill:#222,stroke:#6DB33F,stroke-width:2px,color:#fff
style InfrastructureTier fill:#1b1b1f,stroke:#333,stroke-width:1px,color:#fff
Loading

Technology Stack

Backend Technologies

ComponentTechnologyDescription
LanguageJavaCore application runtime environment (Java 17)
FrameworkSpring BootCore REST API backend architecture (v3.3.0)
SecuritySpring SecurityStateless authentication using JWT cookies & Custom filters
DatabaseMySQLMain relational database management system
ORMHibernateData access layer, entity mappings and query parsing
Build SystemMavenProject dependencies compilation and builder
Cloud CDNCloudinaryDistributed media upload hosting API for resumes and logos
Mail DispatcherBrevoSMTP mailing engine configuration for transactional mailings

Frontend Technologies

ComponentTechnologyDescription
SPA LibraryReactComponent-driven user interface rendering (v18.3.1)
Build EngineViteBundler & high-speed development server (v5.2.11)
Style SheetTailwind CSSUtility-first responsive design spacing layout guidelines (v3.4.4)
UI ComponentsHeroUIBeautifully crafted premium React UI components (@heroui/react)
Data FetchingTanStack QueryDeclarative state management and asynchronous data queries
State ManagerReduxGlobal state container for token synchronizations and user info
AnimationsFramer MotionFluid web interactions and layout transition triggers

Project Directory Map

This repository is optimized for API development. Git tracking is strictly restricted to protect sensitive workspace configurations and isolate frontend UI code:

├── frontend/ # React Frontend Applications
│ ├── public-portal/ # Student portal files
│ │ └── src/services/ # HTTP client API Integrations (staged)
│ ├── admin-portal/ # Admin portal files
│ │ └── src/services/ # Admin client API Integrations (staged)
│ ├── package.json # Frontend dependency manifest
│ ├── tailwind.config.js # Styles design token configuration
│ └── Dockerfile # Multi-stage production Nginx serve file
│
└── spring-backend/ # Spring Boot Backend REST Service
├── src/main/java/com/jobportal/
│ ├── config/ # CORS configuration, database seeder config
│ ├── controller/ # REST Controllers (Auth, Jobs, Company)
│ ├── dto/ # Request & Response Data Transfer Objects
│ ├── entity/ # Hibernate Entity Definitions
│ ├── mapper/ # ModelMapper conversions
│ ├── repository/ # Spring Data JPA Repository interfaces
│ ├── security/ # Spring Security, JWT validation and cookie parsers
│ └── service/ # Service interfaces & implementations
├── src/main/resources/
│ ├── application.yml # Main environment configurations
│ └── application.yml.example # Template environment config placeholders
├── Dockerfile # Multi-stage containerization build file
└── pom.xml # Maven build dependencies config

Local Development Setup

Prerequisite Checklist

  • Java: JDK 17 installed
  • NodeJS: Version 18 or higher (along with npm)
  • Database: MySQL Server instance running locally

Running the Backend

  1. Create a MySQL database instance named job_aggregator_db:
    CREATEDATABASEjob_aggregator_db;
  2. Navigate to spring-backend/src/main/resources.
  3. Copy application.yml.example to application.yml:
    cp application.yml.example application.yml
  4. Fill in your credentials inside application.yml (database user/pass, Cloudinary credentials, and Brevo SMTP details).
  5. Start the Spring Boot application using Maven:
    cd spring-backend
    mvn clean compile
    mvn spring-boot:run

The backend server starts by default on port 8080 with context path /.

Running the Frontend

  1. Navigate to the frontend folder:
    cd frontend
  2. Install npm dependencies:
    npm install
  3. Run the Student Public Portal (accessible at http://localhost:5173):
    npm run dev:portal
  4. Run the Admin Portal (accessible at http://localhost:5174):
    npm run dev:admin

Both ports are configured to proxy API requests to your local backend on port 8080.


Environment Configurations

For deployments or container overrides, configure the variables listed below inside your environment or docker container configurations:

Variable NameDescriptionDefault / Example
SPRING_DATASOURCE_URLMySQL Database Connection URLjdbc:mysql://localhost:3306/job_aggregator_db
SPRING_DATASOURCE_USERNAMEDatabase Usernameroot
SPRING_DATASOURCE_PASSWORDDatabase Passwordyour_mysql_password
SPRING_MAIL_HOSTSMTP Server Host Addresssmtp-relay.brevo.com
SPRING_MAIL_PORTSMTP Server Connection Port587
SPRING_MAIL_USERNAMESMTP Mail Account Usernameyour_brevo_mail_username
SPRING_MAIL_PASSWORDSMTP Mail Account Passwordyour_brevo_mail_password
CLOUDINARY_CLOUD_NAMECloudinary Account Cloud Nameyour_cloudinary_cloud_name
CLOUDINARY_API_KEYCloudinary API Keyyour_api_key
CLOUDINARY_API_SECRETCloudinary API Secret Keyyour_api_secret
CLOUDINARY_FOLDERCloudinary Uploads Folderjob-app/images
JWT_SECRETBase64 JWT Secret KeyGenerate a secure Base64 256-bit string
PUBLIC_PORTAL_URLCORS Allowed Origin - Public Portalhttp://localhost:5173
ADMIN_PORTAL_URLCORS Allowed Origin - Admin Portalhttp://localhost:5174

Dockerization Guide

1. Build the Docker Images

Navigate to the root directory and build the multi-stage images:

Backend Image:

cd spring-backend
docker build -t job-backend:latest .

Frontend Image (combines public and admin portals served by Nginx):

cd ../frontend
docker build -t job-frontend:latest .

2. Run with Environment Variables

  1. Map Host Port 8080 to Container Port 8080 for the backend.
  2. Supply environment variables like SPRING_DATASOURCE_URL, SPRING_DATASOURCE_USERNAME, and SPRING_DATASOURCE_PASSWORD.
  3. Map Host Port 80 to Container Port 80 for the Nginx frontend. Access the public portal at http://localhost/portal and the admin portal at http://localhost/admin.

Production Deployment Topologies

Topology A: Unified JAR Distribution

To host both portals directly inside the backend JAR for a single-port deployment:

  1. Navigate to the frontend directory and build the assets:
    cd frontend
    npm run build:portal
    npm run build:admin
  2. Copy the production output assets into the Spring Boot resource folders:
    cp -r public-portal/dist/* ../spring-backend/src/main/resources/static/portal/
    cp -r admin-portal/dist/* ../spring-backend/src/main/resources/static/admin/
  3. Build the unified JAR:
    cd ../spring-backend
    mvn clean package -DskipTests
  4. Run the JAR:
    java -jar target/spring-backend-0.0.1-SNAPSHOT.jar

Access the portals at http://localhost:8080/portal/index.html and http://localhost:8080/admin/index.html.

Topology B: Split Containers (Nginx + Spring) — Recommended

Run the Frontend container served by Nginx alongside the Backend container, mapping backend CORS policies to allow the production Nginx domain names.


API Endpoint Specifications

Authentication Operations

HTTP MethodEndpointDescription
POST/api/v1/auth/registerCreate student account.
POST/api/v1/auth/loginAuthenticate student user, returns stateless JWT HttpOnly cookies (accessToken, refreshToken).
POST/api/v1/auth/refresh-tokenRequest new accessToken using refreshToken cookie.
POST/api/v1/auth/logoutEvict client auth cookies and terminate session.

Student Profiles (/api/v1/users/**)

HTTP MethodEndpointDescription
GET/api/v1/users/meFetch currently logged-in student profile details.
PUT/api/v1/users/meUpdate candidate profile metadata.

Partner Companies (/api/v1/companies/**)

HTTP MethodEndpointDescription
GET/api/v1/companiesRetrieve listing of partner employers.
POST/api/v1/companiesRegister a partner employer.

Job Board Operations (/api/v1/jobs/** & /api/v1/public/jobs/**)

HTTP MethodEndpointDescription
GET/api/v1/public/jobsPaginated job listings search.
GET/api/v1/jobs/{id}Fetch detailed job specification page.
POST/api/v1/jobs/importTrigger the job scraper and ingestion feed engine.

Cloud File Uploads (/api/v1/upload/**)

HTTP MethodEndpointDescription
POST/api/v1/upload/resumeProcess resume PDF uploads directly to Cloudinary.
POST/api/v1/upload/imageHandle avatar and company brand logo uploads to Cloudinary.

Admin Core Controllers (/api/v1/admin/**)

HTTP MethodEndpointDescription
POST/api/v1/admin/auth/loginAuthenticate administrative dashboard privileges.
GET/api/v1/admin/dashboard/analyticsFetch aggregated metrics (sign-up trends, active counts, jobs categories).
PATCH/api/v1/admin/users/{id}/statusToggle student account activation status (active vs. blocked).

About

ApplyDrive is a high-performance, enterprise-grade job aggregator and off-campus recruitment platform designed to curate, organize, and streamline off-campus hiring opportunities.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ApplyDrive: Job Aggregator Hiring Platform

ApplyDrive is a high-performance, enterprise-grade job aggregator and off-campus recruitment platform designed to curate, organize, and streamline off-campus hiring opportunities. The application is built using a highly secure decoupled architecture featuring React SPA client portals and a robust Spring Boot REST API backend.


Java 17Spring Boot 3.3.0React 18.3.1ViteTailwindCSSDocker


Table of Contents

  1. Key Features
  2. Architecture Overview
  3. Technology Stack
  4. Project Directory Map
  5. Local Development Setup
  6. Environment Configurations
  7. Dockerization Guide
  8. Production Deployment Topologies
  9. API Endpoint Specifications

Key Features

  • Secure Sessions & Authentication: JWT authentication utilizing secure, stateless HTTP-Only cookies (accessToken and refreshToken) for robust mitigation of Cross-Site Scripting (XSS) and Session hijacking risks.
  • Double Portal Architecture: Decoupled interface supporting both a Student Public Portal (for searching jobs, uploading resumes, tracking applications) and a comprehensive Admin Console.
  • Dynamic Job Ingestion: Custom scraper and importer service to ingest off-campus job drives dynamically from external feeds and listings.
  • Admin Command & Analytics: Admin dashboard for toggling user active status, registering partner companies, and monitoring candidate metrics.
  • Cloud Image/Resume Hosting: High-speed resume uploads and company logo mapping integrated directly with Cloudinary APIs.
  • Real-time Synchronization: Robust caching and synchronization services for efficient data fetching and minimal database load.

Architecture Overview

The following diagram illustrates the network flow, security boundary, and service communication of the ApplyDrive platform:

graph TD
subgraph ClientTier [Client Tier]
PublicClient["Student Portal - React SPA"]
AdminClient["Admin Portal - React SPA"]
end
subgraph RouterTier [Nginx Router]
Router{"Nginx Proxy / Docker"}
PublicClient -->|"Path: /portal"| Router
AdminClient -->|"Path: /admin"| Router
end
subgraph BackendTier [Spring Boot Backend]
API["Spring Boot REST Controllers"]
SecurityChain["Spring Security & JWT Filters"]
Services["Job, Company, User & Sync Services"]
Router -->|"API Proxy: /api/v1/**"| API
API <--> SecurityChain
API <--> Services
end
subgraph InfrastructureTier [External Services]
DB[("MySQL Relational DB")]
Cloudinary["Cloudinary CDN Store"]
SMTP["Brevo SMTP Server"]
Scraper["External Off-Campus Feeds"]
Services <-->|"Spring Data JPA / Hikari"| DB
Services --->|"Upload API / SDK"| Cloudinary
Services -.->|"Transaction Mails"| SMTP
Services --->|"Ingestion Job"| Scraper
end
style Router fill:#646CFF,stroke:#fff,stroke-width:2px,color:#fff
style ClientTier fill:#1b1b1f,stroke:#333,stroke-width:1px,color:#fff
style BackendTier fill:#222,stroke:#6DB33F,stroke-width:2px,color:#fff
style InfrastructureTier fill:#1b1b1f,stroke:#333,stroke-width:1px,color:#fff
Loading

Technology Stack

Backend Technologies

ComponentTechnologyDescription
LanguageJavaCore application runtime environment (Java 17)
FrameworkSpring BootCore REST API backend architecture (v3.3.0)
SecuritySpring SecurityStateless authentication using JWT cookies & Custom filters
DatabaseMySQLMain relational database management system
ORMHibernateData access layer, entity mappings and query parsing
Build SystemMavenProject dependencies compilation and builder
Cloud CDNCloudinaryDistributed media upload hosting API for resumes and logos
Mail DispatcherBrevoSMTP mailing engine configuration for transactional mailings

Frontend Technologies

ComponentTechnologyDescription
SPA LibraryReactComponent-driven user interface rendering (v18.3.1)
Build EngineViteBundler & high-speed development server (v5.2.11)
Style SheetTailwind CSSUtility-first responsive design spacing layout guidelines (v3.4.4)
UI ComponentsHeroUIBeautifully crafted premium React UI components (@heroui/react)
Data FetchingTanStack QueryDeclarative state management and asynchronous data queries
State ManagerReduxGlobal state container for token synchronizations and user info
AnimationsFramer MotionFluid web interactions and layout transition triggers

Project Directory Map

This repository is optimized for API development. Git tracking is strictly restricted to protect sensitive workspace configurations and isolate frontend UI code:

├── frontend/ # React Frontend Applications
│ ├── public-portal/ # Student portal files
│ │ └── src/services/ # HTTP client API Integrations (staged)
│ ├── admin-portal/ # Admin portal files
│ │ └── src/services/ # Admin client API Integrations (staged)
│ ├── package.json # Frontend dependency manifest
│ ├── tailwind.config.js # Styles design token configuration
│ └── Dockerfile # Multi-stage production Nginx serve file
│
└── spring-backend/ # Spring Boot Backend REST Service
├── src/main/java/com/jobportal/
│ ├── config/ # CORS configuration, database seeder config
│ ├── controller/ # REST Controllers (Auth, Jobs, Company)
│ ├── dto/ # Request & Response Data Transfer Objects
│ ├── entity/ # Hibernate Entity Definitions
│ ├── mapper/ # ModelMapper conversions
│ ├── repository/ # Spring Data JPA Repository interfaces
│ ├── security/ # Spring Security, JWT validation and cookie parsers
│ └── service/ # Service interfaces & implementations
├── src/main/resources/
│ ├── application.yml # Main environment configurations
│ └── application.yml.example # Template environment config placeholders
├── Dockerfile # Multi-stage containerization build file
└── pom.xml # Maven build dependencies config

Local Development Setup

Prerequisite Checklist

  • Java: JDK 17 installed
  • NodeJS: Version 18 or higher (along with npm)
  • Database: MySQL Server instance running locally

Running the Backend

  1. Create a MySQL database instance named job_aggregator_db:
    CREATEDATABASEjob_aggregator_db;
  2. Navigate to spring-backend/src/main/resources.
  3. Copy application.yml.example to application.yml:
    cp application.yml.example application.yml
  4. Fill in your credentials inside application.yml (database user/pass, Cloudinary credentials, and Brevo SMTP details).
  5. Start the Spring Boot application using Maven:
    cd spring-backend
    mvn clean compile
    mvn spring-boot:run

The backend server starts by default on port 8080 with context path /.

Running the Frontend

  1. Navigate to the frontend folder:
    cd frontend
  2. Install npm dependencies:
    npm install
  3. Run the Student Public Portal (accessible at http://localhost:5173):
    npm run dev:portal
  4. Run the Admin Portal (accessible at http://localhost:5174):
    npm run dev:admin

Both ports are configured to proxy API requests to your local backend on port 8080.


Environment Configurations

For deployments or container overrides, configure the variables listed below inside your environment or docker container configurations:

Variable NameDescriptionDefault / Example
SPRING_DATASOURCE_URLMySQL Database Connection URLjdbc:mysql://localhost:3306/job_aggregator_db
SPRING_DATASOURCE_USERNAMEDatabase Usernameroot
SPRING_DATASOURCE_PASSWORDDatabase Passwordyour_mysql_password
SPRING_MAIL_HOSTSMTP Server Host Addresssmtp-relay.brevo.com
SPRING_MAIL_PORTSMTP Server Connection Port587
SPRING_MAIL_USERNAMESMTP Mail Account Usernameyour_brevo_mail_username
SPRING_MAIL_PASSWORDSMTP Mail Account Passwordyour_brevo_mail_password
CLOUDINARY_CLOUD_NAMECloudinary Account Cloud Nameyour_cloudinary_cloud_name
CLOUDINARY_API_KEYCloudinary API Keyyour_api_key
CLOUDINARY_API_SECRETCloudinary API Secret Keyyour_api_secret
CLOUDINARY_FOLDERCloudinary Uploads Folderjob-app/images
JWT_SECRETBase64 JWT Secret KeyGenerate a secure Base64 256-bit string
PUBLIC_PORTAL_URLCORS Allowed Origin - Public Portalhttp://localhost:5173
ADMIN_PORTAL_URLCORS Allowed Origin - Admin Portalhttp://localhost:5174

Dockerization Guide

1. Build the Docker Images

Navigate to the root directory and build the multi-stage images:

Backend Image:

cd spring-backend
docker build -t job-backend:latest .

Frontend Image (combines public and admin portals served by Nginx):

cd ../frontend
docker build -t job-frontend:latest .

2. Run with Environment Variables

  1. Map Host Port 8080 to Container Port 8080 for the backend.
  2. Supply environment variables like SPRING_DATASOURCE_URL, SPRING_DATASOURCE_USERNAME, and SPRING_DATASOURCE_PASSWORD.
  3. Map Host Port 80 to Container Port 80 for the Nginx frontend. Access the public portal at http://localhost/portal and the admin portal at http://localhost/admin.

Production Deployment Topologies

Topology A: Unified JAR Distribution

To host both portals directly inside the backend JAR for a single-port deployment:

  1. Navigate to the frontend directory and build the assets:
    cd frontend
    npm run build:portal
    npm run build:admin
  2. Copy the production output assets into the Spring Boot resource folders:
    cp -r public-portal/dist/* ../spring-backend/src/main/resources/static/portal/
    cp -r admin-portal/dist/* ../spring-backend/src/main/resources/static/admin/
  3. Build the unified JAR:
    cd ../spring-backend
    mvn clean package -DskipTests
  4. Run the JAR:
    java -jar target/spring-backend-0.0.1-SNAPSHOT.jar

Access the portals at http://localhost:8080/portal/index.html and http://localhost:8080/admin/index.html.

Topology B: Split Containers (Nginx + Spring) — Recommended

Run the Frontend container served by Nginx alongside the Backend container, mapping backend CORS policies to allow the production Nginx domain names.


API Endpoint Specifications

Authentication Operations

HTTP MethodEndpointDescription
POST/api/v1/auth/registerCreate student account.
POST/api/v1/auth/loginAuthenticate student user, returns stateless JWT HttpOnly cookies (accessToken, refreshToken).
POST/api/v1/auth/refresh-tokenRequest new accessToken using refreshToken cookie.
POST/api/v1/auth/logoutEvict client auth cookies and terminate session.

Student Profiles (/api/v1/users/**)

HTTP MethodEndpointDescription
GET/api/v1/users/meFetch currently logged-in student profile details.
PUT/api/v1/users/meUpdate candidate profile metadata.

Partner Companies (/api/v1/companies/**)

HTTP MethodEndpointDescription
GET/api/v1/companiesRetrieve listing of partner employers.
POST/api/v1/companiesRegister a partner employer.

Job Board Operations (/api/v1/jobs/** & /api/v1/public/jobs/**)

HTTP MethodEndpointDescription
GET/api/v1/public/jobsPaginated job listings search.
GET/api/v1/jobs/{id}Fetch detailed job specification page.
POST/api/v1/jobs/importTrigger the job scraper and ingestion feed engine.

Cloud File Uploads (/api/v1/upload/**)

HTTP MethodEndpointDescription
POST/api/v1/upload/resumeProcess resume PDF uploads directly to Cloudinary.
POST/api/v1/upload/imageHandle avatar and company brand logo uploads to Cloudinary.

Admin Core Controllers (/api/v1/admin/**)

HTTP MethodEndpointDescription
POST/api/v1/admin/auth/loginAuthenticate administrative dashboard privileges.
GET/api/v1/admin/dashboard/analyticsFetch aggregated metrics (sign-up trends, active counts, jobs categories).
PATCH/api/v1/admin/users/{id}/statusToggle student account activation status (active vs. blocked).

About

ApplyDrive is a high-performance, enterprise-grade job aggregator and off-campus recruitment platform designed to curate, organize, and streamline off-campus hiring opportunities.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ApplyDrive: Job Aggregator Hiring Platform

ApplyDrive is a high-performance, enterprise-grade job aggregator and off-campus recruitment platform designed to curate, organize, and streamline off-campus hiring opportunities. The application is built using a highly secure decoupled architecture featuring React SPA client portals and a robust Spring Boot REST API backend.


Java 17Spring Boot 3.3.0React 18.3.1ViteTailwindCSSDocker


Table of Contents

  1. Key Features
  2. Architecture Overview
  3. Technology Stack
  4. Project Directory Map
  5. Local Development Setup
  6. Environment Configurations
  7. Dockerization Guide
  8. Production Deployment Topologies
  9. API Endpoint Specifications

Key Features

  • Secure Sessions & Authentication: JWT authentication utilizing secure, stateless HTTP-Only cookies (accessToken and refreshToken) for robust mitigation of Cross-Site Scripting (XSS) and Session hijacking risks.
  • Double Portal Architecture: Decoupled interface supporting both a Student Public Portal (for searching jobs, uploading resumes, tracking applications) and a comprehensive Admin Console.
  • Dynamic Job Ingestion: Custom scraper and importer service to ingest off-campus job drives dynamically from external feeds and listings.
  • Admin Command & Analytics: Admin dashboard for toggling user active status, registering partner companies, and monitoring candidate metrics.
  • Cloud Image/Resume Hosting: High-speed resume uploads and company logo mapping integrated directly with Cloudinary APIs.
  • Real-time Synchronization: Robust caching and synchronization services for efficient data fetching and minimal database load.

Architecture Overview

The following diagram illustrates the network flow, security boundary, and service communication of the ApplyDrive platform:

graph TD
subgraph ClientTier [Client Tier]
PublicClient["Student Portal - React SPA"]
AdminClient["Admin Portal - React SPA"]
end
subgraph RouterTier [Nginx Router]
Router{"Nginx Proxy / Docker"}
PublicClient -->|"Path: /portal"| Router
AdminClient -->|"Path: /admin"| Router
end
subgraph BackendTier [Spring Boot Backend]
API["Spring Boot REST Controllers"]
SecurityChain["Spring Security & JWT Filters"]
Services["Job, Company, User & Sync Services"]
Router -->|"API Proxy: /api/v1/**"| API
API <--> SecurityChain
API <--> Services
end
subgraph InfrastructureTier [External Services]
DB[("MySQL Relational DB")]
Cloudinary["Cloudinary CDN Store"]
SMTP["Brevo SMTP Server"]
Scraper["External Off-Campus Feeds"]
Services <-->|"Spring Data JPA / Hikari"| DB
Services --->|"Upload API / SDK"| Cloudinary
Services -.->|"Transaction Mails"| SMTP
Services --->|"Ingestion Job"| Scraper
end
style Router fill:#646CFF,stroke:#fff,stroke-width:2px,color:#fff
style ClientTier fill:#1b1b1f,stroke:#333,stroke-width:1px,color:#fff
style BackendTier fill:#222,stroke:#6DB33F,stroke-width:2px,color:#fff
style InfrastructureTier fill:#1b1b1f,stroke:#333,stroke-width:1px,color:#fff
Loading

Technology Stack

Backend Technologies

ComponentTechnologyDescription
LanguageJavaCore application runtime environment (Java 17)
FrameworkSpring BootCore REST API backend architecture (v3.3.0)
SecuritySpring SecurityStateless authentication using JWT cookies & Custom filters
DatabaseMySQLMain relational database management system
ORMHibernateData access layer, entity mappings and query parsing
Build SystemMavenProject dependencies compilation and builder
Cloud CDNCloudinaryDistributed media upload hosting API for resumes and logos
Mail DispatcherBrevoSMTP mailing engine configuration for transactional mailings

Frontend Technologies

ComponentTechnologyDescription
SPA LibraryReactComponent-driven user interface rendering (v18.3.1)
Build EngineViteBundler & high-speed development server (v5.2.11)
Style SheetTailwind CSSUtility-first responsive design spacing layout guidelines (v3.4.4)
UI ComponentsHeroUIBeautifully crafted premium React UI components (@heroui/react)
Data FetchingTanStack QueryDeclarative state management and asynchronous data queries
State ManagerReduxGlobal state container for token synchronizations and user info
AnimationsFramer MotionFluid web interactions and layout transition triggers

Project Directory Map

This repository is optimized for API development. Git tracking is strictly restricted to protect sensitive workspace configurations and isolate frontend UI code:

├── frontend/ # React Frontend Applications
│ ├── public-portal/ # Student portal files
│ │ └── src/services/ # HTTP client API Integrations (staged)
│ ├── admin-portal/ # Admin portal files
│ │ └── src/services/ # Admin client API Integrations (staged)
│ ├── package.json # Frontend dependency manifest
│ ├── tailwind.config.js # Styles design token configuration
│ └── Dockerfile # Multi-stage production Nginx serve file
│
└── spring-backend/ # Spring Boot Backend REST Service
├── src/main/java/com/jobportal/
│ ├── config/ # CORS configuration, database seeder config
│ ├── controller/ # REST Controllers (Auth, Jobs, Company)
│ ├── dto/ # Request & Response Data Transfer Objects
│ ├── entity/ # Hibernate Entity Definitions
│ ├── mapper/ # ModelMapper conversions
│ ├── repository/ # Spring Data JPA Repository interfaces
│ ├── security/ # Spring Security, JWT validation and cookie parsers
│ └── service/ # Service interfaces & implementations
├── src/main/resources/
│ ├── application.yml # Main environment configurations
│ └── application.yml.example # Template environment config placeholders
├── Dockerfile # Multi-stage containerization build file
└── pom.xml # Maven build dependencies config

Local Development Setup

Prerequisite Checklist

  • Java: JDK 17 installed
  • NodeJS: Version 18 or higher (along with npm)
  • Database: MySQL Server instance running locally

Running the Backend

  1. Create a MySQL database instance named job_aggregator_db:
    CREATEDATABASEjob_aggregator_db;
  2. Navigate to spring-backend/src/main/resources.
  3. Copy application.yml.example to application.yml:
    cp application.yml.example application.yml
  4. Fill in your credentials inside application.yml (database user/pass, Cloudinary credentials, and Brevo SMTP details).
  5. Start the Spring Boot application using Maven:
    cd spring-backend
    mvn clean compile
    mvn spring-boot:run

The backend server starts by default on port 8080 with context path /.

Running the Frontend

  1. Navigate to the frontend folder:
    cd frontend
  2. Install npm dependencies:
    npm install
  3. Run the Student Public Portal (accessible at http://localhost:5173):
    npm run dev:portal
  4. Run the Admin Portal (accessible at http://localhost:5174):
    npm run dev:admin

Both ports are configured to proxy API requests to your local backend on port 8080.


Environment Configurations

For deployments or container overrides, configure the variables listed below inside your environment or docker container configurations:

Variable NameDescriptionDefault / Example
SPRING_DATASOURCE_URLMySQL Database Connection URLjdbc:mysql://localhost:3306/job_aggregator_db
SPRING_DATASOURCE_USERNAMEDatabase Usernameroot
SPRING_DATASOURCE_PASSWORDDatabase Passwordyour_mysql_password
SPRING_MAIL_HOSTSMTP Server Host Addresssmtp-relay.brevo.com
SPRING_MAIL_PORTSMTP Server Connection Port587
SPRING_MAIL_USERNAMESMTP Mail Account Usernameyour_brevo_mail_username
SPRING_MAIL_PASSWORDSMTP Mail Account Passwordyour_brevo_mail_password
CLOUDINARY_CLOUD_NAMECloudinary Account Cloud Nameyour_cloudinary_cloud_name
CLOUDINARY_API_KEYCloudinary API Keyyour_api_key
CLOUDINARY_API_SECRETCloudinary API Secret Keyyour_api_secret
CLOUDINARY_FOLDERCloudinary Uploads Folderjob-app/images
JWT_SECRETBase64 JWT Secret KeyGenerate a secure Base64 256-bit string
PUBLIC_PORTAL_URLCORS Allowed Origin - Public Portalhttp://localhost:5173
ADMIN_PORTAL_URLCORS Allowed Origin - Admin Portalhttp://localhost:5174

Dockerization Guide

1. Build the Docker Images

Navigate to the root directory and build the multi-stage images:

Backend Image:

cd spring-backend
docker build -t job-backend:latest .

Frontend Image (combines public and admin portals served by Nginx):

cd ../frontend
docker build -t job-frontend:latest .

2. Run with Environment Variables

  1. Map Host Port 8080 to Container Port 8080 for the backend.
  2. Supply environment variables like SPRING_DATASOURCE_URL, SPRING_DATASOURCE_USERNAME, and SPRING_DATASOURCE_PASSWORD.
  3. Map Host Port 80 to Container Port 80 for the Nginx frontend. Access the public portal at http://localhost/portal and the admin portal at http://localhost/admin.

Production Deployment Topologies

Topology A: Unified JAR Distribution

To host both portals directly inside the backend JAR for a single-port deployment:

  1. Navigate to the frontend directory and build the assets:
    cd frontend
    npm run build:portal
    npm run build:admin
  2. Copy the production output assets into the Spring Boot resource folders:
    cp -r public-portal/dist/* ../spring-backend/src/main/resources/static/portal/
    cp -r admin-portal/dist/* ../spring-backend/src/main/resources/static/admin/
  3. Build the unified JAR:
    cd ../spring-backend
    mvn clean package -DskipTests
  4. Run the JAR:
    java -jar target/spring-backend-0.0.1-SNAPSHOT.jar

Access the portals at http://localhost:8080/portal/index.html and http://localhost:8080/admin/index.html.

Topology B: Split Containers (Nginx + Spring) — Recommended

Run the Frontend container served by Nginx alongside the Backend container, mapping backend CORS policies to allow the production Nginx domain names.


API Endpoint Specifications

Authentication Operations

HTTP MethodEndpointDescription
POST/api/v1/auth/registerCreate student account.
POST/api/v1/auth/loginAuthenticate student user, returns stateless JWT HttpOnly cookies (accessToken, refreshToken).
POST/api/v1/auth/refresh-tokenRequest new accessToken using refreshToken cookie.
POST/api/v1/auth/logoutEvict client auth cookies and terminate session.

Student Profiles (/api/v1/users/**)

HTTP MethodEndpointDescription
GET/api/v1/users/meFetch currently logged-in student profile details.
PUT/api/v1/users/meUpdate candidate profile metadata.

Partner Companies (/api/v1/companies/**)

HTTP MethodEndpointDescription
GET/api/v1/companiesRetrieve listing of partner employers.
POST/api/v1/companiesRegister a partner employer.

Job Board Operations (/api/v1/jobs/** & /api/v1/public/jobs/**)

HTTP MethodEndpointDescription
GET/api/v1/public/jobsPaginated job listings search.
GET/api/v1/jobs/{id}Fetch detailed job specification page.
POST/api/v1/jobs/importTrigger the job scraper and ingestion feed engine.

Cloud File Uploads (/api/v1/upload/**)

HTTP MethodEndpointDescription
POST/api/v1/upload/resumeProcess resume PDF uploads directly to Cloudinary.
POST/api/v1/upload/imageHandle avatar and company brand logo uploads to Cloudinary.

Admin Core Controllers (/api/v1/admin/**)

HTTP MethodEndpointDescription
POST/api/v1/admin/auth/loginAuthenticate administrative dashboard privileges.
GET/api/v1/admin/dashboard/analyticsFetch aggregated metrics (sign-up trends, active counts, jobs categories).
PATCH/api/v1/admin/users/{id}/statusToggle student account activation status (active vs. blocked).

About

ApplyDrive is a high-performance, enterprise-grade job aggregator and off-campus recruitment platform designed to curate, organize, and streamline off-campus hiring opportunities.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Latest commit

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ApplyDrive: Job Aggregator Hiring Platform

ApplyDrive is a high-performance, enterprise-grade job aggregator and off-campus recruitment platform designed to curate, organize, and streamline off-campus hiring opportunities. The application is built using a highly secure decoupled architecture featuring React SPA client portals and a robust Spring Boot REST API backend.


Java 17Spring Boot 3.3.0React 18.3.1ViteTailwindCSSDocker


Table of Contents

  1. Key Features
  2. Architecture Overview
  3. Technology Stack
  4. Project Directory Map
  5. Local Development Setup
  6. Environment Configurations
  7. Dockerization Guide
  8. Production Deployment Topologies
  9. API Endpoint Specifications

Key Features

  • Secure Sessions & Authentication: JWT authentication utilizing secure, stateless HTTP-Only cookies (accessToken and refreshToken) for robust mitigation of Cross-Site Scripting (XSS) and Session hijacking risks.
  • Double Portal Architecture: Decoupled interface supporting both a Student Public Portal (for searching jobs, uploading resumes, tracking applications) and a comprehensive Admin Console.
  • Dynamic Job Ingestion: Custom scraper and importer service to ingest off-campus job drives dynamically from external feeds and listings.
  • Admin Command & Analytics: Admin dashboard for toggling user active status, registering partner companies, and monitoring candidate metrics.
  • Cloud Image/Resume Hosting: High-speed resume uploads and company logo mapping integrated directly with Cloudinary APIs.
  • Real-time Synchronization: Robust caching and synchronization services for efficient data fetching and minimal database load.

Architecture Overview

The following diagram illustrates the network flow, security boundary, and service communication of the ApplyDrive platform:

graph TD
subgraph ClientTier [Client Tier]
PublicClient["Student Portal - React SPA"]
AdminClient["Admin Portal - React SPA"]
end
subgraph RouterTier [Nginx Router]
Router{"Nginx Proxy / Docker"}
PublicClient -->|"Path: /portal"| Router
AdminClient -->|"Path: /admin"| Router
end
subgraph BackendTier [Spring Boot Backend]
API["Spring Boot REST Controllers"]
SecurityChain["Spring Security & JWT Filters"]
Services["Job, Company, User & Sync Services"]
Router -->|"API Proxy: /api/v1/**"| API
API <--> SecurityChain
API <--> Services
end
subgraph InfrastructureTier [External Services]
DB[("MySQL Relational DB")]
Cloudinary["Cloudinary CDN Store"]
SMTP["Brevo SMTP Server"]
Scraper["External Off-Campus Feeds"]
Services <-->|"Spring Data JPA / Hikari"| DB
Services --->|"Upload API / SDK"| Cloudinary
Services -.->|"Transaction Mails"| SMTP
Services --->|"Ingestion Job"| Scraper
end
style Router fill:#646CFF,stroke:#fff,stroke-width:2px,color:#fff
style ClientTier fill:#1b1b1f,stroke:#333,stroke-width:1px,color:#fff
style BackendTier fill:#222,stroke:#6DB33F,stroke-width:2px,color:#fff
style InfrastructureTier fill:#1b1b1f,stroke:#333,stroke-width:1px,color:#fff
Loading

Technology Stack

Backend Technologies

ComponentTechnologyDescription
LanguageJavaCore application runtime environment (Java 17)
FrameworkSpring BootCore REST API backend architecture (v3.3.0)
SecuritySpring SecurityStateless authentication using JWT cookies & Custom filters
DatabaseMySQLMain relational database management system
ORMHibernateData access layer, entity mappings and query parsing
Build SystemMavenProject dependencies compilation and builder
Cloud CDNCloudinaryDistributed media upload hosting API for resumes and logos
Mail DispatcherBrevoSMTP mailing engine configuration for transactional mailings

Frontend Technologies

ComponentTechnologyDescription
SPA LibraryReactComponent-driven user interface rendering (v18.3.1)
Build EngineViteBundler & high-speed development server (v5.2.11)
Style SheetTailwind CSSUtility-first responsive design spacing layout guidelines (v3.4.4)
UI ComponentsHeroUIBeautifully crafted premium React UI components (@heroui/react)
Data FetchingTanStack QueryDeclarative state management and asynchronous data queries
State ManagerReduxGlobal state container for token synchronizations and user info
AnimationsFramer MotionFluid web interactions and layout transition triggers

Project Directory Map

This repository is optimized for API development. Git tracking is strictly restricted to protect sensitive workspace configurations and isolate frontend UI code:

├── frontend/ # React Frontend Applications
│ ├── public-portal/ # Student portal files
│ │ └── src/services/ # HTTP client API Integrations (staged)
│ ├── admin-portal/ # Admin portal files
│ │ └── src/services/ # Admin client API Integrations (staged)
│ ├── package.json # Frontend dependency manifest
│ ├── tailwind.config.js # Styles design token configuration
│ └── Dockerfile # Multi-stage production Nginx serve file
│
└── spring-backend/ # Spring Boot Backend REST Service
├── src/main/java/com/jobportal/
│ ├── config/ # CORS configuration, database seeder config
│ ├── controller/ # REST Controllers (Auth, Jobs, Company)
│ ├── dto/ # Request & Response Data Transfer Objects
│ ├── entity/ # Hibernate Entity Definitions
│ ├── mapper/ # ModelMapper conversions
│ ├── repository/ # Spring Data JPA Repository interfaces
│ ├── security/ # Spring Security, JWT validation and cookie parsers
│ └── service/ # Service interfaces & implementations
├── src/main/resources/
│ ├── application.yml # Main environment configurations
│ └── application.yml.example # Template environment config placeholders
├── Dockerfile # Multi-stage containerization build file
└── pom.xml # Maven build dependencies config

Local Development Setup

Prerequisite Checklist

  • Java: JDK 17 installed
  • NodeJS: Version 18 or higher (along with npm)
  • Database: MySQL Server instance running locally

Running the Backend

  1. Create a MySQL database instance named job_aggregator_db:
    CREATEDATABASEjob_aggregator_db;
  2. Navigate to spring-backend/src/main/resources.
  3. Copy application.yml.example to application.yml:
    cp application.yml.example application.yml
  4. Fill in your credentials inside application.yml (database user/pass, Cloudinary credentials, and Brevo SMTP details).
  5. Start the Spring Boot application using Maven:
    cd spring-backend
    mvn clean compile
    mvn spring-boot:run

The backend server starts by default on port 8080 with context path /.

Running the Frontend

  1. Navigate to the frontend folder:
    cd frontend
  2. Install npm dependencies:
    npm install
  3. Run the Student Public Portal (accessible at http://localhost:5173):
    npm run dev:portal
  4. Run the Admin Portal (accessible at http://localhost:5174):
    npm run dev:admin

Both ports are configured to proxy API requests to your local backend on port 8080.


Environment Configurations

For deployments or container overrides, configure the variables listed below inside your environment or docker container configurations:

Variable NameDescriptionDefault / Example
SPRING_DATASOURCE_URLMySQL Database Connection URLjdbc:mysql://localhost:3306/job_aggregator_db
SPRING_DATASOURCE_USERNAMEDatabase Usernameroot
SPRING_DATASOURCE_PASSWORDDatabase Passwordyour_mysql_password
SPRING_MAIL_HOSTSMTP Server Host Addresssmtp-relay.brevo.com
SPRING_MAIL_PORTSMTP Server Connection Port587
SPRING_MAIL_USERNAMESMTP Mail Account Usernameyour_brevo_mail_username
SPRING_MAIL_PASSWORDSMTP Mail Account Passwordyour_brevo_mail_password
CLOUDINARY_CLOUD_NAMECloudinary Account Cloud Nameyour_cloudinary_cloud_name
CLOUDINARY_API_KEYCloudinary API Keyyour_api_key
CLOUDINARY_API_SECRETCloudinary API Secret Keyyour_api_secret
CLOUDINARY_FOLDERCloudinary Uploads Folderjob-app/images
JWT_SECRETBase64 JWT Secret KeyGenerate a secure Base64 256-bit string
PUBLIC_PORTAL_URLCORS Allowed Origin - Public Portalhttp://localhost:5173
ADMIN_PORTAL_URLCORS Allowed Origin - Admin Portalhttp://localhost:5174

Dockerization Guide

1. Build the Docker Images

Navigate to the root directory and build the multi-stage images:

Backend Image:

cd spring-backend
docker build -t job-backend:latest .

Frontend Image (combines public and admin portals served by Nginx):

cd ../frontend
docker build -t job-frontend:latest .

2. Run with Environment Variables

  1. Map Host Port 8080 to Container Port 8080 for the backend.
  2. Supply environment variables like SPRING_DATASOURCE_URL, SPRING_DATASOURCE_USERNAME, and SPRING_DATASOURCE_PASSWORD.
  3. Map Host Port 80 to Container Port 80 for the Nginx frontend. Access the public portal at http://localhost/portal and the admin portal at http://localhost/admin.

Production Deployment Topologies

Topology A: Unified JAR Distribution

To host both portals directly inside the backend JAR for a single-port deployment:

  1. Navigate to the frontend directory and build the assets:
    cd frontend
    npm run build:portal
    npm run build:admin
  2. Copy the production output assets into the Spring Boot resource folders:
    cp -r public-portal/dist/* ../spring-backend/src/main/resources/static/portal/
    cp -r admin-portal/dist/* ../spring-backend/src/main/resources/static/admin/
  3. Build the unified JAR:
    cd ../spring-backend
    mvn clean package -DskipTests
  4. Run the JAR:
    java -jar target/spring-backend-0.0.1-SNAPSHOT.jar

Access the portals at http://localhost:8080/portal/index.html and http://localhost:8080/admin/index.html.

Topology B: Split Containers (Nginx + Spring) — Recommended

Run the Frontend container served by Nginx alongside the Backend container, mapping backend CORS policies to allow the production Nginx domain names.


API Endpoint Specifications

Authentication Operations

HTTP MethodEndpointDescription
POST/api/v1/auth/registerCreate student account.
POST/api/v1/auth/loginAuthenticate student user, returns stateless JWT HttpOnly cookies (accessToken, refreshToken).
POST/api/v1/auth/refresh-tokenRequest new accessToken using refreshToken cookie.
POST/api/v1/auth/logoutEvict client auth cookies and terminate session.

Student Profiles (/api/v1/users/**)

HTTP MethodEndpointDescription
GET/api/v1/users/meFetch currently logged-in student profile details.
PUT/api/v1/users/meUpdate candidate profile metadata.

Partner Companies (/api/v1/companies/**)

HTTP MethodEndpointDescription
GET/api/v1/companiesRetrieve listing of partner employers.
POST/api/v1/companiesRegister a partner employer.

Job Board Operations (/api/v1/jobs/** & /api/v1/public/jobs/**)

HTTP MethodEndpointDescription
GET/api/v1/public/jobsPaginated job listings search.
GET/api/v1/jobs/{id}Fetch detailed job specification page.
POST/api/v1/jobs/importTrigger the job scraper and ingestion feed engine.

Cloud File Uploads (/api/v1/upload/**)

HTTP MethodEndpointDescription
POST/api/v1/upload/resumeProcess resume PDF uploads directly to Cloudinary.
POST/api/v1/upload/imageHandle avatar and company brand logo uploads to Cloudinary.

Admin Core Controllers (/api/v1/admin/**)

HTTP MethodEndpointDescription
POST/api/v1/admin/auth/loginAuthenticate administrative dashboard privileges.
GET/api/v1/admin/dashboard/analyticsFetch aggregated metrics (sign-up trends, active counts, jobs categories).
PATCH/api/v1/admin/users/{id}/statusToggle student account activation status (active vs. blocked).

About

ApplyDrive is a high-performance, enterprise-grade job aggregator and off-campus recruitment platform designed to curate, organize, and streamline off-campus hiring opportunities.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ApplyDrive: Job Aggregator Hiring Platform

ApplyDrive is a high-performance, enterprise-grade job aggregator and off-campus recruitment platform designed to curate, organize, and streamline off-campus hiring opportunities. The application is built using a highly secure decoupled architecture featuring React SPA client portals and a robust Spring Boot REST API backend.


Java 17Spring Boot 3.3.0React 18.3.1ViteTailwindCSSDocker


Table of Contents

  1. Key Features
  2. Architecture Overview
  3. Technology Stack
  4. Project Directory Map
  5. Local Development Setup
  6. Environment Configurations
  7. Dockerization Guide
  8. Production Deployment Topologies
  9. API Endpoint Specifications

Key Features

  • Secure Sessions & Authentication: JWT authentication utilizing secure, stateless HTTP-Only cookies (accessToken and refreshToken) for robust mitigation of Cross-Site Scripting (XSS) and Session hijacking risks.
  • Double Portal Architecture: Decoupled interface supporting both a Student Public Portal (for searching jobs, uploading resumes, tracking applications) and a comprehensive Admin Console.
  • Dynamic Job Ingestion: Custom scraper and importer service to ingest off-campus job drives dynamically from external feeds and listings.
  • Admin Command & Analytics: Admin dashboard for toggling user active status, registering partner companies, and monitoring candidate metrics.
  • Cloud Image/Resume Hosting: High-speed resume uploads and company logo mapping integrated directly with Cloudinary APIs.
  • Real-time Synchronization: Robust caching and synchronization services for efficient data fetching and minimal database load.

Architecture Overview

The following diagram illustrates the network flow, security boundary, and service communication of the ApplyDrive platform:

graph TD
subgraph ClientTier [Client Tier]
PublicClient["Student Portal - React SPA"]
AdminClient["Admin Portal - React SPA"]
end
subgraph RouterTier [Nginx Router]
Router{"Nginx Proxy / Docker"}
PublicClient -->|"Path: /portal"| Router
AdminClient -->|"Path: /admin"| Router
end
subgraph BackendTier [Spring Boot Backend]
API["Spring Boot REST Controllers"]
SecurityChain["Spring Security & JWT Filters"]
Services["Job, Company, User & Sync Services"]
Router -->|"API Proxy: /api/v1/**"| API
API <--> SecurityChain
API <--> Services
end
subgraph InfrastructureTier [External Services]
DB[("MySQL Relational DB")]
Cloudinary["Cloudinary CDN Store"]
SMTP["Brevo SMTP Server"]
Scraper["External Off-Campus Feeds"]
Services <-->|"Spring Data JPA / Hikari"| DB
Services --->|"Upload API / SDK"| Cloudinary
Services -.->|"Transaction Mails"| SMTP
Services --->|"Ingestion Job"| Scraper
end
style Router fill:#646CFF,stroke:#fff,stroke-width:2px,color:#fff
style ClientTier fill:#1b1b1f,stroke:#333,stroke-width:1px,color:#fff
style BackendTier fill:#222,stroke:#6DB33F,stroke-width:2px,color:#fff
style InfrastructureTier fill:#1b1b1f,stroke:#333,stroke-width:1px,color:#fff
Loading

Technology Stack

Backend Technologies

ComponentTechnologyDescription
LanguageJavaCore application runtime environment (Java 17)
FrameworkSpring BootCore REST API backend architecture (v3.3.0)
SecuritySpring SecurityStateless authentication using JWT cookies & Custom filters
DatabaseMySQLMain relational database management system
ORMHibernateData access layer, entity mappings and query parsing
Build SystemMavenProject dependencies compilation and builder
Cloud CDNCloudinaryDistributed media upload hosting API for resumes and logos
Mail DispatcherBrevoSMTP mailing engine configuration for transactional mailings

Frontend Technologies

ComponentTechnologyDescription
SPA LibraryReactComponent-driven user interface rendering (v18.3.1)
Build EngineViteBundler & high-speed development server (v5.2.11)
Style SheetTailwind CSSUtility-first responsive design spacing layout guidelines (v3.4.4)
UI ComponentsHeroUIBeautifully crafted premium React UI components (@heroui/react)
Data FetchingTanStack QueryDeclarative state management and asynchronous data queries
State ManagerReduxGlobal state container for token synchronizations and user info
AnimationsFramer MotionFluid web interactions and layout transition triggers

Project Directory Map

This repository is optimized for API development. Git tracking is strictly restricted to protect sensitive workspace configurations and isolate frontend UI code:

├── frontend/ # React Frontend Applications
│ ├── public-portal/ # Student portal files
│ │ └── src/services/ # HTTP client API Integrations (staged)
│ ├── admin-portal/ # Admin portal files
│ │ └── src/services/ # Admin client API Integrations (staged)
│ ├── package.json # Frontend dependency manifest
│ ├── tailwind.config.js # Styles design token configuration
│ └── Dockerfile # Multi-stage production Nginx serve file
│
└── spring-backend/ # Spring Boot Backend REST Service
├── src/main/java/com/jobportal/
│ ├── config/ # CORS configuration, database seeder config
│ ├── controller/ # REST Controllers (Auth, Jobs, Company)
│ ├── dto/ # Request & Response Data Transfer Objects
│ ├── entity/ # Hibernate Entity Definitions
│ ├── mapper/ # ModelMapper conversions
│ ├── repository/ # Spring Data JPA Repository interfaces
│ ├── security/ # Spring Security, JWT validation and cookie parsers
│ └── service/ # Service interfaces & implementations
├── src/main/resources/
│ ├── application.yml # Main environment configurations
│ └── application.yml.example # Template environment config placeholders
├── Dockerfile # Multi-stage containerization build file
└── pom.xml # Maven build dependencies config

Local Development Setup

Prerequisite Checklist

  • Java: JDK 17 installed
  • NodeJS: Version 18 or higher (along with npm)
  • Database: MySQL Server instance running locally

Running the Backend

  1. Create a MySQL database instance named job_aggregator_db:
    CREATEDATABASEjob_aggregator_db;
  2. Navigate to spring-backend/src/main/resources.
  3. Copy application.yml.example to application.yml:
    cp application.yml.example application.yml
  4. Fill in your credentials inside application.yml (database user/pass, Cloudinary credentials, and Brevo SMTP details).
  5. Start the Spring Boot application using Maven:
    cd spring-backend
    mvn clean compile
    mvn spring-boot:run

The backend server starts by default on port 8080 with context path /.

Running the Frontend

  1. Navigate to the frontend folder:
    cd frontend
  2. Install npm dependencies:
    npm install
  3. Run the Student Public Portal (accessible at http://localhost:5173):
    npm run dev:portal
  4. Run the Admin Portal (accessible at http://localhost:5174):
    npm run dev:admin

Both ports are configured to proxy API requests to your local backend on port 8080.


Environment Configurations

For deployments or container overrides, configure the variables listed below inside your environment or docker container configurations:

Variable NameDescriptionDefault / Example
SPRING_DATASOURCE_URLMySQL Database Connection URLjdbc:mysql://localhost:3306/job_aggregator_db
SPRING_DATASOURCE_USERNAMEDatabase Usernameroot
SPRING_DATASOURCE_PASSWORDDatabase Passwordyour_mysql_password
SPRING_MAIL_HOSTSMTP Server Host Addresssmtp-relay.brevo.com
SPRING_MAIL_PORTSMTP Server Connection Port587
SPRING_MAIL_USERNAMESMTP Mail Account Usernameyour_brevo_mail_username
SPRING_MAIL_PASSWORDSMTP Mail Account Passwordyour_brevo_mail_password
CLOUDINARY_CLOUD_NAMECloudinary Account Cloud Nameyour_cloudinary_cloud_name
CLOUDINARY_API_KEYCloudinary API Keyyour_api_key
CLOUDINARY_API_SECRETCloudinary API Secret Keyyour_api_secret
CLOUDINARY_FOLDERCloudinary Uploads Folderjob-app/images
JWT_SECRETBase64 JWT Secret KeyGenerate a secure Base64 256-bit string
PUBLIC_PORTAL_URLCORS Allowed Origin - Public Portalhttp://localhost:5173
ADMIN_PORTAL_URLCORS Allowed Origin - Admin Portalhttp://localhost:5174

Dockerization Guide

1. Build the Docker Images

Navigate to the root directory and build the multi-stage images:

Backend Image:

cd spring-backend
docker build -t job-backend:latest .

Frontend Image (combines public and admin portals served by Nginx):

cd ../frontend
docker build -t job-frontend:latest .

2. Run with Environment Variables

  1. Map Host Port 8080 to Container Port 8080 for the backend.
  2. Supply environment variables like SPRING_DATASOURCE_URL, SPRING_DATASOURCE_USERNAME, and SPRING_DATASOURCE_PASSWORD.
  3. Map Host Port 80 to Container Port 80 for the Nginx frontend. Access the public portal at http://localhost/portal and the admin portal at http://localhost/admin.

Production Deployment Topologies

Topology A: Unified JAR Distribution

To host both portals directly inside the backend JAR for a single-port deployment:

  1. Navigate to the frontend directory and build the assets:
    cd frontend
    npm run build:portal
    npm run build:admin
  2. Copy the production output assets into the Spring Boot resource folders:
    cp -r public-portal/dist/* ../spring-backend/src/main/resources/static/portal/
    cp -r admin-portal/dist/* ../spring-backend/src/main/resources/static/admin/
  3. Build the unified JAR:
    cd ../spring-backend
    mvn clean package -DskipTests
  4. Run the JAR:
    java -jar target/spring-backend-0.0.1-SNAPSHOT.jar

Access the portals at http://localhost:8080/portal/index.html and http://localhost:8080/admin/index.html.

Topology B: Split Containers (Nginx + Spring) — Recommended

Run the Frontend container served by Nginx alongside the Backend container, mapping backend CORS policies to allow the production Nginx domain names.


API Endpoint Specifications

Authentication Operations

HTTP MethodEndpointDescription
POST/api/v1/auth/registerCreate student account.
POST/api/v1/auth/loginAuthenticate student user, returns stateless JWT HttpOnly cookies (accessToken, refreshToken).
POST/api/v1/auth/refresh-tokenRequest new accessToken using refreshToken cookie.
POST/api/v1/auth/logoutEvict client auth cookies and terminate session.

Student Profiles (/api/v1/users/**)

HTTP MethodEndpointDescription
GET/api/v1/users/meFetch currently logged-in student profile details.
PUT/api/v1/users/meUpdate candidate profile metadata.

Partner Companies (/api/v1/companies/**)

HTTP MethodEndpointDescription
GET/api/v1/companiesRetrieve listing of partner employers.
POST/api/v1/companiesRegister a partner employer.

Job Board Operations (/api/v1/jobs/** & /api/v1/public/jobs/**)

HTTP MethodEndpointDescription
GET/api/v1/public/jobsPaginated job listings search.
GET/api/v1/jobs/{id}Fetch detailed job specification page.
POST/api/v1/jobs/importTrigger the job scraper and ingestion feed engine.

Cloud File Uploads (/api/v1/upload/**)

HTTP MethodEndpointDescription
POST/api/v1/upload/resumeProcess resume PDF uploads directly to Cloudinary.
POST/api/v1/upload/imageHandle avatar and company brand logo uploads to Cloudinary.

Admin Core Controllers (/api/v1/admin/**)

HTTP MethodEndpointDescription
POST/api/v1/admin/auth/loginAuthenticate administrative dashboard privileges.
GET/api/v1/admin/dashboard/analyticsFetch aggregated metrics (sign-up trends, active counts, jobs categories).
PATCH/api/v1/admin/users/{id}/statusToggle student account activation status (active vs. blocked).

About

ApplyDrive is a high-performance, enterprise-grade job aggregator and off-campus recruitment platform designed to curate, organize, and streamline off-campus hiring opportunities.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ApplyDrive: Job Aggregator Hiring Platform

ApplyDrive is a high-performance, enterprise-grade job aggregator and off-campus recruitment platform designed to curate, organize, and streamline off-campus hiring opportunities. The application is built using a highly secure decoupled architecture featuring React SPA client portals and a robust Spring Boot REST API backend.


Java 17Spring Boot 3.3.0React 18.3.1ViteTailwindCSSDocker


Table of Contents

  1. Key Features
  2. Architecture Overview
  3. Technology Stack
  4. Project Directory Map
  5. Local Development Setup
  6. Environment Configurations
  7. Dockerization Guide
  8. Production Deployment Topologies
  9. API Endpoint Specifications

Key Features

  • Secure Sessions & Authentication: JWT authentication utilizing secure, stateless HTTP-Only cookies (accessToken and refreshToken) for robust mitigation of Cross-Site Scripting (XSS) and Session hijacking risks.
  • Double Portal Architecture: Decoupled interface supporting both a Student Public Portal (for searching jobs, uploading resumes, tracking applications) and a comprehensive Admin Console.
  • Dynamic Job Ingestion: Custom scraper and importer service to ingest off-campus job drives dynamically from external feeds and listings.
  • Admin Command & Analytics: Admin dashboard for toggling user active status, registering partner companies, and monitoring candidate metrics.
  • Cloud Image/Resume Hosting: High-speed resume uploads and company logo mapping integrated directly with Cloudinary APIs.
  • Real-time Synchronization: Robust caching and synchronization services for efficient data fetching and minimal database load.

Architecture Overview

The following diagram illustrates the network flow, security boundary, and service communication of the ApplyDrive platform:

graph TD
subgraph ClientTier [Client Tier]
PublicClient["Student Portal - React SPA"]
AdminClient["Admin Portal - React SPA"]
end
subgraph RouterTier [Nginx Router]
Router{"Nginx Proxy / Docker"}
PublicClient -->|"Path: /portal"| Router
AdminClient -->|"Path: /admin"| Router
end
subgraph BackendTier [Spring Boot Backend]
API["Spring Boot REST Controllers"]
SecurityChain["Spring Security & JWT Filters"]
Services["Job, Company, User & Sync Services"]
Router -->|"API Proxy: /api/v1/**"| API
API <--> SecurityChain
API <--> Services
end
subgraph InfrastructureTier [External Services]
DB[("MySQL Relational DB")]
Cloudinary["Cloudinary CDN Store"]
SMTP["Brevo SMTP Server"]
Scraper["External Off-Campus Feeds"]
Services <-->|"Spring Data JPA / Hikari"| DB
Services --->|"Upload API / SDK"| Cloudinary
Services -.->|"Transaction Mails"| SMTP
Services --->|"Ingestion Job"| Scraper
end
style Router fill:#646CFF,stroke:#fff,stroke-width:2px,color:#fff
style ClientTier fill:#1b1b1f,stroke:#333,stroke-width:1px,color:#fff
style BackendTier fill:#222,stroke:#6DB33F,stroke-width:2px,color:#fff
style InfrastructureTier fill:#1b1b1f,stroke:#333,stroke-width:1px,color:#fff
Loading

Technology Stack

Backend Technologies

ComponentTechnologyDescription
LanguageJavaCore application runtime environment (Java 17)
FrameworkSpring BootCore REST API backend architecture (v3.3.0)
SecuritySpring SecurityStateless authentication using JWT cookies & Custom filters
DatabaseMySQLMain relational database management system
ORMHibernateData access layer, entity mappings and query parsing
Build SystemMavenProject dependencies compilation and builder
Cloud CDNCloudinaryDistributed media upload hosting API for resumes and logos
Mail DispatcherBrevoSMTP mailing engine configuration for transactional mailings

Frontend Technologies

ComponentTechnologyDescription
SPA LibraryReactComponent-driven user interface rendering (v18.3.1)
Build EngineViteBundler & high-speed development server (v5.2.11)
Style SheetTailwind CSSUtility-first responsive design spacing layout guidelines (v3.4.4)
UI ComponentsHeroUIBeautifully crafted premium React UI components (@heroui/react)
Data FetchingTanStack QueryDeclarative state management and asynchronous data queries
State ManagerReduxGlobal state container for token synchronizations and user info
AnimationsFramer MotionFluid web interactions and layout transition triggers

Project Directory Map

This repository is optimized for API development. Git tracking is strictly restricted to protect sensitive workspace configurations and isolate frontend UI code:

├── frontend/ # React Frontend Applications
│ ├── public-portal/ # Student portal files
│ │ └── src/services/ # HTTP client API Integrations (staged)
│ ├── admin-portal/ # Admin portal files
│ │ └── src/services/ # Admin client API Integrations (staged)
│ ├── package.json # Frontend dependency manifest
│ ├── tailwind.config.js # Styles design token configuration
│ └── Dockerfile # Multi-stage production Nginx serve file
│
└── spring-backend/ # Spring Boot Backend REST Service
├── src/main/java/com/jobportal/
│ ├── config/ # CORS configuration, database seeder config
│ ├── controller/ # REST Controllers (Auth, Jobs, Company)
│ ├── dto/ # Request & Response Data Transfer Objects
│ ├── entity/ # Hibernate Entity Definitions
│ ├── mapper/ # ModelMapper conversions
│ ├── repository/ # Spring Data JPA Repository interfaces
│ ├── security/ # Spring Security, JWT validation and cookie parsers
│ └── service/ # Service interfaces & implementations
├── src/main/resources/
│ ├── application.yml # Main environment configurations
│ └── application.yml.example # Template environment config placeholders
├── Dockerfile # Multi-stage containerization build file
└── pom.xml # Maven build dependencies config

Local Development Setup

Prerequisite Checklist

  • Java: JDK 17 installed
  • NodeJS: Version 18 or higher (along with npm)
  • Database: MySQL Server instance running locally

Running the Backend

  1. Create a MySQL database instance named job_aggregator_db:
    CREATEDATABASEjob_aggregator_db;
  2. Navigate to spring-backend/src/main/resources.
  3. Copy application.yml.example to application.yml:
    cp application.yml.example application.yml
  4. Fill in your credentials inside application.yml (database user/pass, Cloudinary credentials, and Brevo SMTP details).
  5. Start the Spring Boot application using Maven:
    cd spring-backend
    mvn clean compile
    mvn spring-boot:run

The backend server starts by default on port 8080 with context path /.

Running the Frontend

  1. Navigate to the frontend folder:
    cd frontend
  2. Install npm dependencies:
    npm install
  3. Run the Student Public Portal (accessible at http://localhost:5173):
    npm run dev:portal
  4. Run the Admin Portal (accessible at http://localhost:5174):
    npm run dev:admin

Both ports are configured to proxy API requests to your local backend on port 8080.


Environment Configurations

For deployments or container overrides, configure the variables listed below inside your environment or docker container configurations:

Variable NameDescriptionDefault / Example
SPRING_DATASOURCE_URLMySQL Database Connection URLjdbc:mysql://localhost:3306/job_aggregator_db
SPRING_DATASOURCE_USERNAMEDatabase Usernameroot
SPRING_DATASOURCE_PASSWORDDatabase Passwordyour_mysql_password
SPRING_MAIL_HOSTSMTP Server Host Addresssmtp-relay.brevo.com
SPRING_MAIL_PORTSMTP Server Connection Port587
SPRING_MAIL_USERNAMESMTP Mail Account Usernameyour_brevo_mail_username
SPRING_MAIL_PASSWORDSMTP Mail Account Passwordyour_brevo_mail_password
CLOUDINARY_CLOUD_NAMECloudinary Account Cloud Nameyour_cloudinary_cloud_name
CLOUDINARY_API_KEYCloudinary API Keyyour_api_key
CLOUDINARY_API_SECRETCloudinary API Secret Keyyour_api_secret
CLOUDINARY_FOLDERCloudinary Uploads Folderjob-app/images
JWT_SECRETBase64 JWT Secret KeyGenerate a secure Base64 256-bit string
PUBLIC_PORTAL_URLCORS Allowed Origin - Public Portalhttp://localhost:5173
ADMIN_PORTAL_URLCORS Allowed Origin - Admin Portalhttp://localhost:5174

Dockerization Guide

1. Build the Docker Images

Navigate to the root directory and build the multi-stage images:

Backend Image:

cd spring-backend
docker build -t job-backend:latest .

Frontend Image (combines public and admin portals served by Nginx):

cd ../frontend
docker build -t job-frontend:latest .

2. Run with Environment Variables

  1. Map Host Port 8080 to Container Port 8080 for the backend.
  2. Supply environment variables like SPRING_DATASOURCE_URL, SPRING_DATASOURCE_USERNAME, and SPRING_DATASOURCE_PASSWORD.
  3. Map Host Port 80 to Container Port 80 for the Nginx frontend. Access the public portal at http://localhost/portal and the admin portal at http://localhost/admin.

Production Deployment Topologies

Topology A: Unified JAR Distribution

To host both portals directly inside the backend JAR for a single-port deployment:

  1. Navigate to the frontend directory and build the assets:
    cd frontend
    npm run build:portal
    npm run build:admin
  2. Copy the production output assets into the Spring Boot resource folders:
    cp -r public-portal/dist/* ../spring-backend/src/main/resources/static/portal/
    cp -r admin-portal/dist/* ../spring-backend/src/main/resources/static/admin/
  3. Build the unified JAR:
    cd ../spring-backend
    mvn clean package -DskipTests
  4. Run the JAR:
    java -jar target/spring-backend-0.0.1-SNAPSHOT.jar

Access the portals at http://localhost:8080/portal/index.html and http://localhost:8080/admin/index.html.

Topology B: Split Containers (Nginx + Spring) — Recommended

Run the Frontend container served by Nginx alongside the Backend container, mapping backend CORS policies to allow the production Nginx domain names.


API Endpoint Specifications

Authentication Operations

HTTP MethodEndpointDescription
POST/api/v1/auth/registerCreate student account.
POST/api/v1/auth/loginAuthenticate student user, returns stateless JWT HttpOnly cookies (accessToken, refreshToken).
POST/api/v1/auth/refresh-tokenRequest new accessToken using refreshToken cookie.
POST/api/v1/auth/logoutEvict client auth cookies and terminate session.

Student Profiles (/api/v1/users/**)

HTTP MethodEndpointDescription
GET/api/v1/users/meFetch currently logged-in student profile details.
PUT/api/v1/users/meUpdate candidate profile metadata.

Partner Companies (/api/v1/companies/**)

HTTP MethodEndpointDescription
GET/api/v1/companiesRetrieve listing of partner employers.
POST/api/v1/companiesRegister a partner employer.

Job Board Operations (/api/v1/jobs/** & /api/v1/public/jobs/**)

HTTP MethodEndpointDescription
GET/api/v1/public/jobsPaginated job listings search.
GET/api/v1/jobs/{id}Fetch detailed job specification page.
POST/api/v1/jobs/importTrigger the job scraper and ingestion feed engine.

Cloud File Uploads (/api/v1/upload/**)

HTTP MethodEndpointDescription
POST/api/v1/upload/resumeProcess resume PDF uploads directly to Cloudinary.
POST/api/v1/upload/imageHandle avatar and company brand logo uploads to Cloudinary.

Admin Core Controllers (/api/v1/admin/**)

HTTP MethodEndpointDescription
POST/api/v1/admin/auth/loginAuthenticate administrative dashboard privileges.
GET/api/v1/admin/dashboard/analyticsFetch aggregated metrics (sign-up trends, active counts, jobs categories).
PATCH/api/v1/admin/users/{id}/statusToggle student account activation status (active vs. blocked).

About

ApplyDrive is a high-performance, enterprise-grade job aggregator and off-campus recruitment platform designed to curate, organize, and streamline off-campus hiring opportunities.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Latest commit

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ApplyDrive: Job Aggregator Hiring Platform

ApplyDrive is a high-performance, enterprise-grade job aggregator and off-campus recruitment platform designed to curate, organize, and streamline off-campus hiring opportunities. The application is built using a highly secure decoupled architecture featuring React SPA client portals and a robust Spring Boot REST API backend.


Java 17Spring Boot 3.3.0React 18.3.1ViteTailwindCSSDocker


Table of Contents

  1. Key Features
  2. Architecture Overview
  3. Technology Stack
  4. Project Directory Map
  5. Local Development Setup
  6. Environment Configurations
  7. Dockerization Guide
  8. Production Deployment Topologies
  9. API Endpoint Specifications

Key Features

  • Secure Sessions & Authentication: JWT authentication utilizing secure, stateless HTTP-Only cookies (accessToken and refreshToken) for robust mitigation of Cross-Site Scripting (XSS) and Session hijacking risks.
  • Double Portal Architecture: Decoupled interface supporting both a Student Public Portal (for searching jobs, uploading resumes, tracking applications) and a comprehensive Admin Console.
  • Dynamic Job Ingestion: Custom scraper and importer service to ingest off-campus job drives dynamically from external feeds and listings.
  • Admin Command & Analytics: Admin dashboard for toggling user active status, registering partner companies, and monitoring candidate metrics.
  • Cloud Image/Resume Hosting: High-speed resume uploads and company logo mapping integrated directly with Cloudinary APIs.
  • Real-time Synchronization: Robust caching and synchronization services for efficient data fetching and minimal database load.

Architecture Overview

The following diagram illustrates the network flow, security boundary, and service communication of the ApplyDrive platform:

graph TD
subgraph ClientTier [Client Tier]
PublicClient["Student Portal - React SPA"]
AdminClient["Admin Portal - React SPA"]
end
subgraph RouterTier [Nginx Router]
Router{"Nginx Proxy / Docker"}
PublicClient -->|"Path: /portal"| Router
AdminClient -->|"Path: /admin"| Router
end
subgraph BackendTier [Spring Boot Backend]
API["Spring Boot REST Controllers"]
SecurityChain["Spring Security & JWT Filters"]
Services["Job, Company, User & Sync Services"]
Router -->|"API Proxy: /api/v1/**"| API
API <--> SecurityChain
API <--> Services
end
subgraph InfrastructureTier [External Services]
DB[("MySQL Relational DB")]
Cloudinary["Cloudinary CDN Store"]
SMTP["Brevo SMTP Server"]
Scraper["External Off-Campus Feeds"]
Services <-->|"Spring Data JPA / Hikari"| DB
Services --->|"Upload API / SDK"| Cloudinary
Services -.->|"Transaction Mails"| SMTP
Services --->|"Ingestion Job"| Scraper
end
style Router fill:#646CFF,stroke:#fff,stroke-width:2px,color:#fff
style ClientTier fill:#1b1b1f,stroke:#333,stroke-width:1px,color:#fff
style BackendTier fill:#222,stroke:#6DB33F,stroke-width:2px,color:#fff
style InfrastructureTier fill:#1b1b1f,stroke:#333,stroke-width:1px,color:#fff
Loading

Technology Stack

Backend Technologies

ComponentTechnologyDescription
LanguageJavaCore application runtime environment (Java 17)
FrameworkSpring BootCore REST API backend architecture (v3.3.0)
SecuritySpring SecurityStateless authentication using JWT cookies & Custom filters
DatabaseMySQLMain relational database management system
ORMHibernateData access layer, entity mappings and query parsing
Build SystemMavenProject dependencies compilation and builder
Cloud CDNCloudinaryDistributed media upload hosting API for resumes and logos
Mail DispatcherBrevoSMTP mailing engine configuration for transactional mailings

Frontend Technologies

ComponentTechnologyDescription
SPA LibraryReactComponent-driven user interface rendering (v18.3.1)
Build EngineViteBundler & high-speed development server (v5.2.11)
Style SheetTailwind CSSUtility-first responsive design spacing layout guidelines (v3.4.4)
UI ComponentsHeroUIBeautifully crafted premium React UI components (@heroui/react)
Data FetchingTanStack QueryDeclarative state management and asynchronous data queries
State ManagerReduxGlobal state container for token synchronizations and user info
AnimationsFramer MotionFluid web interactions and layout transition triggers

Project Directory Map

This repository is optimized for API development. Git tracking is strictly restricted to protect sensitive workspace configurations and isolate frontend UI code:

├── frontend/ # React Frontend Applications
│ ├── public-portal/ # Student portal files
│ │ └── src/services/ # HTTP client API Integrations (staged)
│ ├── admin-portal/ # Admin portal files
│ │ └── src/services/ # Admin client API Integrations (staged)
│ ├── package.json # Frontend dependency manifest
│ ├── tailwind.config.js # Styles design token configuration
│ └── Dockerfile # Multi-stage production Nginx serve file
│
└── spring-backend/ # Spring Boot Backend REST Service
├── src/main/java/com/jobportal/
│ ├── config/ # CORS configuration, database seeder config
│ ├── controller/ # REST Controllers (Auth, Jobs, Company)
│ ├── dto/ # Request & Response Data Transfer Objects
│ ├── entity/ # Hibernate Entity Definitions
│ ├── mapper/ # ModelMapper conversions
│ ├── repository/ # Spring Data JPA Repository interfaces
│ ├── security/ # Spring Security, JWT validation and cookie parsers
│ └── service/ # Service interfaces & implementations
├── src/main/resources/
│ ├── application.yml # Main environment configurations
│ └── application.yml.example # Template environment config placeholders
├── Dockerfile # Multi-stage containerization build file
└── pom.xml # Maven build dependencies config

Local Development Setup

Prerequisite Checklist

  • Java: JDK 17 installed
  • NodeJS: Version 18 or higher (along with npm)
  • Database: MySQL Server instance running locally

Running the Backend

  1. Create a MySQL database instance named job_aggregator_db:
    CREATEDATABASEjob_aggregator_db;
  2. Navigate to spring-backend/src/main/resources.
  3. Copy application.yml.example to application.yml:
    cp application.yml.example application.yml
  4. Fill in your credentials inside application.yml (database user/pass, Cloudinary credentials, and Brevo SMTP details).
  5. Start the Spring Boot application using Maven:
    cd spring-backend
    mvn clean compile
    mvn spring-boot:run

The backend server starts by default on port 8080 with context path /.

Running the Frontend

  1. Navigate to the frontend folder:
    cd frontend
  2. Install npm dependencies:
    npm install
  3. Run the Student Public Portal (accessible at http://localhost:5173):
    npm run dev:portal
  4. Run the Admin Portal (accessible at http://localhost:5174):
    npm run dev:admin

Both ports are configured to proxy API requests to your local backend on port 8080.


Environment Configurations

For deployments or container overrides, configure the variables listed below inside your environment or docker container configurations:

Variable NameDescriptionDefault / Example
SPRING_DATASOURCE_URLMySQL Database Connection URLjdbc:mysql://localhost:3306/job_aggregator_db
SPRING_DATASOURCE_USERNAMEDatabase Usernameroot
SPRING_DATASOURCE_PASSWORDDatabase Passwordyour_mysql_password
SPRING_MAIL_HOSTSMTP Server Host Addresssmtp-relay.brevo.com
SPRING_MAIL_PORTSMTP Server Connection Port587
SPRING_MAIL_USERNAMESMTP Mail Account Usernameyour_brevo_mail_username
SPRING_MAIL_PASSWORDSMTP Mail Account Passwordyour_brevo_mail_password
CLOUDINARY_CLOUD_NAMECloudinary Account Cloud Nameyour_cloudinary_cloud_name
CLOUDINARY_API_KEYCloudinary API Keyyour_api_key
CLOUDINARY_API_SECRETCloudinary API Secret Keyyour_api_secret
CLOUDINARY_FOLDERCloudinary Uploads Folderjob-app/images
JWT_SECRETBase64 JWT Secret KeyGenerate a secure Base64 256-bit string
PUBLIC_PORTAL_URLCORS Allowed Origin - Public Portalhttp://localhost:5173
ADMIN_PORTAL_URLCORS Allowed Origin - Admin Portalhttp://localhost:5174

Dockerization Guide

1. Build the Docker Images

Navigate to the root directory and build the multi-stage images:

Backend Image:

cd spring-backend
docker build -t job-backend:latest .

Frontend Image (combines public and admin portals served by Nginx):

cd ../frontend
docker build -t job-frontend:latest .

2. Run with Environment Variables

  1. Map Host Port 8080 to Container Port 8080 for the backend.
  2. Supply environment variables like SPRING_DATASOURCE_URL, SPRING_DATASOURCE_USERNAME, and SPRING_DATASOURCE_PASSWORD.
  3. Map Host Port 80 to Container Port 80 for the Nginx frontend. Access the public portal at http://localhost/portal and the admin portal at http://localhost/admin.

Production Deployment Topologies

Topology A: Unified JAR Distribution

To host both portals directly inside the backend JAR for a single-port deployment:

  1. Navigate to the frontend directory and build the assets:
    cd frontend
    npm run build:portal
    npm run build:admin
  2. Copy the production output assets into the Spring Boot resource folders:
    cp -r public-portal/dist/* ../spring-backend/src/main/resources/static/portal/
    cp -r admin-portal/dist/* ../spring-backend/src/main/resources/static/admin/
  3. Build the unified JAR:
    cd ../spring-backend
    mvn clean package -DskipTests
  4. Run the JAR:
    java -jar target/spring-backend-0.0.1-SNAPSHOT.jar

Access the portals at http://localhost:8080/portal/index.html and http://localhost:8080/admin/index.html.

Topology B: Split Containers (Nginx + Spring) — Recommended

Run the Frontend container served by Nginx alongside the Backend container, mapping backend CORS policies to allow the production Nginx domain names.


API Endpoint Specifications

Authentication Operations

HTTP MethodEndpointDescription
POST/api/v1/auth/registerCreate student account.
POST/api/v1/auth/loginAuthenticate student user, returns stateless JWT HttpOnly cookies (accessToken, refreshToken).
POST/api/v1/auth/refresh-tokenRequest new accessToken using refreshToken cookie.
POST/api/v1/auth/logoutEvict client auth cookies and terminate session.

Student Profiles (/api/v1/users/**)

HTTP MethodEndpointDescription
GET/api/v1/users/meFetch currently logged-in student profile details.
PUT/api/v1/users/meUpdate candidate profile metadata.

Partner Companies (/api/v1/companies/**)

HTTP MethodEndpointDescription
GET/api/v1/companiesRetrieve listing of partner employers.
POST/api/v1/companiesRegister a partner employer.

Job Board Operations (/api/v1/jobs/** & /api/v1/public/jobs/**)

HTTP MethodEndpointDescription
GET/api/v1/public/jobsPaginated job listings search.
GET/api/v1/jobs/{id}Fetch detailed job specification page.
POST/api/v1/jobs/importTrigger the job scraper and ingestion feed engine.

Cloud File Uploads (/api/v1/upload/**)

HTTP MethodEndpointDescription
POST/api/v1/upload/resumeProcess resume PDF uploads directly to Cloudinary.
POST/api/v1/upload/imageHandle avatar and company brand logo uploads to Cloudinary.

Admin Core Controllers (/api/v1/admin/**)

HTTP MethodEndpointDescription
POST/api/v1/admin/auth/loginAuthenticate administrative dashboard privileges.
GET/api/v1/admin/dashboard/analyticsFetch aggregated metrics (sign-up trends, active counts, jobs categories).
PATCH/api/v1/admin/users/{id}/statusToggle student account activation status (active vs. blocked).

About

ApplyDrive is a high-performance, enterprise-grade job aggregator and off-campus recruitment platform designed to curate, organize, and streamline off-campus hiring opportunities.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages