A comprehensive real-time transaction monitoring system built with FastAPI backend and modern web frontend. This system provides transaction tracking, filtering, real-time updates, and comprehensive monitoring capabilities.
- Real-time Transaction Monitoring: Live transaction updates via WebSocket
- Advanced Filtering: Filter transactions by server, status, type, customer, amount, and date ranges
- Search Capabilities: Full-text search across transaction data
- Data Visualization: Interactive charts and statistics
- Responsive Design: Modern UI that works on all devices
- RESTful API: Comprehensive API with OpenAPI documentation
- Database Integration: SQLite database with efficient querying
- Security: Input validation and secure data handling
- Python 3.8 or higher
- Node.js 14+ (for frontend development)
- Modern web browser
- Clone the repository:
git clone https://github.com/your-username/TransactionMonitoring.git
cd TransactionMonitoring- Set up virtual environment:
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Start the backend server:
uvicorn main:app --reload --host 0.0.0.0 --port 8000- Open
index.htmlin your browser or serve it with a web server:
# Using Python's built-in server
cd ..
python -m http.server 3000- Visit
http://localhost:3000in your browser
- View Transactions: The main dashboard shows all transactions with real-time updates
- Filter Transactions: Use the filter panel to narrow down results
- Search: Use the search bar for quick lookups
- Real-time Updates: New transactions appear automatically without page refresh
Use the provided dummy data generator in uses.md or make API calls:
// Example transaction
const transaction = {
"TRANSACTION_SERVER": "SERVER_A",
"CUSTOMER_ID": "CUST-12345",
"DATE_TIME": "2024-03-15 14:30:00",
"TRANSACTION_ID": "TXN-001",
"TRANSACTION_AMOUNT": 1250.75,
"TRANSACTION_TYPE": "DEBIT",
"TRANSACTION_STATUS": "Success",
"APPROVED_BY": "ADMIN_1",
"SOURCE": "portal"
};
// Send to backend
fetch("http://127.0.0.1:8000/transactions", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(transaction)
});Create a .env file in the backend directory:
# Database
DATABASE_URL=sqlite:///./transactions.db
# Server
HOST=0.0.0.0
PORT=8000
DEBUG=true
# Security
SECRET_KEY=your-secret-key-hereThe system uses SQLite by default. The database is automatically created on first run. For production, consider PostgreSQL or MySQL.
Once the backend is running, visit:
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
GET /health- Health checkGET /transactions- List transactions with filteringPOST /transactions- Create new transactionGET /transactions/by-txn-id/{txn_id}- Get transaction by IDWS /ws- WebSocket for real-time updates
TransactionMonitoring/
βββ backend/ # FastAPI backend
β βββ main.py # Main application
β βββ db.py # Database configuration
β βββ requirements.txt # Python dependencies
β βββ README.md # Backend documentation
βββ index.html # Frontend application
βββ DESIGN_SYSTEM.md # UI/UX design guidelines
βββ uses.md # Utility scripts and examples
βββ docs/ # Additional documentation
βββ README.md # This file
cd backend
python -m pytestOpen the browser developer tools and check the console for any errors. The WebSocket connection should show as connected.
- Build the image:
docker build -t transaction-monitoring .- Run the container:
docker run -p 8000:8000 transaction-monitoringFor production deployment:
- Use a production-grade database (PostgreSQL/MySQL)
- Set up reverse proxy (Nginx)
- Configure HTTPS
- Set up monitoring and logging
- Use environment variables for configuration
Please read our Contributing Guidelines before submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
For security concerns, please read our Security Policy and report vulnerabilities responsibly.
- π§ Email: [your-email@example.com]
- π Issues: GitHub Issues
- π Documentation: Wiki
- FastAPI framework for the robust backend
- Tailwind CSS for the beautiful UI
- All contributors who help improve this project
Built with β€οΈ for secure transaction monitoring