https://github.com/areebahmeddd/payzee
๐ต Pay Easy, Payzee!
https://github.com/areebahmeddd/payzee
devops digital-rupee digital-wallet e-governance fastapi redis social-welfare
Last synced: 7 months ago
JSON representation
๐ต Pay Easy, Payzee!
- Host: GitHub
- URL: https://github.com/areebahmeddd/payzee
- Owner: areebahmeddd
- License: mit
- Created: 2025-04-26T13:05:00.000Z (10 months ago)
- Default Branch: develop
- Last Pushed: 2025-07-10T10:24:38.000Z (7 months ago)
- Last Synced: 2025-07-10T18:00:03.849Z (7 months ago)
- Topics: devops, digital-rupee, digital-wallet, e-governance, fastapi, redis, social-welfare
- Language: Python
- Homepage: https://api.1mindlabs.org
- Size: 438 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: docs/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: docs/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: docs/SECURITY.md
Awesome Lists containing this project
README
# Payzee: Pay Easy, Payzee!
**Payzee** is a modern payment processor powered by **Central Bank Digital Currency (CBDC)** โ also known as the **Digital Rupee** or **e-rupee (eโน)**. [[ YouTube Demo ]](https://youtube.com/shorts/qatWtapzcAU)
- ๐ป T3-stack Website: [Live](https://payzee.1mindlabs.org) | [Source Code](https://github.com/alfiyafatima09/payzee-website)
- ๐ฑ Flutter App: [Live](#) | [Source Code](https://github.com/1MindLabs/payzee-app)
## ๐ Project Structure
```
โโโ app.py # Main FastAPI application entry point
โโโ .devcontainer/ # Development container configuration
โโโ .github/ # GitHub workflows and configuration
โโโ data/ # External datasets and reference information
โโโ db/ # Redis database configuration and operations
โโโ docker/ # Docker configuration files
โโโ k8s/ # Kubernetes configuration files
โโโ docs/ # Documentation files
โโโ middleware/ # Request/response middleware components
โโโ models/ # Data models for transactions, users, and payment entities
โโโ monitoring/ # Application Performance Monitoring with Prometheus (metrics collection), Grafana (visualization), and AlertManager (alerting)
โโโ routes/ # API endpoints for payments and authentication
โโโ scripts/ # Development and setup scripts
โโโ templates/ # HTML templates for the application
โโโ tests/ # Unit and integration tests
โโโ utils/ # Helper utilities and common functions
```
## ๐ Setup for Development
### Prerequisites
- Python 3.11+
- Redis server
- [Poetry](https://python-poetry.org) for dependency management
### โก Quick Start
Run the setup script:
```bash
# Option 1: Remote (no clone needed)
sudo bash -c "$(curl -fsSL https://areebahmeddd.github.io/payzee/install.sh)"
# Option 2: Local (after cloning)
./scripts/install.sh
```
Both install dependencies and start the dev server.
This script will:
- Install Poetry (if not already installed)
- Set up necessary `PATH` variables
- Install project dependencies
- Start the development server with hot-reload
## ๐ณ Docker Setup (Recommended)
### 1. Start the full stack
Using Docker Compose:
```bash
docker compose -f docker-compose.local.yaml up -d
```
Or with Make:
```bash
make up
```
To view logs from all services:
```bash
docker compose logs -f
```
To view logs for a specific service (e.g., `api`):
```bash
docker compose logs -f api
```
### 2. Run the app manually with Docker
```bash
# Build the API container
docker build -t payzee-api -f docker/Dockerfile.dev .
# Run the API container
docker run -p 8000:8000 --env-file .env payzee-api
```
## ๐งฐ Manual Setup
### 1. Install Poetry
- **Windows**:
```bash
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -
```
- **Linux/macOS**:
```bash
curl -sSL https://install.python-poetry.org | python3 -
```
### 2. Start Redis using Docker
```bash
docker run --name payzee-redis -p 6379:6379 -d redis:latest
```
### 3. Install project dependencies
```bash
poetry install
```
### 4. Start the development server
```bash
poetry run uvicorn app:app --reload
```
## ๐งช Development Tools
### ๐ฑ Seeding Data
You can seed initial development data using one of the following commands:
```bash
./scripts/seed_data.sh
```
Or with Make:
```bash
make seed
```
This populates the database with test data for local development and testing.
### โ
Testing
Run tests with `pytest`:
```bash
# Using poetry
poetry run pytest
# Or with Make
make test
```
### ๐งผ Pre-commit Hooks
We use **pre-commit** hooks with **Ruff** for linting and formatting. (Installed with project dependencies)
Hooks handle:
- Removing trailing whitespace
- Ensuring files end with a newline
- Checking JSON/YAML syntax
- Python linting & formatting with Ruff
To run all hooks manually:
```bash
poetry run pre-commit run --all-files
```
Or use Make:
```bash
make lint # Run Ruff linting
make format # Format code using Ruff
```
## ๐ Redis Management
RedisInsight is available via Docker at:
๐ [http://localhost:5540](http://localhost:5540)
To connect:
1. Click **Add Redis database**
2. Use one of the following connection strings:
- `redis://localhost:6379`
- `redis://host.docker.internal:6379`
This allows inspection of Redis data and keyspaces.
## ๐ API Documentation
Once the app is running, open Swagger UI at:
๐ [http://localhost:8000/docs](http://localhost:8000/docs)