A modern full-stack job portal built with Spring Boot, React, MongoDB, and Tailwind CSS β providing job discovery, search, filtering, job creation, updates, deletion, detailed job views, and a production-ready REST API.
Author: Mohammad Asfin Β |Β Stack: Java Full Stack Β |Β Database: MongoDB Β |Β License: MIT Β |Β Version: 1.0.0
π Quick Start β’ π API Docs β’ ποΈ Architecture β’ βοΈ Configuration β’ π Deployment β’ π€ Contributing β’ π Report Bug β’ π‘ Request Feature
JobSphere is a professional full-stack application connecting top tech talent with innovative employers. It provides a robust, seamless ecosystem where Employers can seamlessly post and manage job opportunities, and Employees can browse, search, and apply for roles tailored to their exact skill set.
| Layer | Technology | Responsibility |
|---|---|---|
| Frontend | React 19 | User interface & core logic |
| Build Tool | Vite 6 | Development server & bundling |
| Styling | Tailwind CSS v4 | UI components & layout |
| Routing | React Router v7 | SPA navigation |
| HTTP Client | Axios | API communication |
| Backend | Spring Boot 3.4.1 | Core REST API |
| Database | MongoDB Atlas | Persistence (JobListing.JobPost) |
| Documentation | Springdoc OpenAPI | Swagger UI endpoints |
- Job Management: Create, update, and completely delete job postings.
- Structured Forms: Professional multi-input form validating titles, tech stacks, experience, and salaries.
- Job Discovery: Live, responsive feed of available opportunities.
- Filtering: Dropdown filters to refine by Job Type and Location.
- Detailed Views: Dedicated URLs (
/jobs/:id) containing rich descriptions and required tech stacks.
The backend utilizes SearchRepositoryImpl featuring dynamic $or logic to match case-insensitive keywords simultaneously across title, description, profile, technologies, company, and location. No Atlas Search indexing is required.
Designed to run serverless via LocalStorage. Toggling VITE_DEMO_MODE=true instantly switches the React app into a standalone sandbox featuring 20 realistic mock jobs for UI demonstration.
flowchart LR
User([User Browser]) <--> |React Router| Vite[Vite 6 / React 19]
Vite <--> |Axios HTTP| Spring[Spring Boot 3.4.1]
Spring <--> |Spring Data| Mongo[(MongoDB Atlas)]
Spring --> |OpenAPI 3| Swagger[Swagger UI]
JobSphere/
βββ Backend/
β βββ src/
β β βββ main/
β β β βββ java/com/jobsphere/joblisting/
β β β β βββ controller/ # REST Controllers (PostController)
β β β β βββ model/ # Document Entities (Post)
β β β β βββ repository/ # MongoDB Repositories
β β β βββ resources/
β β β βββ application.properties
β βββ pom.xml
β βββ mvnw.cmd
β
βββ Frontend/
β βββ src/
β β βββ components/ # Reusable UI (Navbar, JobForm)
β β βββ pages/ # Route Views (Home, Feed, JobDetails)
β β βββ services/ # Axios API layer (jobService.js)
β β βββ data/ # Fallback Mock Data
β βββ package.json
β βββ vite.config.js
β βββ .env
β
βββ .gitignore
βββ README.md
Backend (application.properties)
The application relies on the system terminal environment for security.
# Set this in your PowerShell session before running the backend:
$env:MONGODB_URI="mongodb+srv://<username>:<password>@cluster0.xxx.mongodb.net/?retryWrites=true&w=majority"Frontend (Frontend/.env)
VITE_API_URL=http://localhost:8080
VITE_DEMO_MODE=falseOpen a fresh PowerShell terminal, set your cluster URI, and start Spring Boot:
cd "D:\Java Full Stack\JobSphere\Backend"
$env:MONGODB_URI="mongodb+srv://<your-username>:<your-password>@cluster0.abcde.mongodb.net/?retryWrites=true&w=majority"
.\mvnw.cmd clean compile
.\mvnw.cmd spring-boot:runThe API will boot at http://localhost:8080/.
Open a second PowerShell terminal:
cd "D:\Java Full Stack\JobSphere\Frontend"
npm install
npm run devVite will start the client at http://localhost:5173/.
When the backend is running, visual documentation is auto-generated at: π http://localhost:8080/swagger-ui/index.html
| Method | Endpoint | Description |
|---|---|---|
GET |
/allPosts |
Retrieve all jobs |
GET |
/posts/{text} |
Search jobs across all fields |
POST |
/post |
Create a new job |
PUT |
/post |
Update an existing job |
DELETE |
/post/{id} |
Delete a job permanently |
- Import the repository into Vercel.
- Set the Root Directory to
Frontend. - Set Framework Preset to
Vite. - Ensure environment variables are configured in the Vercel dashboard:
VITE_DEMO_MODE=falseVITE_API_URL=<YOUR_DEPLOYED_BACKEND_URL>(Note: For SPA routing, Vercel natively handles thedistfolder generated bynpm run build.)
- MongoDB "Connection string is invalid": The
$env:MONGODB_URIwas not exported in your terminal session before running./mvnw.cmd. - CORS Errors in Browser: Ensure
VITE_API_URLcorrectly points to the active Spring Boot backend, and that the backend@CrossOriginannotation inPostControllerwhitelists your frontend origin. - Port 8080 or 5173 Already in Use: Kill any zombie Java or Node processes occupying the ports.
Built with πΌ by Mohammad Asfin