A modern webhook logging system built with FastAPI, SQLite, SQLAlchemy, Bootstrap 5, and Jinja2.
It receives webhook requests, logs them to a database, displays them in a responsive web UI, and provides an API endpoint to fetch the logs.
- β
Log all POST requests to
/webhooks(headers, payload, etc.) - β Store logs in a SQLite database using SQLAlchemy ORM
- β
View logs in a modern Bootstrap UI with:
- DataTables integration (search, sort, pagination, fixed header)
- Scrollable long fields
- Pretty-printed JSON payloads
- Bulk or single delete
- β
REST API endpoint to retrieve all logs (
GET /api/logs) - β Clean, modular codebase with separation of concerns
- Python 3.8+
- pip
# 1. Clone the repo
git clone https://github.com/MehdiBenHamida/BasicWebhooksLogger.git
cd webhook-logger
# 2. Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# 3. Install dependencies
pip install -r requirements.txtIf you're testing webhooks from third-party services (like Stripe, GitHub, etc.), you'll need a public URL that tunnels to your local server. That's where Ngrok comes in.
If you donβt have Ngrok installed:
# Mac (Homebrew)
brew install ngrok/ngrok/ngrok
# Debian / Ubuntu
sudo snap install ngrok
# Or download manually:
https://ngrok.com/downloadThen login to link your Ngrok account (once):
ngrok config add-authtoken <your-token>Start your FastAPI app locally:
uvicorn app.main:app --reloadBy default, it listens on: http://localhost:8000
In a separate terminal, run:
ngrok http 8000Ngrok will output something like:
Forwarding https://e2a5-84-71-123-45.ngrok-free.app -> http://localhost:8000
Copy the generated HTTPS URL β that is your public webhook gateway.
Update your external webhook provider to send POST requests to:
https://your-ngrok-subdomain.ngrok-free.app/webhooks
Ngrok will tunnel those requests directly to your local FastAPI app at /webhooks.