Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Intelligence Query Engine - HNG Stage 2

A FastAPI-based backend service that manages a dataset of 2,026 personas. This project supports complex filtering, pagination, and natural language search functionality, deployed on Railway with a PostgreSQL database.

πŸš€ Live Demo

πŸ› οΈ Tech Stack

  • Framework: FastAPI (Python)
  • Database: PostgreSQL (Railway)
  • ORM: SQLAlchemy (Async)
  • Database Driver: asyncpg
  • Deployment: Railway
  • Data Handling: Pydantic, UUID7

πŸ“‹ Features

  • Comprehensive Filtering: Filter by gender, age group, country (ISO code), and probability scores.
  • Natural Language Search: Interprets queries like "young males from Nigeria" or "adult females" into structured database filters.
  • Pagination: Standardized page and limit parameters for all endpoints.
  • Robust Error Handling: Standardized JSON error responses for validation and server failures.
  • CORS Enabled: Cross-Origin Resource Sharing supported via custom middleware for frontend integration.

πŸ” Natural Language Mapping

The search endpoint (/api/profiles/search?q=...) uses a custom parser to map natural language to specific data ranges:

  • Youth: 16–24 years old (Age Group: youth)
  • Adult: 25–44 years old (Age Group: adult)
  • Senior: 45–64 years old (Age Group: senior)
  • Elderly: 65+ years old (Age Group: elderly)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages