A modern, role-based job posting platform built with Spring Boot
Features β’ Quick Start β’ Demo Accounts β’ Documentation
Jobly is a full-featured job posting and application platform that connects job seekers with employers. Built with enterprise-grade technologies, it demonstrates best practices in Spring Boot development, security, and modern web architecture.
- π Candidates - Browse jobs, submit applications, track application status
- π’ Companies - Create company profiles, post job openings
- π Hiring Managers - Manage job postings, review applications
- βοΈ Super Admin - Platform oversight and user management
Comprehensive admin panel for managing users, companies, and job postings
Company dashboard showing overview and quick actions
View and manage all job postings for your company
Create and edit job postings with detailed information
Candidate dashboard with personalized job recommendations
Detailed job listing view with company information
Submit job applications with cover letter and resume
- β Role-Based Access Control - Secure authentication with 4 distinct user roles
- β Job Management - Full CRUD operations for job postings
- β Application System - Complete job application workflow with status tracking
- β Company Profiles - Dedicated company pages with job listings
- β Admin Dashboard - Comprehensive platform management tools
- π Spring Security - BCrypt password encryption, session management
- π JPA/Hibernate - Auto-generated database schema with audit trails
- π¨ Thymeleaf Templates - Server-side rendering with reusable components
- π Validation - Comprehensive input validation and error handling
- π API Documentation - Swagger/OpenAPI integration
- π Exception Handling - Centralized error management
- Java 21 (LTS)
- MySQL 8.0+
- Maven 3.6+
-
Clone the repository
git clone https://github.com/yourusername/jobly.git cd jobly -
Create MySQL database
CREATE DATABASE jobly; CREATE USER 'jobly_user'@'localhost' IDENTIFIED BY 'your_password'; GRANT ALL PRIVILEGES ON jobly.* TO 'jobly_user'@'localhost'; FLUSH PRIVILEGES;
-
Configure application
Update
src/main/resources/application.properties:spring.datasource.url=jdbc:mysql://localhost:3306/jobly spring.datasource.username=jobly_user spring.datasource.password=your_password
-
Run the application
./mvnw spring-boot:run
-
Access the application
Open your browser to:
http://localhost:8080
The application comes with pre-configured test accounts. See CREDENTIALS.txt for the complete list.
| Role | Password | |
|---|---|---|
| Super Admin | admin@jobly.com | Admin@123 |
| Candidate | john.doe@example.com | Password@123 |
| Hiring Manager | sarah.williams@techcorp.com | Password@123 |
Sample Data Included:
- 3 Candidates
- 2 Companies (TechCorp Solutions, Innovate Labs)
- 5 Job Postings
- 4 Job Applications
Backend
- Spring Boot 3.3.5
- Spring Security 6
- Spring Data JPA
- Hibernate ORM
- MySQL 8.0
Frontend
- Thymeleaf 3.1
- HTML5 & CSS3
- JavaScript
Tools & Libraries
- Lombok - Reduce boilerplate code
- Springdoc OpenAPI - API documentation
- BCrypt - Password encryption
- Maven - Build automation
com.jobly/
βββ config/ # Configuration classes
β βββ SecurityConfig # Spring Security setup
β βββ DataInitializer # Dummy data seeding
β βββ OpenApiConfig # Swagger configuration
βββ controller/ # MVC Controllers
β βββ AuthController
β βββ JobController
β βββ ApplicationController
β βββ AdminController
βββ dto/ # Data Transfer Objects
βββ exception/ # Exception handling
βββ model/ # JPA Entities
β βββ User
β βββ Role
β βββ Company
β βββ Job
β βββ JobApplication
βββ repository/ # Spring Data repositories
βββ security/ # Security components
βββ service/ # Business logic
erDiagram
User ||--o{ JobApplication : submits
User ||--o{ Job : posts
User }o--o{ Role : has
Company ||--o{ Job : owns
Job ||--o{ JobApplication : receives
User {
Long id PK
String fullName
String email UK
String phone
String password
boolean enabled
}
Company {
Long id PK
String name UK
String description
String website
String address
Long ownerId FK
}
Job {
Long id PK
String title
String description
String location
EmploymentType type
Integer salaryMin
Integer salaryMax
JobStatus status
Long companyId FK
Long postedById FK
}
JobApplication {
Long id PK
Long jobId FK
Long candidateId FK
String coverLetter
String resumeUrl
ApplicationStatus status
}
- Session-based authentication with Spring Security
- BCrypt password hashing with secure work factor
- Role-based access control using method-level security
- CSRF protection enabled for all forms
- SQL injection prevention via JPA prepared statements
@PreAuthorize("hasRole('SUPER_ADMIN')")
public void adminOnlyMethod() { }
@PreAuthorize("hasAnyRole('COMPANY', 'HIRING_MANAGER')")
public void postJob() { }Interactive API documentation is available via Swagger UI:
URL: http://localhost:8080/swagger-ui.html
| Method | Endpoint | Description | Access |
|---|---|---|---|
| GET | /jobs |
List all jobs | Public |
| GET | /jobs/{id} |
Job details | Public |
| POST | /jobs |
Create job | Hiring Manager |
| POST | /jobs/{id}/apply |
Apply to job | Candidate |
| GET | /admin/dashboard |
Admin panel | Super Admin |
# Run all tests
./mvnw test
# Run with coverage
./mvnw test jacoco:report- Unit Tests - Service layer logic with Mockito
- Integration Tests - Full application context with test database
- Controller Tests - MVC layer with
@WebMvcTest
# Create executable JAR
./mvnw clean package
# Run the JAR
java -jar target/Jobly-0.0.1-SNAPSHOT.jarFROM eclipse-temurin:21-jre
COPY target/*.jar app.jar
ENTRYPOINT ["java","-jar","/app.jar"]SPRING_DATASOURCE_URL=jdbc:mysql://db:3306/jobly
SPRING_DATASOURCE_USERNAME=jobly_user
SPRING_DATASOURCE_PASSWORD=secure_passwordContributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow Java naming conventions
- Use meaningful variable and method names
- Write JavaDoc for public methods
- Include unit tests for new features
- Format code with Google Java Format
This project is licensed under the MIT License - see the LICENSE file for details.