https://github.com/srish-ty/job-portal-server
API for job application portal
https://github.com/srish-ty/job-portal-server
Last synced: 8 months ago
JSON representation
API for job application portal
- Host: GitHub
- URL: https://github.com/srish-ty/job-portal-server
- Owner: Srish-ty
- Created: 2025-06-12T14:01:05.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-06-12T15:08:52.000Z (about 1 year ago)
- Last Synced: 2025-06-12T15:22:31.621Z (about 1 year ago)
- Language: Java
- Size: 49.8 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ง Job Portal Backend
A Spring Boot-based RESTful backend for a simple Job Portal. Users can register, log in, view jobs, and apply. Companies can post jobs. All data is stored using JPA with an H2 in-memory database.
---
## ๐ Features
- User registration and login (email + password)
- Company creation and job posting
- Users can apply to jobs
- REST APIs using Spring Web
- ORM with Spring Data JPA
- In-memory H2 database
- Lombok for boilerplate-free models
---
## ๐๏ธ Project Structure
```
job-portal/
โโโ controller/
โโโ model/
โโโ repository/
โโโ service/
โโโ config/
โโโ JobPortalApplication.java
```
---
## ๐งพ Entity Schemas
### ๐ค 1. `User`
| Field | Type | Description |
|-------------|---------|------------------------------|
| id | Long | Primary key |
| name | String | User's full name |
| email | String | User email (unique) |
| password | String | Hashed password |
| resumeLink | String | Link to resume |
| applications| List | Applications by this user |
---
### ๐ข 2. `Company`
| Field | Type | Description |
|-----------|---------|------------------------------|
| id | Long | Primary key |
| name | String | Company name |
| website | String | Website URL |
| jobs | List | Jobs posted by the company |
---
### ๐ 3. `Job`
| Field | Type | Description |
|-------------|----------|-----------------------------|
| id | Long | Primary key |
| title | String | Job title |
| description | String | Job description |
| location | String | Job location |
| postedAt | DateTime | When job was posted |
| company | Company | Reference to the company |
---
### ๐ฌ 4. `Application`
| Field | Type | Description |
|-----------|----------|-----------------------------|
| id | Long | Primary key |
| appliedAt | DateTime | Timestamp of application |
| user | User | Reference to applying user |
| job | Job | Reference to the job |
---
## ๐ง Technologies Used
- Java 21
- Spring Boot
- Spring Data JPA
- H2 Database
- Lombok
- Postman (for testing)
---
## ๐งช Example API Endpoints
| Method | Endpoint | Description |
|--------|--------------------------|-------------------------------|
| POST | `/api/auth/signup` | Register new user |
| POST | `/api/companies` | Create new company |
| POST | `/api/jobs` | Post a job |
| POST | `/api/applications` | Apply to a job |
| GET | `/api/jobs` | Get all jobs |
| GET | `/api/applications` | Get all applications |
---
## ๐ Authentication
Currently, the backend uses simple email+password login. No JWT or session handling is implemented yet. All endpoints are **public** for simplicity.
---
## ๐ ๏ธ Run Locally
```bash
./gradlew bootRun
```
Access H2 console:
โก๏ธ http://localhost:8080/h2-console
Use JDBC URL: `jdbc:h2:mem:testdb`
---
## ๐ฌ Sample Request Body (Signup)
```json
{
"name": "Srishty",
"email": "srishty@example.com",
"password": "mypassword"
}
```
---
## ๐ Future Improvements
- Add JWT authentication
- Input validations & DTOs
- Company user roles
- File upload for resumes
---
## ๐งโ๐ป Author
Made with โค๏ธ by Srishty M.
---