Skip to content

Patron Staffing API is a modern, AI-powered backend for Patron Staffing Solutions that enables role-based user management (candidates, clients, and admins), intelligent document processing (resumes, certifications, and compliance files), and dynamic candidate profiles — built with FastAPI, Clean Architecture, async scalability for mobile and webapp

Notifications You must be signed in to change notification settings

nenosoft131/patron-staffing-master

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Patron Staffing

FastAPI Python Pydantic SQL REST API Auth License Build

A modern, scalable backend for Patron Staffing Solutions — enabling role-based user management, secure document uploads, and candidate profile building for staffing, recruitment, and HR compliance.

Built with FastAPI, async SQLAlchemy, and cloud-ready storage for high performance and scalability.


✨ Features

  • Role-Based User Management: Supports admin, client, candidate, and staff roles.
  • Secure Authentication: BCrypt password hashing with email uniqueness.
  • Document Gateway: Upload resumes, certifications, and IDs with type categorization.
  • Candidate Profiles: Build skillset profiles linked to uploaded documents.
  • Cloud-Ready Storage: S3/MinIO integration with signed URLs for secure access.
  • Clean Architecture: Domain-Driven Design (DDD) with low coupling.
  • Async-First: Fully asynchronous I/O using SQLAlchemy 2.0 + asyncpg.
  • Mobile & Web Ready: Consistent RESTful APIs with OpenAPI documentation.
  • Compliance-Ready: GDPR-compliant deletion and audit trails.

🏗️ Architecture

patron-staffing/

  • app/ # Core application
    • api/ # FastAPI routers, schemas, and dependency injection
    • core/ # Core business logic & application configuration
    • domain/ # Pure business entities
      • models/ # Domain models
    • infrastructure/ # Adapters & external service implementations
      • repositories/ # Database repository implementations
      • services/ # External services (email, storage, etc.)
      • security/ # Authentication, password hashing, JWT
    • interfaces/ # Abstract interfaces / ports for dependency inversion
    • utils/ # Helper utilities (file storage, logging, etc.)
  • tests/ # Unit, integration, and end-to-end tests
  • Dockerfile # Docker configuration
  • main.py # Application entry point / app factory
  • requirements.txt # Python dependencies

🔑 Design Principles

  • Pure Domain: Business logic is framework-independent (no FastAPI, SQLAlchemy, or cloud SDK dependencies).
  • Adapters Implement Interfaces: Easily swap databases or cloud providers without touching business logic.
  • Request-Scoped Sessions: Safe async DB access for concurrency.
  • Immutable Domain Models: Thread-safe and testable entities.

🛠️ Quick Start

Requirements

  • Python 3.10+
  • PostgreSQL 12+ (or SQLite for development)
  • Docker (optional, for MinIO)

Installation

bash
git clone https://github.com/nenosoft131/patron-staffing-api.git
cd patron-staffing-api
python -m venv venv
source venv/bin/activate  # Linux/macOS
# .\venv\Scripts\activate # Windows
pip install -r requirements.txt

Configuration

cp .env.example .env
# Edit .env:
# DATABASE_URL=postgresql+asyncpg://user:pass@localhost:5432/patron_dev
# MINIO_ENDPOINT=http://localhost:9000
# MINIO_ACCESS_KEY=patron
# MINIO_SECRET_KEY=supersecret

Running the API

uvicorn main:app --reload --port 8000

📈 Roadmap

Version Features v1.0 ✅ User management, document upload, candidate profiles v1.1 🔐 JWT auth, password reset, email verification v1.2 📱 Mobile sync, offline support, push notifications v1.3 🤖 AI resume parsing → auto-skill extraction v1.4 📊 Client portal: job postings, candidate matching v1.5 🌐 Multi-tenant support (enterprise clients)

About

Patron Staffing API is a modern, AI-powered backend for Patron Staffing Solutions that enables role-based user management (candidates, clients, and admins), intelligent document processing (resumes, certifications, and compliance files), and dynamic candidate profiles — built with FastAPI, Clean Architecture, async scalability for mobile and webapp

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published