← Back to all products
$13
Subscriber CRM
CRM tool for subscriber lifecycle — cohort analysis, churn prediction, and engagement tracking.
PythonTypeScriptMarkdownFastAPIReact
📁 File Structure 12 files
subscriber-crm/
├── LICENSE
├── README.md
├── backend/
│ ├── app/
│ │ ├── main.py
│ │ ├── models/
│ │ │ └── subscriber.py
│ │ ├── routes/
│ │ │ └── subscribers.py
│ │ └── services/
│ │ └── subscriber_service.py
│ └── requirements.txt
├── frontend/
│ └── src/
│ ├── components/
│ │ └── SubscriberList.tsx
│ ├── hooks/
│ │ └── useCRM.ts
│ └── types/
│ └── index.ts
├── security-notes.md
└── test/
└── test_api.py
📖 Documentation Preview README excerpt
Subscriber CRM
Sub Protocol Product #9 — CryptoForge Store #5
Full-stack subscriber management CRM with a Python FastAPI backend and React/TypeScript frontend. Manage on-chain subscription members, track lifecycle events, and analyze retention.
Features
Backend (FastAPI)
- CRUD operations for subscribers
- Filtering by status, tier, tags, free-text search
- Paginated responses
- Dashboard statistics (retention, LTV, tier distribution)
- Health check endpoint
- Auto-generated OpenAPI docs at
/docs
Frontend (React/TS)
- Subscriber list with search, filter, pagination
- CRM stats dashboard
- CryptoForge dark industrial theme
- API hook with error handling
Quick Start
Backend
cd backend
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000
Frontend
cd frontend
npm install
npm run dev
Architecture
backend/
├── app/
│ ├── main.py # FastAPI entry point
│ ├── routes/
│ │ └── subscribers.py # CRUD + stats endpoints
│ ├── models/
│ │ └── subscriber.py # Pydantic models
│ └── services/
│ └── subscriber_service.py # Business logic
└── requirements.txt
frontend/
├── src/
│ ├── components/
│ │ └── SubscriberList.tsx # Main subscriber table
│ ├── hooks/
│ │ └── useCRM.ts # API interaction hook
│ └── types/
│ └── index.ts # TypeScript types
*... continues with setup instructions, usage examples, and more.*
📄 Code Sample .py preview
test/test_api.py
# ╔══════════════════════════════════════════════════════════════════════╗
# ║ SUBSCRIBER CRM — TEST SUITE ║
# ║ Sub Protocol #9 — CryptoForge ║
# ╚══════════════════════════════════════════════════════════════════════╝
"""Tests for the Subscriber CRM API."""
from fastapi.testclient import TestClient
from backend.app.main import app
client = TestClient(app)
def test_health():
response = client.get("/health")
assert response.status_code == 200
assert response.json()["status"] == "ok"
def test_create_subscriber():
data = {
"wallet_address": "0x1234567890123456789012345678901234567890",
"email": "alice@example.com",
"tier": "bronze",
}
response = client.post("/api/subscribers/", json=data)
assert response.status_code == 201
body = response.json()
assert body["wallet_address"] == data["wallet_address"]
assert body["email"] == data["email"]
assert body["tier"] == "bronze"
assert body["status"] == "active"
return body["id"]
def test_create_duplicate_wallet():
data = {"wallet_address": "0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}
client.post("/api/subscribers/", json=data)
response = client.post("/api/subscribers/", json=data)
assert response.status_code == 409
def test_list_subscribers():
response = client.get("/api/subscribers/")
assert response.status_code == 200
body = response.json()
assert "items" in body
assert "total" in body
assert "pages" in body
# ... 59 more lines ...