How amirikarima/skill_extractor_api works
Project type and purpose
• This is a single‐service Flask API (a monolithic microservice) with a minimal web front end. Its job is to accept CV images (PNG/JPG/JPEG), extract text via OCR, parse out skills, match them against job postings in MongoDB Atlas, and return results via a web UI or API endpoint.
File structure
• Top‐level files:
• app.py – Flask entry point (routes, web form, API endpoints)
• skill_extractor.py – OCR (EasyOCR) integration and skill‐parsing logic
• job_matcher.py – MongoDB client code and matching algorithm
• test.py – (presumably) simple tests or manual runner
• requirements.txt – Python dependencies
• .gitignore, __pycache__ – standard housekeeping
• No separate “frontend” folder: the front end lives in Flask templates/routes in app.py.
• No build scripts or containers defined: simple Python runtime.
Key README insights
• Uses Python 3.9+, Flask, EasyOCR, MongoDB Atlas.
• Single POST /process endpoint plus a basic HTML upload form at /.
1. Client layer:
• Web browser (HTML form)
• API clients (Postman, curl)
2. API layer:
• Flask App (app.py)
• Routes: / (GET), /process (POST)
3. Processing modules (inside the same service):
• OCR Engine (EasyOCR) invoked by skill_extractor.py
• SkillExtractor logic (parses raw text → skill tokens)
• SkillMatcher logic (job_matcher.py)
4. Data store:
• MongoDB Atlas cluster
5. Infrastructure/dependencies:
• Python runtime & virtual env
• External library dependencies (EasyOCR, pymongo, Flask)
1. Client → HTTP POST /process (upload CV image)
2. Flask App reads the file and calls → OCR Engine
3. OCR Engine returns raw text → SkillExtractor
4. SkillExtractor returns list of skills → SkillMatcher
5. SkillMatcher queries MongoDB → retrieves job postings
6. Matching results → returned by Flask App → Client (JSON or HTML)
c. Architectural patterns/design principles
• Layered architecture: Presentation (Flask routes) → Application logic (modules) → Infrastructure (DB)
• Single‐service monolith but clearly separated concerns (OCR, parsing, matching, web)
• Dependency injection via module imports (app.py orchestrates)
• Externalized configuration (.env for MONGO_URI)
d. Key technologies/frameworks/libraries
• Python 3.9+
• Flask (web framework)
• EasyOCR (OCR library)
• pymongo or mongoengine (MongoDB client)
• MongoDB Atlas (cloud database)
Detail without overthinking
• Break the monolith into its logical parts (web, OCR, parsing, DB).
• Runtime components (Flask, OCR library, DB).