OffersHub is a platform designed for financial services companies to create, manage, and optimize personalized offers. It enables banks and financial institutions to deliver targeted promotions that enhance customer engagement, drive retention, and fuel growth.
- 📊 Centralized dashboard for managing offers and promotions
- 🧩 Personalized offer creation tailored to customer segments
- 📈 Real-time monitoring of offer performance and conversion rates
- 🧠 Actionable insights to refine marketing strategies and outreach
Financial institutions can use OffersHub to craft and deliver highly relevant offers that resonate with individual customers, improving the overall customer experience and increasing customer lifetime value (CLTV).
This repository contains a full-stack web application with the following components:
- 🐘 PostgreSQL – Relational database for storing offer data
- 🧠 FastAPI – Backend API service
- 🌐 React – Frontend user interface for managing offers
- Navigate to the backend directory:
cd backend-apis - Create a Python virtual environment:
python -m venv venv - Activate the virtual environment:
- 🖥️ On Windows:
venv\Scripts\activate - 🍎 On macOS/Linux:
source venv/bin/activate
- 🖥️ On Windows:
- Install dependencies:
pip install -r requirements.txt - Create a
.envfile from the template:cp .env.example .env - Edit
.envwith your configuration settings. - Start the FastAPI server:
uvicorn app.main:app --reload
🚀 The API will be accessible at http://localhost:8000.
📚 API Documentation: http://localhost:8000/docs
- Navigate to the frontend directory:
cd frontend-app - Install dependencies using pnpm:
pnpm install - Start the development server:
pnpm run dev
🎉 The frontend will be accessible at http://localhost:3000.
To set up a local development environment using Docker:
- Start the services:
docker-compose -f docker-compose.dev.yml up -d --build
🎯 Services will be available at:
- 🧠 Backend:
http://localhost:8000 - 🌐 Frontend:
http://localhost:3000
- Make the
set_env_variables.shscript executable:
chmod +x set_env_variables.sh - Run the script:
./set_env_variables.sh
- Build and start production services:
docker-compose up -d --build
For Windows users, ensure shell scripts like database-init/00-init-db.sh are converted to Unix format:
dos2unix ./database-init/00-init-db.sh
A comprehensive test suite has been set up to validate all API endpoints. To run the tests:
- Navigate to the backend directory:
cd backend-apis - Activate the virtual environment:
- 🍎 On macOS/Linux:
source venv/bin/activate - 🖥️ On Windows:
venv\Scripts\activate
- 🍎 On macOS/Linux:
- Run the tests:
pytest -xvs tests/api/v1/ --cov=app --cov-report=term-missing
🛠️ This will:
- Run all tests in the
tests/api/v1/directory - Output verbose test results
- Display test coverage and highlight missing lines from the code.
| 🛠️ Service | 📝 Description | 🌐 Local Port | 🌍 Production Port |
|---|---|---|---|
| 📋 postgres-db | PostgreSQL database | 5432 | 5432 |
| 🧠 backend-apis | FastAPI backend APIs | 8000 | 8000 |
| 🌐 frontend-app | Frontend web client | 3000 | 3000 |
We would love to hear from you! Whether it's feedback, ideas, or contributions, feel free to reach out:
🤝 Contributions:
We welcome contributions to make OffersHub even better! If you'd like to contribute:
- Fork the repository.
- Make your desired updates or feature additions.
- Create a pull request with a detailed explanation of your changes.
For discussions or suggestions, feel free to connect with me on LinkedIn or open an issue on GitHub. Let's collaborate and build something amazing together!