Architecture Overview
The project is built as a modern, containerized, multi-tier application representing a robust marketplace for Job Seekers and Employers.
- Backend: Java 17 with Spring Boot 3.4.5. It follows a layered monolithic architecture (Controllers, Services, Repositories, DTOs) and utilizes Spring Security with JWT (JSON Web Tokens) for stateless authentication.
- Frontend: Built with Next.js 15.3 using the App Router, written in strictly typed TypeScript, and styled with Chakra UI for rapid, accessible component design.
- Database: PostgreSQL 15, integrated via Spring Data JPA. Flyway is used for robust database migration management instead of relying on Hibernate's native auto-generation.
- Infrastructure: Fully Dockerized using Docker Compose, orchestrating the frontend, backend, and database with explicit dependencies and persistent volume mapping.
Engineering Challenges Solved
Extreme Velocity (1-Day Build)
Building a functional, dual-persona marketplace in 24 hours required highly disciplined technical choices. The use of mature frameworks (Spring Boot + Next.js) and Java libraries like Lombok (reducing boilerplate via @Builder and @Data) allowed pure focus on business logic over setup.
Dual-Persona Role Segregation
Managing two distinct user journeys in a single platform is a complex state problem. The backend enforces this via @PreAuthorize role-based access control (RBAC). On the client-side, the Next.js frontend dynamically pivots the dashboard (/dashboard/page.tsx), rendering distinct quick-actions based on the user's userType (e.g., "Post a Job" vs. "Browse Jobs").
Stateless API Security
Transitioning away from traditional server sessions required a strict JWT architecture. The frontend elegantly manages this using an Axios Interceptor (src/app/lib/axios.ts). This interceptor automatically attaches the Bearer token from localStorage to every outgoing API request, ensuring secure, entirely stateless interactions between the Next.js client and the Java API.
Local Environment Orchestration
Ensuring the entire stack works uniformly across different machines is critical. The docker-compose.yml expertly handles startup order using depends_on, manages environment variable injection, and provisions persistent volumes for Postgres. This makes local setup a simple one-command process (docker compose up --build).
Outcomes
- Functional MVP in Record Time: Successfully delivered a working prototype featuring Job Creation, Applicant Tracking, and Secure Auth in a single day.
- Scalable Foundation: The strict separation of concerns (Frontend UI vs. REST API) and the stateless JWT architecture means the system is primed for immediate horizontal scaling and cloud deployment.