--- title: AI Resume Ranker emoji: ๐Ÿ“„ colorFrom: blue colorTo: green sdk: docker app_file: main.py pinned: false --- # ๐Ÿง  AI Resume Ranker API An intelligent, production-ready Resume Ranking API for developers, recruiters, and HR tech platforms. Inspired by Stripe & Paystack API experiences โ€” complete with authentication, dashboard, and live testing interface. Built with **Flask + Sentence Transformers + PDF Parsing + Semantic AI**, this API helps you automatically score and rank resumes against any job description using powerful language understanding models. --- ## ๐Ÿš€ Features - โœ… **API Key Authentication** with secure Bearer token format - ๐Ÿงพ **Semantic Resume Ranking** using transformer embeddings (not just keyword matching) - ๐Ÿ“ค Supports **batch PDF uploads** - ๐Ÿ“ฌ **JSON API responses** with ranked relevance scores - ๐Ÿงช **Live Testing Interface** on the dashboard - ๐Ÿ” **Secure User System** with login, signup, hashed passwords - ๐Ÿ” **API Key Regeneration** from the dashboard - ๐Ÿ“š Beautiful **API Documentation Page** with copyable code samples - ๐Ÿงฐ **Try It Now**: Upload resumes + job text and see live scoring - ๐Ÿ“ˆ Ready for usage tracking, analytics, or rate limiting - ๐Ÿ’ผ Built for scaling into a full SaaS product --- ## ๐ŸŒ Live Demo > Coming soon: hosted on Render or Railway (e.g., [https://resume-ranker.example.com](https://resume-ranker.example.com)) --- ## ๐Ÿ“ฆ API Overview ### ๐Ÿ”— Endpoint ``` POST /api/rank-resumes ``` ### ๐Ÿ” Authentication Send your API key in the request header: ``` Authorization: Bearer amn=your\_api\_key\_here ```` ### ๐Ÿ“ค Request Parameters | Name | Type | Required | Description | |-----------------|------------------|----------|--------------------------------------| | resumes | `file[] (PDF)` | โœ… Yes | One or more PDF resumes | | job_description | `string` | โœ… Yes | Job description text to compare with | --- ## ๐Ÿ“ฅ Example Usage ### ๐Ÿงช Try It via cURL ```bash curl -X POST https://yourdomain.com/api/rank-resumes \ -H "Authorization: Bearer amn=sk_live_abc123xyz" \ -F "resumes=@resume1.pdf" \ -F "resumes=@resume2.pdf" \ -F "job_description=We are hiring a backend Django developer..." ```` ### ๐Ÿ“ฆ Sample Response ```json { "results": [ { "filename": "resume1.pdf", "score": 0.8745 }, { "filename": "resume2.pdf", "score": 0.6721 } ], "count": 2, "requested_by": "user@example.com" } ``` --- ## ๐Ÿ›  Tech Stack * **Backend:** Flask, Blueprints, Jinja2 * **AI:** SentenceTransformers (`all-MiniLM-L6-v2`) * **PDF Parsing:** PyMuPDF * **Auth:** Flask sessions + hashed passwords * **Database:** SQLite (dev) / PostgreSQL-ready * **Frontend:** Bootstrap 5 + custom Jinja templates * **Hosting:** Render / Railway / PythonAnywhere * **Docs UI:** Fully embedded HTML + live form --- ## ๐Ÿงช Try It Now (via Dashboard) * Register/Login * View and copy your API Key * Paste a job description * Upload 1โ€“5 resumes (PDF) * Get AI-scored ranking results instantly --- ## ๐Ÿง‘โ€๐Ÿ’ป Developer Setup ```bash git clone https://github.com/yourusername/resume-ranker-api.git cd resume-ranker-api python -m venv venv source venv/bin/activate # or venv\Scripts\activate on Windows pip install -r requirements.txt flask run ``` Perfect โ€” thanks for the clarification. You're right to **remove the real email password** before pushing to GitHub โ€” sensitive credentials should never be committed. Instead, include **placeholder values** in the `.env` section of your `README.md`. --- ## โœ… Updated `.env` Example for README Here's the correct `.env` block to include in the `README.md`: ```ini FLASK_ENV=development SECRET_KEY=your_secret_key_here DATABASE_URL=sqlite:///db.sqlite3 # โœ… Email credentials for verification system EMAIL_USER=your_email@gmail.com EMAIL_PASS=your_app_password_here ``` > ๐Ÿ“Œ **Note:** Use an **App Password** (not your actual Gmail password) if you're using Gmail SMTP. App passwords are safer and Gmail-compliant. --- ## ๐Ÿ”’ Additional Security Tip To prevent accidental exposure: * Add `.env` to your `.gitignore` * Use environment variables in production (Render, Railway, Fly.io all support this) **`.gitignore` entry:** .env ``` --- ## โœ… Bonus (Optional): Mention in README You can also add a small note under **Developer Setup** in your README: > ๐Ÿ“ง **Note:** To enable email verification links, set `EMAIL_USER` and `EMAIL_PASS` in your `.env`. We recommend using an App Password with Gmail or a transactional email provider like Mailgun or SendGrid. ## ๐Ÿ’ก Future Features * โœ… API usage tracking * โณ Rate limiting (per API key) * ๐Ÿ“Š Dashboard analytics * ๐Ÿง  Resume summarization API * ๐Ÿ“ CSV/JSON result export * ๐Ÿงฉ SDKs for Python & JS --- ## ๐Ÿค Contributing Pull requests are welcome! Let's build the future of AI recruiting tools together. --- ## ๐Ÿ“œ License MIT License --- ## ๐Ÿ“ฌ Contact Made with โค๏ธ by [Muhammad Aminu Umar](mailto:webcodelabb@gmail.com) ๐Ÿ”— [LinkedIn](https://linkedin.com/in/webcodelab) | [GitHub](https://github.com/webcodelabb)