{"id":30850711,"url":"https://github.com/arsh342/job-application-service","last_synced_at":"2026-02-14T04:08:41.218Z","repository":{"id":313544208,"uuid":"1051598977","full_name":"arsh342/Job-Application-Service","owner":"arsh342","description":"The Job Portal Microservices System is a comprehensive, enterprise-grade job application platform built using Spring Boot microservices architecture. This system demonstrates modern software engineering practices with JWT-based authentication, RESTful APIs, and independent service deployment.","archived":false,"fork":false,"pushed_at":"2025-09-21T16:29:52.000Z","size":1904,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-21T18:28:11.991Z","etag":null,"topics":["jwt","micorservices","mysql","spring-boot","spring-security"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arsh342.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-06T10:34:19.000Z","updated_at":"2025-09-21T16:29:55.000Z","dependencies_parsed_at":"2026-01-04T19:01:01.884Z","dependency_job_id":null,"html_url":"https://github.com/arsh342/Job-Application-Service","commit_stats":null,"previous_names":["arsh342/job-application-service"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arsh342/Job-Application-Service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsh342%2FJob-Application-Service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsh342%2FJob-Application-Service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsh342%2FJob-Application-Service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsh342%2FJob-Application-Service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arsh342","download_url":"https://codeload.github.com/arsh342/Job-Application-Service/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsh342%2FJob-Application-Service/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29435592,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T03:34:37.767Z","status":"ssl_error","status_checked_at":"2026-02-14T03:34:09.092Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jwt","micorservices","mysql","spring-boot","spring-security"],"created_at":"2025-09-07T06:15:40.421Z","updated_at":"2026-02-14T04:08:41.212Z","avatar_url":"https://github.com/arsh342.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Job Portal Microservices System\n\n## 📋 Table of Contents\n\n- [Project Overview](#-project-overview)\n- [System Architecture](#️-system-architecture)\n- [Services Overview](#-services-overview)\n- [Authentication Service (Port 8083)](#-authentication-service-port-8083)\n- [Job Service (Port 8081)](#-job-service-port-8081)\n- [Application Service (Port 8082)](#-application-service-port-8082)\n- [Inter-Service Communication Flow](#-inter-service-communication-flow)\n- [API Documentation](#-api-documentation)\n- [Database Schema](#️-database-schema)\n- [Setup \u0026 Installation](#-setup--installation)\n- [User Workflows](#-user-workflows)\n- [Security Implementation](#-security-implementation)\n- [Troubleshooting](#-troubleshooting)\n- [Development Guidelines](#-development-guidelines)\n\n## 🎯 Project Overview\n\nThe **Job Portal Microservices System** is a comprehensive, enterprise-grade job application platform built using Spring Boot microservices architecture. This system demonstrates modern software engineering practices with JWT-based authentication, RESTful APIs, and independent service deployment.\n\n### Key Features\n\n- **Multi-role Support**: Separate experiences for Job Seekers and Employers\n- **Authentication**:\n  - JWT-based authentication with email/password login\n  - JWT issued post-login, used across services for authorization\n  - Cross-service token validation through the Authentication service\n  - Token propagation during navigation via `?token=` URL param and localStorage\n- **Inter-Service Communication**: RESTful calls (Application ↔ Job; all ↔ Authentication)\n- **Scalable Architecture**: Independently deployable Spring Boot services\n- **Modern UI**: Thymeleaf-based, responsive pages per service\n- **Security**: Spring Security with role-based access control\n- **AI-Powered Job Summaries**:\n  - Gemini API integration for intelligent job analysis\n  - Dynamic loading messages with engaging user experience\n  - Personalized profile matching with percentage calculations\n  - Comprehensive job summaries with key responsibilities and skills\n- **Enhanced Job Management**:\n  - Job type categorization (Full-time, Part-time, Contract, Internship, Freelance, Temporary)\n  - Advanced filtering and sorting options\n  - Empty filter states for better user control\n- **User Profile Integration**:\n  - Profile-based job matching\n  - Skills and experience alignment analysis\n  - Personalized application tips\n\n### Technology Stack\n\n| Component          | Technology             | Version     |\n| ------------------ | ---------------------- | ----------- |\n| **Framework**      | Spring Boot            | 3.5.5       |\n| **Language**       | Java                   | 21          |\n| **Security**       | Spring Security + JWT  | JJWT 0.11.5 |\n| **Database**       | MySQL                  | 8.0+        |\n| **ORM**            | Hibernate/JPA          | -           |\n| **Build Tool**     | Maven                  | 3.6+        |\n| **Frontend**       | Thymeleaf + HTML5/CSS3 | -           |\n| **Authentication** | JWT                    |             |\n| **AI Integration** | Google Gemini API      | 2.5-flash   |\n| **Deployment**     | Railway.app            | Cloud       |\n\n## 📦 Dependencies \u0026 Their Functions\n\nThis project uses a comprehensive set of dependencies to build a robust microservices architecture. Below is a detailed breakdown of each dependency and its specific function in the system.\n\n### 🔧 Core Spring Boot Dependencies\n\n#### **Spring Boot Starter Parent (3.5.5)**\n\n- **Function**: Provides dependency management and default configurations for Spring Boot\n- **Usage**: Base parent POM that manages versions of all Spring Boot dependencies\n- **Benefits**: Ensures compatible versions across all Spring Boot components\n\n#### **Spring Boot Starter Web**\n\n- **Function**: Web development framework for creating REST APIs and web applications\n- **Usage**: Core dependency for all three services\n- **Features**:\n  - Embedded Tomcat server\n  - Spring MVC framework\n  - JSON serialization/deserialization\n  - HTTP request/response handling\n\n#### **Spring Boot Starter Data JPA**\n\n- **Function**: Data persistence layer using Hibernate and JPA\n- **Usage**: Database operations in all services\n- **Features**:\n  - Entity mapping and relationships\n  - JPQL and Criteria API\n  - Repository pattern implementation\n  - Automatic schema generation\n\n#### **Spring Boot Starter Validation**\n\n- **Function**: Bean validation for request/response validation\n- **Usage**: Input validation across all REST endpoints\n- **Features**:\n  - Annotation-based validation (@NotNull, @Email, @Size)\n  - Custom validation constraints\n  - Automatic error message generation\n\n#### **Spring Boot Starter Thymeleaf**\n\n- **Function**: Server-side template engine for web UI\n- **Usage**: Rendering HTML pages in all services\n- **Features**:\n  - Dynamic content rendering\n  - Form binding and processing\n  - Template inheritance and fragments\n\n### 🔐 Security Dependencies\n\n#### **Spring Boot Starter Security**\n\n- **Function**: Comprehensive security framework\n- **Usage**: Authentication and authorization across all services\n- **Features**:\n  - HTTP security configuration\n  - Method-level security\n  - CORS handling\n  - Security filter chain\n\n\n\n#### **Thymeleaf Extras Spring Security 6**\n\n- **Function**: Thymeleaf integration with Spring Security\n- **Usage**: Security-aware template rendering\n- **Features**:\n  - Security context access in templates\n  - Conditional rendering based on authentication\n  - CSRF token handling\n\n### 🔑 JWT (JSON Web Token) Dependencies\n\n#### **JJWT API (0.11.5)**\n\n- **Function**: JWT API interfaces and core functionality\n- **Usage**: JWT token creation and parsing\n- **Features**:\n  - Token structure definition\n  - Claims management\n  - Signature algorithms\n\n#### **JJWT Implementation (0.11.5)**\n\n- **Function**: Concrete implementation of JWT functionality\n- **Usage**: Runtime JWT operations\n- **Features**:\n  - Token generation\n  - Token parsing and validation\n  - Cryptographic operations\n\n#### **JJWT Jackson (0.11.5)**\n\n- **Function**: JSON processing integration for JWT\n- **Usage**: JWT payload serialization/deserialization\n- **Features**:\n  - JSON to JWT claims conversion\n  - Custom serializers/deserializers\n  - Date handling for JWT timestamps\n\n### ☁️ Microservices Dependencies\n\n#### **Spring Cloud Starter OpenFeign**\n\n- **Function**: Declarative HTTP client for inter-service communication\n- **Usage**: Service-to-service REST API calls\n- **Features**:\n  - Interface-based client generation\n  - Load balancing integration\n  - Fallback and circuit breaker support\n  - Request/response interceptors\n\n#### **Spring Cloud Dependencies (2025.0.0)**\n\n- **Function**: Dependency management for Spring Cloud components\n- **Usage**: Version alignment for cloud-native features\n- **Features**:\n  - Service discovery\n  - Configuration management\n  - Circuit breakers\n\n### 🗄️ Database Dependencies\n\n#### **MySQL Connector/J**\n\n- **Function**: JDBC driver for MySQL database connectivity\n- **Usage**: Database connection in all services\n- **Features**:\n  - Connection pooling\n  - Transaction management\n  - Performance optimizations\n  - SSL support\n\n### 🛠️ Development \u0026 Utility Dependencies\n\n#### **Spring Boot DevTools**\n\n- **Function**: Development-time enhancements\n- **Usage**: Hot reloading and development productivity\n- **Features**:\n  - Automatic application restart\n  - Live reload of static resources\n  - Property defaults for development\n  - Remote debugging support\n\n#### **Project Lombok**\n\n- **Function**: Code generation library to reduce boilerplate\n- **Usage**: Entity classes, DTOs, and service classes\n- **Features**:\n  - `@Data` - generates getters, setters, toString, equals, hashCode\n  - `@Entity` - JPA entity boilerplate\n  - `@Builder` - builder pattern implementation\n  - `@Slf4j` - logging setup\n\n### 🧪 Testing Dependencies\n\n#### **Spring Boot Starter Test**\n\n- **Function**: Comprehensive testing framework\n- **Usage**: Unit and integration testing\n- **Included Libraries**:\n  - **JUnit 5**: Testing framework with assertions and test lifecycle\n  - **Mockito**: Mocking framework for unit tests\n  - **AssertJ**: Fluent assertions library\n  - **TestContainers**: Integration testing with real databases\n  - **Spring Test**: Spring-specific testing utilities\n\n#### **Spring Security Test**\n\n- **Function**: Testing utilities for security components\n- **Usage**: Testing authentication and authorization\n- **Features**:\n  - Mock authentication contexts\n  - Security test annotations\n  - JWT token testing utilities\n\n### 📋 Service-Specific Dependency Usage\n\n| Dependency          | Authentication Service | Job Service            | Application Service         |\n| ------------------- | ---------------------- | ---------------------- | --------------------------- |\n| **Spring Web**      | ✅ REST APIs + UI      | ✅ REST APIs + UI      | ✅ REST APIs + UI           |\n| **Spring Data JPA** | ✅ User management     | ✅ Job data            | ✅ Application data         |\n| **Spring Security** | ✅ Core auth logic     | ✅ Endpoint protection | ✅ Endpoint protection      |\n| **JWT Libraries**   | ✅ Token generation    | ✅ Token validation    | ✅ Token validation         |\n| **OpenFeign**       | ✅ (Future use)        | ✅ Auth service calls  | ✅ Auth + Job service calls |\n| **Thymeleaf**       | ✅ Login/Register UI   | ✅ Employer dashboard  | ✅ Job seeker dashboard     |\n| **MySQL Connector** | ✅ User database       | ✅ Job database        | ✅ Application database     |\n\n### 🔄 Dependency Interaction Flow\n\n```\nFrontend (Thymeleaf) → Spring Web → Spring Security → JWT Validation\n                                        ↓\nSpring Data JPA → MySQL Connector → Database Operations\n                                        ↓\nOpenFeign → Service-to-Service Communication → Authentication Validation\n```\n\n### 📊 Build Configuration\n\n#### **Maven Compiler Plugin**\n\n- **Function**: Compiles Java source code with annotation processing\n- **Configuration**: Lombok annotation processor for code generation\n\n#### **Spring Boot Maven Plugin**\n\n- **Function**: Packages application as executable JAR\n- **Features**:\n  - Fat JAR creation with embedded server\n  - Development-time application running\n  - Dependency exclusions (Lombok from runtime)\n\n## 🏗️ System Architecture\n\n### Microservices Design Pattern\n\n```mermaid\nflowchart LR\n  subgraph AuthSvc[\"Authentication Service (8083)\"]\n    A1[Login and Register UI]\n    A2[OAuth2 Providers]\n    A3[JWT Issuer and Validator]\n  end\n\n  subgraph JobSvc[\"Job Service (8081)\"]\n    J1[Employer UI]\n    J2[Jobs API]\n  end\n\n  subgraph AppSvc[\"Application Service (8082)\"]\n    P1[Job Seeker UI]\n    P2[Applications API]\n  end\n\n  A3 --\u003e|Validate Token| J2\n  A3 --\u003e|Validate Token| P2\n  P2 --\u003e|Fetch Jobs| J2\n\n  A2 --\u003e A3\n  A3 --\u003e|JWT redirect| P1\n  A3 --\u003e|JWT redirect| J1\n```\n\n### Service Independence Benefits\n\n- **Scalability**: Each service can be scaled based on demand\n- **Technology Flexibility**: Services can use different tech stacks\n- **Fault Isolation**: Service failures don't cascade to others\n- **Independent Deployment**: Update services without affecting others\n\n## 📊 Services Overview\n\n### Service Distribution\n\n| Service            | Port | Database                    | Primary Function         | User Role   |\n| ------------------ | ---- | --------------------------- | ------------------------ | ----------- |\n| **Authentication** | 8083 | `job_portal_auth_db`        | User management \u0026 JWT    | All Users   |\n| **Job**            | 8081 | `job_portal_job_db`         | Job posting \u0026 management | Employers   |\n| **Application**    | 8082 | `job_portal_application_db` | Application tracking     | Job Seekers |\n\n### Communication Matrix\n\n- **Authentication Service**: Provides token validation to all services\n- **Job Service**: Supplies job data to Application Service\n- **Application Service**: Manages applications and fetches job details\n\n## 🔐 Authentication Service (Port 8083)\n\n### Core Functions\n\nThe Authentication Service serves as the central identity management system, handling user registration, login, and token validation across the entire platform.\n\n### Key Components \u0026 Files\n\n#### **Main Application Class**\n\n- **File**: `AuthenticationApplication.java`\n- **Function**: Spring Boot application entry point with `@SpringBootApplication`\n- **Purpose**: Initializes the authentication service with all configurations\n\n#### **Security Configuration**\n\n- **File**: `SecurityConfig.java`\n- **Function**: Configures Spring Security\n- **Features**:\n  - JWT-based authentication\n  - Public UI routes (`/login`, `/register`) and auth APIs under `/api/auth/**`\n  - Stateless session, CORS and headers configuration\n\n#### **JWT Utility**\n\n- **File**: `JwtUtil.java`\n- **Function**: Handles JWT token generation, validation, and parsing\n- **Operations**:\n  - Generate tokens with user information\n  - Extract claims from tokens\n  - Validate token expiration and signature\n  - Parse user details from tokens\n\n#### **User Entity**\n\n- **File**: `User.java`\n- **Structure**:\n  ```java\n  @Entity\n  public class User implements UserDetails {\n      @Id @GeneratedValue private Long id;\n      @Column(unique = true) private String email;\n      private String password; // BCrypt encrypted\n      private String name;\n      @Enumerated private UserType userType; // EMPLOYER/JOB_SEEKER\n      private Long externalUserId; // Reference to other services\n      private String companyName; // For employers\n  }\n  ```\n\n#### **Authentication Controller**\n\n- **File**: `AuthController.java`\n- **Endpoints**:\n  - `POST /api/auth/register` - User registration\n  - `POST /api/auth/login` - User authentication\n  - `POST /api/auth/validate` - Token validation\n- **Features**: Input validation, error handling, response formatting\n\n#### **Authentication Service**\n\n- **File**: `AuthService.java`\n- **Functions**:\n  - User registration with password encryption\n  - Login authentication with JWT generation\n  - Token validation with user information retrieval\n  - Password encoding using BCrypt\n\n#### **User Repository**\n\n- **File**: `UserRepository.java`\n- **Interface**: Extends `JpaRepository\u003cUser, Long\u003e`\n- **Queries**: Custom finder methods for user lookup\n\n#### **Web Controller**\n\n- **File**: `WebController.java`\n- **Purpose**: Handles web page routing for authentication UI\n- **Templates**: login.html, register.html, dashboard.html\n\n\n\n### Service Workflow\n\n1. **Registration**: User submits details → Password encrypted → User saved → Success response\n2. **Login**: Credentials validated → JWT generated → Token returned\n3. **Validation**: Token received → Signature verified → User details extracted → Validation response\n\n## 💼 Job Service (Port 8081)\n\n### Core Functions\n\nThe Job Service manages all job-related operations, providing employers with tools to post, update, and manage job listings while offering public access to job browsing.\n\n### Key Components \u0026 Files\n\n#### **Main Application Class**\n\n- **File**: `JobApplication.java`\n- **Function**: Spring Boot application with `@EnableFeignClients`\n- **Purpose**: Enables communication with other services via Feign\n\n#### **Job Entity**\n\n- **File**: `Job.java`\n- **Structure**:\n  ```java\n  @Entity\n  public class Job {\n      @Id @GeneratedValue private Long jobId;\n      private String title, description, location, company;\n      private Double salaryMin, salaryMax;\n      @Enumerated private JobStatus status; // OPEN/CLOSED\n      private Long employerId;\n      private LocalDate postedDate;\n  }\n  ```\n\n#### **Job Controller**\n\n- **File**: `JobController.java`\n- **Endpoints**:\n  - `GET /api/jobs` - Public job browsing\n  - `POST /api/jobs` - Create job (Employer)\n  - `PUT /api/jobs/{id}` - Update job (Employer)\n  - `DELETE /api/jobs/{id}` - Delete job (Employer)\n- **Features**: Authentication validation, employer authorization\n\n#### **Job Service**\n\n- **File**: `JobService.java`\n- **Functions**:\n  - Job creation with employer validation\n  - Job updates with ownership verification\n  - Job search and filtering\n  - Application count retrieval\n\n#### **Authentication Client**\n\n- **File**: `AuthServiceClient.java`\n- **Purpose**: Communicates with Authentication Service for token validation\n- **Methods**: Validate tokens, retrieve user information\n\n#### **Web Controller**\n\n- **File**: `WebController.java`\n- **Purpose**: Handles employer dashboard and job management UI\n- **Templates**: dashboard.html, create-job.html, job-listings.html\n\n### Service Workflow\n\n1. **Job Creation**: Employer authenticated → Job data validated → Job saved → Success response\n2. **Job Browsing**: Public access → Jobs retrieved → Formatted response\n3. **Job Management**: Employer authenticated → Ownership verified → Operation performed\n\n## 📋 Application Service (Port 8082)\n\n### Core Functions\n\nThe Application Service handles job applications, tracking application status, and providing job seekers with application management tools.\n\n### Key Components \u0026 Files\n\n#### **Main Application Class**\n\n- **File**: `Application.java`\n- **Function**: Spring Boot application with `@EnableFeignClients`\n- **Purpose**: Enables inter-service communication\n\n#### **Application Entity**\n\n- **File**: `JobApplication.java`\n- **Structure**:\n  ```java\n  @Entity\n  public class JobApplication {\n      @Id @GeneratedValue private Long applicationId;\n      private Long jobId, applicantId;\n      private String coverLetter;\n      @Enumerated private ApplicationStatus status; // APPLIED/SHORTLISTED/etc.\n      private LocalDate appliedDate;\n  }\n  ```\n\n#### **Application Controller**\n\n- **File**: `ApplicationController.java`\n- **Endpoints**:\n  - `POST /api/applications` - Apply to job\n  - `GET /api/applications/my-applications` - Get user's applications\n  - `PUT /api/applications/{id}/status` - Update status (Employer)\n- **Features**: Authentication, authorization, data validation\n\n#### **Application Service**\n\n- **File**: `JobApplicationService.java`\n- **Functions**:\n  - Application creation with duplicate prevention\n  - Status updates with permission checks\n  - Application retrieval with job details\n\n#### **Service Clients**\n\n- **Files**: `AuthServiceClient.java`, `JobServiceClient.java`\n- **Purpose**:\n  - Auth client: Token validation and user info\n  - Job client: Fetch job details for applications\n\n#### **Web Controller**\n\n- **File**: Handles job seeker UI routing\n- **Templates**: dashboard.html, browse-jobs.html, my-applications.html\n\n### Service Workflow\n\n1. **Job Application**: User authenticated → Application created → Job details fetched → Success response\n2. **Application Tracking**: User authenticated → Applications retrieved → Job info enriched → Response formatted\n3. **Status Updates**: Employer authenticated → Permissions verified → Status updated\n\n## 🔄 Inter-Service Communication Flow\n\n### Authentication Flow\n\n```mermaid\nsequenceDiagram\n  autonumber\n  participant U as User\n  participant AS as Auth Service\n  participant JS as Job Service\n  participant PS as Application Service\n\n  U-\u003e\u003eAS: Login (form) or OAuth2 (Google/GitHub)\n  AS--\u003e\u003eU: JWT + redirect (based on email domain)\n  U-\u003e\u003ePS: Navigate with ?token=JWT\n  PS-\u003e\u003eAS: POST /api/auth/validate (JWT)\n  AS--\u003e\u003ePS: Valid=true + user info\n  U-\u003e\u003eJS: (from PS) Apply/Fetch Jobs with Authorization: Bearer JWT\n  JS-\u003e\u003eAS: POST /api/auth/validate (JWT)\n  AS--\u003e\u003eJS: Valid=true\n```\n\n### Job Application Flow\n\n```\nJob Seeker Browses Jobs → Job Service (Public)\n    ↓\nSelects Job → Applies via Application Service\n    ↓\nApplication Service → Validates Token with Auth Service\n    ↓\nFetches Job Details → From Job Service\n    ↓\nCreates Application → Saves to Database\n    ↓\nSuccess Response → Job Seeker Dashboard Updated\n```\n\n### Employer Management Flow\n\n```\nEmployer Logs In → Authentication Service\n    ↓\nAccesses Dashboard → Job Service\n    ↓\nCreates Job Posting → Job Service Database\n    ↓\nViews Applications → Application Service Queries\n    ↓\nUpdates Status → Application Service Database\n```\n\n## 📚 API Documentation\n\nAll services support JWT-based authentication with HTTP cookies for seamless page reloads and navigation persistence.\n\n### 🔐 Authentication Service (Port 8083)\n\nBase URL: `http://localhost:8083`\n\n#### **Web Pages (UI Routes)**\n\n```http\nGET  /                          # Home (redirects to login)\nGET  /login                     # Login page\nGET  /register                  # Registration page\n```\n\n#### **REST API Endpoints**\n\n```http\nPOST /api/auth/register         # Register new user\nPOST /api/auth/login            # Authenticate user\nPOST /api/auth/validate         # Validate JWT token\n```\n\n#### **Request/Response Examples**\n\n**User Registration (JSON):**\n\n```json\nPOST /api/auth/register\n{\n  \"email\": \"user@example.com\",\n  \"password\": \"SecurePass123!\",\n  \"name\": \"John Doe\",\n  \"userType\": \"JOB_SEEKER\" // or \"EMPLOYER\"\n}\n}\n\nResponse:\n{\n  \"token\": \"eyJhbGciOiJIUzI1NiJ9...\",\n  \"email\": \"user@example.com\",\n  \"name\": \"John Doe\",\n  \"userType\": \"JOB_SEEKER\",\n  \"userId\": 1\n}\n```\n\n**User Login:**\n\n```json\nPOST /api/auth/login\n{\n  \"email\": \"user@example.com\",\n  \"password\": \"SecurePass123!\"\n}\n\nResponse:\n{\n  \"token\": \"eyJhbGciOiJIUzI1NiJ9...\",\n  \"email\": \"user@example.com\",\n  \"name\": \"John Doe\",\n  \"userType\": \"JOB_SEEKER\",\n  \"userId\": 1\n}\n```\n\n### 💼 Job Service (Port 8081)\n\nBase URL: `http://localhost:8081`\n\n#### **Web Pages (UI Routes)**\n\n```http\nGET  /                          # Home (redirects to dashboard)\nGET  /login-redirect            # Login redirect page\nGET  /dashboard                 # Employer dashboard\nGET  /job-listings              # Employer's job listings\nGET  /jobs                      # Public job browsing (alias)\nGET  /create-job                # Create/edit job form\nGET  /job-details               # Job details page\nGET  /debug                     # Debug information page\n```\n\n#### **Public API Endpoints (No Authentication Required)**\n\n```http\nGET  /api/jobs                  # Browse all public jobs\nGET  /api/jobs/all              # Get all jobs (alias)\nGET  /api/jobs/{jobId}          # Get specific job details\n```\n\n#### **Protected API Endpoints (Authentication Required)**\n\n```http\n# Job Management (Employers)\nPOST   /api/jobs                # Create new job posting\nPUT    /api/jobs/{jobId}        # Update existing job\nDELETE /api/jobs/{jobId}        # Delete job posting\nGET    /api/jobs/my-jobs        # Get employer's jobs\n\n# Employer-specific\nGET    /api/employers/{employerId}/jobs    # Get jobs by employer\n\n# Application Management (Cross-service)\nGET    /api/jobs/{jobId}/applications      # Get job applications\nPUT    /api/applications/{applicationId}/status  # Update application status\n```\n\n#### **Request/Response Examples**\n\n**Create Job:**\n\n```json\nPOST /api/jobs\nHeaders: Authorization: Bearer {token}\n{\n  \"title\": \"Software Developer\",\n  \"description\": \"Full-stack developer position...\",\n  \"location\": \"New York, NY\",\n  \"company\": \"Tech Corp\",\n  \"salaryMin\": 70000.00,\n  \"salaryMax\": 90000.00,\n  \"status\": \"OPEN\"\n}\n\nResponse:\n{\n  \"jobId\": 1,\n  \"title\": \"Software Developer\",\n  \"description\": \"Full-stack developer position...\",\n  \"location\": \"New York, NY\",\n  \"company\": \"Tech Corp\",\n  \"salaryMin\": 70000.00,\n  \"salaryMax\": 90000.00,\n  \"postedDate\": \"2025-09-10\",\n  \"status\": \"OPEN\",\n  \"employerId\": 1\n}\n```\n\n### 📋 Application Service (Port 8082)\n\nBase URL: `http://localhost:8082`\n\n#### **Web Pages (UI Routes)**\n\n```http\nGET  /                          # Home (redirects to dashboard)\nGET  /dashboard                 # Job seeker dashboard\nGET  /browse-jobs               # Browse available jobs\nGET  /my-applications           # View user's applications\nGET  /profile                   # Job seeker profile\nGET  /job-details               # Job details and application\n```\n\n#### **Protected API Endpoints (Authentication Required)**\n\n```http\n# Application Management\nPOST   /api/applications        # Submit job application\nPOST   /api/applications/apply  # Alternative apply endpoint\nPUT    /api/applications/{applicationId}         # Update application\nDELETE /api/applications/{applicationId}         # Withdraw application\nGET    /api/applications/{applicationId}         # Get specific application\n\n# Application Retrieval\nGET    /api/applications/my-applications         # Get user's applications\nGET    /api/applicants/{applicantId}/applications  # Get applicant's applications\nGET    /api/jobs/{jobId}/applications            # Get applications for job\n\n# Application Status (Employers)\nPUT    /api/applications/{applicationId}/status  # Update application status\n\n# Profile Management\nGET    /api/profile                             # Get user profile\nPUT    /api/profile                             # Update user profile\n\n# AI-Powered Features\nGET    /api/gemini-summary                     # Generate AI job summary\n\n# Debug Endpoints\nGET    /api/debug/applications                  # Debug applications\nGET    /api/debug/auth                         # Debug authentication\nGET    /api/debug/user-info                    # Debug user information\n```\n\n#### **Request/Response Examples**\n\n**Submit Application:**\n\n```json\nPOST /api/applications\nHeaders: Authorization: Bearer {token}\n{\n  \"jobId\": 1,\n  \"coverLetter\": \"I am very interested in this position...\",\n  \"resumeUrl\": \"https://example.com/resume.pdf\"\n}\n\nResponse:\n{\n  \"applicationId\": 1,\n  \"jobId\": 1,\n  \"applicantId\": 2,\n  \"coverLetter\": \"I am very interested in this position...\",\n  \"resumeUrl\": \"https://example.com/resume.pdf\",\n  \"status\": \"APPLIED\",\n  \"appliedDate\": \"2025-09-10\"\n}\n```\n\n**Get User Applications:**\n\n```json\nGET /api/applications/my-applications\nHeaders: Authorization: Bearer {token}\n\nResponse:\n[\n  {\n    \"applicationId\": 1,\n    \"jobId\": 1,\n    \"jobTitle\": \"Software Developer\",\n    \"company\": \"Tech Corp\",\n    \"status\": \"APPLIED\",\n    \"appliedDate\": \"2025-09-10\",\n    \"coverLetter\": \"I am very interested...\",\n    \"resumeUrl\": \"https://example.com/resume.pdf\"\n  }\n]\n```\n\n**Generate AI Job Summary:**\n\n```json\nGET /api/gemini-summary?jobId=1\nHeaders: Authorization: Bearer {token}\n\nResponse:\n• **Software Engineer** at **TechCorp** - Full-stack development role\n\n• **Key Responsibilities**:\n  - **React.js** development and maintenance\n  - **API integration** and backend services\n  - **Database design** and optimization\n\n• **Required Skills**: **JavaScript**, **Node.js**, **SQL**, **Git**\n\n• **Profile Match: 85%** - Strong alignment with your React experience\n\n• **Application Tip**: Highlight your full-stack projects and API development experience\n```\n\n### 🔄 Inter-Service Communication\n\nThe services communicate via REST APIs with the following patterns:\n\n#### **Authentication Flow**\n\n1. User logs in through Authentication Service → Receives JWT token\n2. Token included in subsequent requests to Job/Application services\n3. Services validate token with Authentication Service via `/api/auth/validate`\n\n#### **Job Application Flow**\n\n1. Job Seeker browses jobs on Application Service\n2. Application Service fetches job data from Job Service\n3. Application submitted through Application Service\n4. Job Service queries Application Service for application data\n\n#### **Cross-Service Endpoints**\n\n**Job Service ↔ Application Service:**\n\n```http\n# Job Service calls Application Service\nGET  {APPLICATION_SERVICE}/api/jobs/{jobId}/applications\n\n# Application Service calls Job Service\nGET  {JOB_SERVICE}/api/jobs/{jobId}\nGET  {JOB_SERVICE}/api/jobs\n```\n\n**All Services ↔ Authentication Service:**\n\n```http\nPOST {AUTH_SERVICE}/api/auth/validate\n```\n\n### 🔐 Authentication \u0026 Security\n\n#### **JWT Token Format**\n\n- **Header**: `Authorization: Bearer {token}`\n- **Cookie**: `authToken={token}` (for page reload persistence)\n- **Query Parameter**: `?token={token}` (for navigation links)\n\n#### **Token Claims**\n\n```json\n{\n  \"sub\": \"user@example.com\",\n  \"userId\": 1,\n  \"userType\": \"JOB_SEEKER\",\n  \"iat\": 1757444864,\n  \"exp\": 1757531264\n}\n```\n\n#### **Security Features**\n\n- ✅ **JWT Authentication**: Stateless token-based authentication\n- ✅ **HTTP Cookies**: Automatic cookie setting for page reload persistence\n- ✅ **CORS Support**: Cross-origin request handling\n- ✅ **Role-based Access**: Separate endpoints for Employers/Job Seekers\n- ✅ **Token Validation**: Real-time token verification across services\n- ✅ **Secure Headers**: Proper security headers configuration\n\n### 📊 HTTP Status Codes\n\n| Code | Meaning               | Usage                             |\n| ---- | --------------------- | --------------------------------- |\n| 200  | OK                    | Successful requests               |\n| 201  | Created               | Resource created successfully     |\n| 400  | Bad Request           | Invalid request data              |\n| 401  | Unauthorized          | Missing or invalid authentication |\n| 403  | Forbidden             | Access denied for resource        |\n| 404  | Not Found             | Resource not found                |\n| 409  | Conflict              | Resource already exists           |\n| 500  | Internal Server Error | Server processing error           |\n\n## 🤖 AI-Powered Features\n\n### Gemini API Integration\n\nThe Application Service now includes advanced AI capabilities powered by Google's Gemini API to provide intelligent job analysis and personalized insights.\n\n#### **AI Job Summary Generation**\n\n- **Service**: `GeminiService.java` in Application Service\n- **API Endpoint**: `GET /api/gemini-summary?jobId={id}`\n- **Features**:\n  - Comprehensive job analysis with bullet-point format\n  - Personalized profile matching with percentage calculations\n  - Key responsibilities and required skills extraction\n  - Application tips based on user profile\n  - Dynamic loading with engaging progress messages\n\n#### **Dynamic Loading Experience**\n\nThe AI summary generation includes a sophisticated loading system:\n\n```javascript\n// Loading message sequence (3 seconds each)\n1. \"Reading job description...\"\n2. \"Analyzing requirements...\"\n3. \"Fetching your profile data...\"\n4. \"Processing with AI...\"\n5. \"Generating personalized summary...\"\n6. \"Almost ready...\" (final message)\n```\n\n#### **Profile Matching Algorithm**\n\nThe AI calculates profile match percentages based on:\n\n- **Skills Alignment** (40% weight): Technical skills matching\n- **Experience Relevance** (30% weight): Work experience alignment\n- **Education Fit** (20% weight): Educational background compatibility\n- **Career Progression** (10% weight): Career growth potential\n\n#### **Summary Format**\n\nGenerated summaries include:\n\n- **Job Title** at **Company** - Brief overview\n- **Key Responsibilities**: Bullet-pointed main duties\n- **Required Skills**: Highlighted technical and soft skills\n- **Profile Match**: Percentage with explanation\n- **Application Tip**: Personalized advice for the candidate\n\n#### **Configuration**\n\nAdd to your environment variables:\n\n```bash\n# Gemini API Configuration\nGEMINI_API_KEY=your_gemini_api_key_here\n```\n\n### Enhanced Job Management\n\n#### **Job Type Categorization**\n\nJobs now support multiple employment types:\n\n- **Full-time**: Traditional full-time employment\n- **Part-time**: Reduced hours employment\n- **Contract**: Fixed-term contract work\n- **Internship**: Entry-level learning positions\n- **Freelance**: Independent contractor work\n- **Temporary**: Short-term employment\n\n#### **Improved Filtering System**\n\n- **Empty Filter States**: All filters start empty for better user control\n- **Dynamic Filtering**: Real-time job filtering based on multiple criteria\n- **Sorting Options**: Multiple sorting methods (newest, salary, title, etc.)\n- **User-Friendly Display**: Formatted job types and status indicators\n\n### Recent Updates \u0026 Improvements\n\n#### **Frontend Enhancements**\n\n- **Dynamic Loading Messages**: Engaging 3-second intervals with smooth animations\n- **Improved Button Styling**: Better visual feedback and hover effects\n- **Responsive Design**: Optimized for all screen sizes\n- **Error Handling**: User-friendly error messages with retry options\n\n#### **Backend Optimizations**\n\n- **Simplified AI Processing**: Removed autoregressive complexity for faster response\n- **Direct API Integration**: Streamlined Gemini API calls\n- **Profile Validation**: Smart handling of empty user profiles\n- **Performance Improvements**: Reduced processing overhead\n\n#### **User Experience Improvements**\n\n- **Single Loop Loading**: Loading messages complete one cycle before showing results\n- **Profile-Aware Summaries**: Different behavior for users with/without profiles\n- **Clean Formatting**: Proper bullet points and line breaks in summaries\n- **Visual Feedback**: Loading spinners and progress indicators\n\n## 🗄️ Database Schema\n\n### Authentication Database (`job_portal_auth_db`)\n\n```sql\nCREATE TABLE users (\n    id BIGINT PRIMARY KEY AUTO_INCREMENT,\n    email VARCHAR(255) UNIQUE NOT NULL,\n    password VARCHAR(255) NOT NULL,\n    name VARCHAR(255) NOT NULL,\n    user_type ENUM('EMPLOYER', 'APPLICANT') NOT NULL,\n    external_user_id BIGINT,\n    company_name VARCHAR(255),\n    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\n    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\n);\n```\n\n### Job Database (`job_portal_job_db`)\n\n```sql\nCREATE TABLE jobs (\n    job_id BIGINT PRIMARY KEY AUTO_INCREMENT,\n    title VARCHAR(255) NOT NULL,\n    description TEXT NOT NULL,\n    location VARCHAR(255) NOT NULL,\n    company VARCHAR(255) NOT NULL,\n    salary_min DECIMAL(10,2),\n    salary_max DECIMAL(10,2),\n    job_type ENUM('FULL_TIME', 'PART_TIME', 'CONTRACT', 'INTERNSHIP', 'FREELANCE', 'TEMPORARY') DEFAULT 'FULL_TIME',\n    posted_date DATE DEFAULT CURRENT_DATE,\n    status ENUM('OPEN', 'CLOSED') DEFAULT 'OPEN',\n    employer_id BIGINT NOT NULL,\n    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\n    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\n);\n```\n\n### Application Database (`job_portal_application_db`)\n\n```sql\nCREATE TABLE job_applications (\n    application_id BIGINT PRIMARY KEY AUTO_INCREMENT,\n    job_id BIGINT NOT NULL,\n    applicant_id BIGINT NOT NULL,\n    cover_letter TEXT,\n    status ENUM('APPLIED', 'SHORTLISTED', 'REJECTED', 'HIRED') DEFAULT 'APPLIED',\n    applied_date DATE DEFAULT CURRENT_DATE,\n    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\n    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\n    UNIQUE KEY unique_job_applicant (job_id, applicant_id)\n);\n```\n\n## 🚀 Setup \u0026 Installation\n\n### Prerequisites\n\n- **Java**: OpenJDK 21 or higher\n- **Maven**: 3.6+ for dependency management\n- **MySQL**: 8.0+ database server\n- **Git**: For version control\n\n### Database Setup\n\n```sql\n-- Create databases\nCREATE DATABASE job_portal_auth_db;\nCREATE DATABASE job_portal_job_db;\nCREATE DATABASE job_portal_application_db;\n\n-- Create user (optional)\nCREATE USER 'jobportal'@'localhost' IDENTIFIED BY 'password';\nGRANT ALL PRIVILEGES ON job_portal_*.* TO 'jobportal'@'localhost';\n```\n\n### Service Configuration\n\nAdd a `.env` file at repo root (or environment variables) and the services will auto-import it:\n\n```\n# ====== Authentication (8083) ======\nAUTH_DB_URL=jdbc:mysql://localhost:3306/job_portal_auth_db?createDatabaseIfNotExist=true\u0026useSSL=false\u0026serverTimezone=UTC\nAUTH_DB_USERNAME=root\nAUTH_DB_PASSWORD=your_password\nJWT_SECRET=change-me-32b-min\nJWT_EXPIRATION=86400000\n\n# ====== Application (8082) ======\nAPP_DB_URL=jdbc:mysql://localhost:3306/job_portal_application_db?createDatabaseIfNotExist=true\u0026useSSL=false\u0026serverTimezone=UTC\nAPP_DB_USERNAME=root\nAPP_DB_PASSWORD=your_password\nAPP_JWT_SECRET=change-me-32b-min\nAPP_JWT_EXPIRATION=86400000\nGEMINI_API_KEY=your_gemini_api_key_here\n\n# ====== Job (8081) ======\nJOB_DB_URL=jdbc:mysql://localhost:3306/job_portal_job_db?createDatabaseIfNotExist=true\u0026useSSL=false\u0026serverTimezone=UTC\nJOB_DB_USERNAME=root\nJOB_DB_PASSWORD=your_password\nJOB_JWT_SECRET=change-me-32b-min\nJOB_JWT_EXPIRATION=86400000\n```\n\nNotes:\n- Services already import `.env` and `../.env` via `spring.config.import`\n- All JWT secrets must be at least 32 bytes for security\n\n```properties\nspring.datasource.username=your_username\nspring.datasource.password=your_password\nspring.datasource.url=jdbc:mysql://localhost:3306/database_name\n```\n\n### Startup \u0026 Run\n\n```bash\n# Terminal 1: Authentication Service (start first)\ncd Authentication \u0026\u0026 mvn spring-boot:run\n\n# Terminal 2: Job Service\ncd Job \u0026\u0026 mvn spring-boot:run\n\n# Terminal 3: Application Service\ncd Application \u0026\u0026 mvn spring-boot:run\n```\n\n### Access URLs\n\n- **Authentication Portal**: http://localhost:8083\n- **Employer Dashboard**: http://localhost:8081/dashboard\n- **Job Seeker Dashboard**: http://localhost:8082/dashboard\n\n## ☁️ Railway Deployment\n\nThe application is deployed on Railway.app with three separate services:\n\n### Deployed Services\n\n1. **Authentication Service**: Handles user login and registration\n2. **Job Service**: Manages employer job postings  \n3. **Application Service**: Manages job seeker applications\n\n### Railway Configuration\n\nEach service requires the following environment variables:\n\n#### Authentication Service (Root Directory: `/Authentication`)\n```\nAUTH_DB_URL=jdbc:mysql://mysql.railway.internal:3306/railway?allowPublicKeyRetrieval=true\u0026useSSL=false\u0026createDatabaseIfNotExist=true\u0026serverTimezone=UTC\nAUTH_DB_USERNAME=root\nAUTH_DB_PASSWORD=\u003crailway_mysql_password\u003e\nJWT_SECRET=\u003cyour_jwt_secret\u003e\nJWT_EXPIRATION=86400000\nPORT=8083\n```\n\n#### Job Service (Root Directory: `/Job`)\n```\nJOB_DB_URL=jdbc:mysql://mysql.railway.internal:3306/railway?allowPublicKeyRetrieval=true\u0026useSSL=false\u0026createDatabaseIfNotExist=true\u0026serverTimezone=UTC\nJOB_DB_USERNAME=root\nJOB_DB_PASSWORD=\u003crailway_mysql_password\u003e\nJOB_JWT_SECRET=\u003cyour_jwt_secret\u003e\nJOB_JWT_EXPIRATION=86400000\nPORT=8081\n```\n\n#### Application Service (Root Directory: `/Application`)\n```\nAPP_DB_URL=jdbc:mysql://mysql.railway.internal:3306/railway?allowPublicKeyRetrieval=true\u0026useSSL=false\u0026createDatabaseIfNotExist=true\u0026serverTimezone=UTC\nAPP_DB_USERNAME=root\nAPP_DB_PASSWORD=\u003crailway_mysql_password\u003e\nAPP_JWT_SECRET=\u003cyour_jwt_secret\u003e\nAPP_JWT_EXPIRATION=86400000\nGEMINI_API_KEY=\u003cyour_gemini_api_key\u003e\nPORT=8082\n```\n\n### Database Setup\n\n- **Database**: Railway MySQL (shared across all services)\n- **Connection**: `mysql.railway.internal:3306`\n- **Database Name**: `railway`\n- **Auto-create**: Tables are automatically created by Hibernate on first run\n\n### Deployment Steps\n\n1. **Create Railway Project** and connect GitHub repository\n2. **Add MySQL Database** to the project\n3. **Create Three Services**:\n   - Deploy Authentication service with `/Authentication` root directory\n   - Deploy Job service with `/Job` root directory  \n   - Deploy Application service with `/Application` root directory\n4. **Configure Variables** for each service (see above)\n5. **Generate Public Domains** for all three services\n6. **Update Service URLs** in code if services need to communicate via public URLs\n\n### Important Notes\n\n- All three services share the same Railway MySQL database\n- Each service gets its own public HTTPS domain\n- Database credentials are automatically provided by Railway\n- All services must have `allowPublicKeyRetrieval=true` in database URL for Railway MySQL\n\n## 👥 User Workflows\n\n### Job Seeker Journey\n\n1. **Registration**: Create account as JOB_SEEKER\n2. **Authentication**: Login to receive JWT token\n3. **Job Discovery**: Browse available jobs\n4. **Application**: Apply with cover letter\n5. **Tracking**: Monitor application status\n6. **Management**: View and manage applications\n\n### Employer Journey\n\n1. **Registration**: Create account as EMPLOYER\n2. **Authentication**: Login to receive JWT token\n3. **Job Posting**: Create job listings\n4. **Management**: Update and manage jobs\n5. **Review**: View applications for jobs\n6. **Hiring**: Update application status\n\n## 🔒 Security Implementation\n\n### JWT Authentication Flow\n\n1. **Token Generation**: User credentials validated → JWT created with user info\n2. **Token Storage**: Client stores token in localStorage/sessionStorage\n3. **Request Authorization**: Token attached to Authorization header; token passed via URL `?token=` during cross-service navigation\n4. **Token Validation**: Services validate token with Authentication Service\n5. **User Context**: User information extracted and made available\n\n### Frontend Auth Helpers\n\n- `static/js/pre-auth.js`: Handles `?token=` on first paint; stores token; hydrates user info to update sidebar.\n- `static/js/auth-helper.js`: Standardizes token storage, auth checks, token injection on in-app navigation.\n\n### Security Features\n\n- **Password Encryption**: BCrypt hashing for secure storage\n- **Strong Password Requirements**: Minimum 8 characters with uppercase, lowercase, number and special character\n- **Token Expiration**: 24-hour token validity\n- **Role-based Access**: Different permissions for user types\n- **CORS Configuration**: Cross-origin request handling\n- **Input Validation**: Comprehensive request validation\n\n## 🐛 Troubleshooting\n\n### Common Issues\n\n#### Service Startup Problems\n\n```bash\n# Check Java version\njava -version\n\n# Check Maven version\nmvn -version\n\n# Verify MySQL connection\nmysql -u root -p -e \"SHOW DATABASES;\"\n```\n\n#### Authentication Issues\n\n- Verify Authentication Service is running on port 8083\n- Check JWT token format: `Authorization: Bearer \u003ctoken\u003e`\n- OAuth redirect URIs must match the provider configuration (Google/GitHub)\n- On localhost, cookies are not shared across different ports; this project relies on localStorage + URL token propagation instead\n\n#### Database Connection Issues\n\n- Ensure MySQL is running\n- Verify database credentials\n- Check database existence and permissions\n\n### Debug Tools\n\n- **Authentication Debug**: http://localhost:8081/debug\n- **Browser Console**: Check for JavaScript errors\n- **Application Logs**: Review service console output\n\n## 📂 Project File Map (High-level)\n\n```\nJob-Application-Service/\n├── Authentication/\n│   ├── src/main/java/com/service/authentication/\n│   │   ├── config/                # Security config, OAuth2 success handler\n│   │   ├── controller/            # REST + Web controllers\n│   │   ├── dto/                   # DTOs for API requests/responses\n│   │   ├── entity/                # JPA entities (User, UserType)\n│   │   ├── repository/            # Spring Data repositories\n│   │   ├── service/               # Business logic (AuthService, CustomUserDetailsService)\n│   │   └── util/                  # JwtUtil\n│   └── src/main/resources/\n│       ├── templates/             # login.html, register.html\n│       └── application.properties\n│\n├── Job/\n│   ├── src/main/java/com/service/job/\n│   │   ├── controller/            # REST + Web controllers\n│   │   ├── dto/ | model/          # Job DTOs and models\n│   │   ├── repository/            # Job repositories\n│   │   ├── service/               # Job business logic\n│   │   └── config/                # Security/auth filters if any\n│   └── src/main/resources/\n│       ├── templates/             # Employer UI (dashboard, create-job, listings)\n│       └── static/js/             # pre-auth.js, auth-helper.js\n│\n├── Application/\n│   ├── src/main/java/com/service/application/\n│   │   ├── controller/            # REST + Web controllers\n│   │   ├── dto/ | model/          # Application DTOs and models\n│   │   ├── repository/            # Application repositories\n│   │   ├── service/               # Application business logic\n│   │   └── config/                # Request auth filters\n│   └── src/main/resources/\n│       ├── templates/             # Seeker UI (dashboard, browse-jobs, my-applications, profile)\n│       └── static/js/             # pre-auth.js, auth-helper.js\n│\n└── .env.example                   # Environment variable template\n```\n\n## 🗺️ Visual Guides\n\n```mermaid\ngraph TD\n  A[User] --\u003e|OAuth Login| B(Authenticaton Svc)\n  B --\u003e|JWT + Redirect| C{Email Domain?}\n  C --\u003e|Consumer| D[Application Svc]\n  C --\u003e|Business/Other| E[Job Svc]\n  D --\u003e|Validate JWT| B\n  E --\u003e|Validate JWT| B\n  D --\u003e|Fetch Jobs| E\n```\n\n## 📝 Changelog\n\n### Version 2.0.0 - AI Integration \u0026 Enhanced Features\n\n#### 🚀 New Features\n\n- **AI-Powered Job Summaries**: Integrated Google Gemini API for intelligent job analysis\n- **Dynamic Loading System**: Engaging 3-second interval loading messages with smooth animations\n- **Profile Matching Algorithm**: Smart percentage calculation based on skills, experience, and education\n- **Job Type Categorization**: Added support for Full-time, Part-time, Contract, Internship, Freelance, and Temporary jobs\n- **Enhanced Filtering**: Empty filter states for better user control and experience\n\n#### 🔧 Improvements\n\n- **Frontend Enhancements**:\n\n  - Improved button styling with better hover effects\n  - Responsive design optimizations\n  - User-friendly error handling with retry options\n  - Clean bullet-point formatting in AI summaries\n\n- **Backend Optimizations**:\n\n  - Simplified AI processing for faster response times\n  - Streamlined Gemini API integration\n  - Smart profile validation for empty user profiles\n  - Reduced processing overhead\n\n- **User Experience**:\n  - Single-loop loading messages (no infinite cycling)\n  - Profile-aware summary generation\n  - Proper line breaks and formatting in summaries\n  - Visual feedback with loading spinners\n\n#### 🐛 Bug Fixes\n\n- Fixed bullet points displaying on single line instead of separate lines\n- Resolved incorrect profile match percentages for empty profiles\n- Improved error handling in AI summary generation\n- Fixed filter default values to start empty\n\n#### 📊 Technical Changes\n\n- Added `GeminiService.java` for AI integration\n- Updated `Job` entity with `JobType` enum\n- Enhanced frontend JavaScript for dynamic loading\n- Improved CSS animations and styling\n- Added environment variable support for Gemini API key\n\n#### 🔄 API Changes\n\n- New endpoint: `GET /api/gemini-summary?jobId={id}`\n- Updated job creation/update endpoints to support job types\n- Enhanced filtering and sorting capabilities\n- Added debug endpoints for troubleshooting\n\n### Version 1.0.0 - Initial Release\n\n- Basic microservices architecture with Authentication, Job, and Application services\n- JWT-based authentication with OAuth2 integration\n- Job posting and application management\n- User registration and login functionality\n- Inter-service communication via REST APIs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farsh342%2Fjob-application-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farsh342%2Fjob-application-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farsh342%2Fjob-application-service/lists"}