This API is used by applicants to submit their application for a job. It is a microservice that is part of a recruitment application.
- Programming Language: Python
- Virtual Environment: Python venv
- Framework: Flask
- Application Modularity: Flask Blueprints
- API Design: RESTful principles
- Configuration Management: Externalized to config.py
- Security: Flask-JWT-Extended (authentication & authorization)
- CORS: Flask-Cors
- Logging: Flask-Logging + Root Logger
- Database Integration: Flask-SQLAlchemy
- Database: PostgreSQL
- Testing: Pytest + Testcontainers
- Code Coverage: pytest-cov
- Linting: flake8
- Dependency Management: Pip
- Continuous Integration: GitHub Actions
- Continuous Deployment: Heroku
Ensure all commands are executed from the project root.
-
Environment Setup: Create and activate a virtual environment.
python3 -m venv venv source venv/bin/activate
-
Install Dependencies: Install all required dependencies.
pip install -r requirements.txt
-
Run Tests: Execute all tests (requires Docker to run locally).
pytest
-
Code Coverage: Generate code coverage report (requires Docker to run locally).
pytest --cov=app
-
Linting: Run linting checks.
flake8 --show-source --statistics app tests
-
Environment Variables:
- Setup as specified in config.py.
-
Run Development Server: Start the development server.
flask --app app/app run
-
Run Heroku Locally: Run the application locally using Heroku.
heroku local
📦
├─ .github
│ └─ workflows - Contains GitHub Actions workflow files.
├─ app
│ ├─ models - Contains database entities.
│ ├─ repositories - Handles database interactions.
│ ├─ routes - Defines application routes.
│ ├─ services - Implements business logic.
│ └─ utilities - Contains HTTP status codes.
└─ tests
├─ repositories - Unit tests for repository functions.
├─ routes - Unit tests for route handlers.
├─ services - Unit tests for service layer functions.
└─ utilities - Utility functions for testing.