A production-ready, highly modular REST API service that powers CareerForge, a modern resume builder platform. Engineered using Spring Boot 4.0.2 and Java 21, the system provides robust user administration, dynamic resume curation, cloud media uploads, Brevo-backed mail notifications, and online premium subscriptions verified via Razorpay signatures.
- Interactive API Docs (Swagger UI): https://careerforge-backend-z4sg.onrender.com 🚀 (Clicking this live URL will automatically redirect HR, recruiters, and developers to the interactive Swagger UI to test all endpoints live)
- 🔐 JWT-Protected Stateless Authentication: Restricts resume management endpoints behind custom JWT filters using Spring Security. Handles email verification and password hashing.
- 📝 Resume Generation Engine: Detailed JSON schema representation of user CVs, including education histories, professional work experiences, project portfolios, technical skills, languages, and custom templates.
- 🌥️ Cloud-Backed Media Management: Integrates Cloudinary API for secure profile image uploading and rendering.
- 💳 Razorpay Order & Signature Validation: Facilitates premium upgrades. Automates order generation and verifies webhook signatures for subscription payments.
- ✉️ Automated Brevo SMTP Integration: Dispatches verification emails, registration confirmations, and supports sharing resumes with external employers via email.
- 📊 Operational Diagnostics: Integrates Spring Actuator endpoints to monitor database health and application performance metrics.
careerforge-backend/
├── src/main/java/com/sagar/resume/
│ ├── config/ # Third-party service setups (Cloudinary, Mongo, Security chains)
│ ├── controller/ # REST Endpoint Controllers executing request mappings
│ ├── document/ # MongoDB schema document mappings (Entities)
│ ├── dto/ # Serialization/Deserialization request and response models
│ ├── exception/ # Centralized global exception handlers
│ ├── repository/ # MongoRepository data interface layer
│ ├── security/ # Custom JWT security filters and entry-point filters
│ ├── service/ # Core business logic execution layers
│ ├── util/ # Helper tools, JWT parsing engines, and constant parameters
│ └── ResumeBuilderApplication.java # Main bootstrap application entry point
├── pom.xml # Maven Dependency and Plugin definitions
├── Dockerfile # Blueprint for building containerized docker images
└── README.md # System documentation
- Application Configs: CloudinaryConfig.java | MongoConfig.java | SecurityConfig.java
- REST Controllers: AuthController.java | EmailController.java | PaymentController.java | ResumeController.java | TemplateController.java
- Core Entities: User.java | Resume.java | Payment.java
- Business Logic Services: AuthService.java | ResumeService.java | PaymentService.java | EmailService.java | FileUploadService.java | TemplateService.java
- Data Models (DTOs): LoginRequest.java | RegisterRequest.java | AuthResponse.java | CreateResumeRequest.java
- Project Configs: pom.xml | Dockerfile
| Package | Key Source Files | Primary Responsibilities |
|---|---|---|
config |
SecurityConfig.java CloudinaryConfig.java MongoConfig.java |
Registers beans for CORS mappings, cryptographic password encoders, JWT authentications, Cloudinary SDK client parameters, and NoSQL connection factories. |
controller |
AuthController.java ResumeController.java PaymentController.java |
Maps HTTP verb routing parameters to backend operations. Exposes endpoints for managing profiles, CV data collections, and invoice records. |
document |
User.java Resume.java Payment.java |
MongoDB @Document mapped database collections. Includes nested models for professional work history, educational certificates, and skill listings. |
service |
AuthService.java ResumeService.java PaymentService.java |
Implements core business logic. Validates users, updates resume layouts, handles file transfers to Cloudinary, and triggers Brevo emails. |
security |
JwtAuthenticationFilter.java | Filters incoming API queries. Reads bearer authorization headers, resolves JWT validity, and maps verified context variables to Spring Security context. |
util |
JwtUtil.java AppConstants.java |
Provides cryptographic signing functions, claim decoders, token generators, and global system default variables. |
exception |
GlobalExceptionHandler.java | A @RestControllerAdvice controller that intercepts server errors, custom resource validation exceptions, and returns clean, uniform HTTP error payloads. |
The application reads configurations from environmental properties or Render's configuration dashboard. Make sure the following keys are set:
| Environment Variable Key | Purpose | Example Value |
|---|---|---|
SPRING_MONGODB_URI |
Absolute connection string pointing to the MongoDB Atlas or local instance | mongodb+srv://user:pass@cluster.mongodb.net/dbname |
JWT_SECRET |
High-entropy signature key used for hashing JWT tokens | YourSuperSecretHMACKeyWhichHasAtLeast256BitsOfEntropy |
JWT_EXPIRATION |
JWT token lifespan in milliseconds | 604800000 |
CLOUDINARY_CLOUD_NAME |
Target cloud identifier for Cloudinary assets | my-resume-cloud |
CLOUDINARY_API_KEY |
Access key ID for Cloudinary credentials | 123456789012345 |
CLOUDINARY_API_SECRET |
Access secret key for Cloudinary integrations | xxxxxxxxxxxxxxxxxxxxxxxxxxx |
RAZORPAY_KEY_ID |
Public key identifier for Razorpay gateway integration | rzp_test_xxxxxx |
RAZORPAY_KEY_SECRET |
Secret cryptographic key for checking Razorpay transactions | yyyyyyYYYYYYyyyyyy |
SPRING_MAIL_HOST |
Host address of SMTP server (e.g., Brevo) | smtp-relay.brevo.com |
SPRING_MAIL_PORT |
Port address of SMTP server | 587 |
SPRING_MAIL_USERNAME |
Brevo account username / SMTP email identifier | user@server.com |
SPRING_MAIL_PASSWORD |
Brevo SMTP authorization password / API key | xsmtpsib-xxxxxxxxxxxxxxxxxxxx |
SPRING_MAIL_FROM |
Sender email address attached to outgoing notifications | no-reply@careerforge.com |
APP_BASE_URL |
Base URL of backend application (local or live deployment) | https://careerforge-backend-wery.onrender.com |
CORS_ALLOWED_ORIGINS |
Allowed frontend URL for CORS policy | http://localhost:5173 |
POST /register- Registers a new profile. Sends a Brevo verification email.POST /login- Checks password matching and returns a secure JWT bearer token.POST /verify-email- Validates email verification code.POST /resend-verification- Refreshes verification code and dispatches a new email.GET /profile- Fetches authenticated user info.POST /upload-image- Uploads a user's avatar image to Cloudinary.
GET /- Fetches all resume collections created by the current user.POST /- Creates a new resume document.GET /{id}- Retrieves a specific resume layout.PUT /{id}- Updates a resume's sections (experience, projects, skills).DELETE /{id}- Permanently deletes a resume document.POST /{id}/upload-images- Handles custom image uploads within the resume.
POST /create-order- Requests Razorpay order creation for premium access.POST /verify-payment- Verifies Razorpay signatures and updates transaction status.GET /order/{orderId}- Retrieves details for a specific billing transaction.
POST /send-resume- Emails a generated resume layout to target employers.
GET /- Lists all styled resume templates available.
- Java 21 Development Kit (JDK) or newer.
- Maven 3.8+ (or use the packaged wrapper
./mvnw). - Running MongoDB instance (local or Atlas cluster).
-
Clone the Repository:
git clone https://github.com/Sagar-devx/careerforge-backend.git cd careerforge-backend -
Configure Environment Variables: Set the environment variables locally or in your IDE run configuration.
-
Compile & Package the service:
./mvnw clean install
-
Run the application:
./mvnw spring-boot:run
The application will default to running on
http://localhost:8080.
-
Build Docker Image:
docker build -t careerforge-backend:latest . -
Run Container:
docker run -d -p 8080:8080 --name careerforge-api \ -e SPRING_MONGODB_URI="mongodb://host.docker.internal:27017/careerforge" \ -e JWT_SECRET="your-key" \ careerforge-backend:latest