This repository contains a FastAPI backend server that powers a job-matching system. It handles resume parsing, user and employer creation, and job posting automation using parsed job descriptions. The application leverages MongoDB for data storage, PyPDF2 for PDF parsing, and Clerk for authentication and user management.
fastapi/
├── app/
│ ├── controllers/ # Business logic and operations
│ ├── models/ # Pydantic models and DB schemas
│ ├── routes/ # API routes
│ ├── utils/ # Utility functions and helpers
│ ├── db.py # MongoDB database connection
│ └── main.py # FastAPI app entry point
├── public/ # Folder for uploaded resumes and public files
├── .env # Environment variables
└── README.md # Project documentation
- FastAPI-based backend server
- MongoDB integration for persistent storage
- Resume parsing with PyPDF2
- Automatic user and employer creation upon resume upload
- Job creation based on parsed job descriptions
- User authentication with Clerk
- Environment-based configuration via
.envfile - Organized and modular architecture
- Backend Framework: FastAPI
- Database: MongoDB
- PDF Parsing: PyPDF2
- Authentication: Clerk
- Server: Uvicorn (ASGI server)
git clone https://github.com/yourusername/fastapi.git
cd fastapipython -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activatepip install -r requirements.txtCreate a .env file in the project root with the following environment variables:
CLERK_API_KEY=your_clerk_api_key
MONGODB_URI=your_mongodb_uri
SECRET_KEY=your_secret_key
You may add other variables as needed by your utilities or third-party services.
Run the development server using Uvicorn:
uvicorn app.main:app --reloadThe server will start at: http://localhost:8000
- User uploads a resume (PDF format) to the
/upload-resumeendpoint. - The PDF is parsed using PyPDF2 to extract relevant user and employer information.
- A new user is created automatically using Clerk.
- An associated employer profile is created and stored in MongoDB.
- Resume files are stored in the
public/folder.
- A job description file is uploaded or job details are submitted via API.
- Job details are parsed to extract structured information.
- A new job entry is created and stored in MongoDB.
These are sample routes; actual routes may differ based on implementation:
| Method | Endpoint | Description |
|---|---|---|
| POST | /upload-resume |
Upload resume and create user |
| POST | /upload-job-description |
Upload job description and create job |
| GET | /jobs |
List all available jobs |
| GET | /users/{user_id} |
Retrieve user details |
For complete API reference, see /docs (FastAPI's built-in Swagger UI).
⚠️ The server is not deployed yet.
Once ready for deployment, you may consider using:
- Docker & Docker Compose
- Cloud services like AWS, GCP, or Heroku
- CI/CD with GitHub Actions or similar tools
- Add Docker support
- Implement CI/CD pipeline
- Add test coverage
- Add file size & type validation
- Rate limit sensitive endpoints
- Add email notifications for new users
Contributions are welcome! Please fork the repository and create a pull request with your changes.
This project is licensed under the MIT License.