A Django-based digital wallet with multi-currency cash management, validation, and fraud detection.
Provides a web UI, REST API with Swagger documentation, scheduled tasks, and containerized setup.
Use these credentials to log in immediately:
| Role | Username | Password |
|---|---|---|
| Admin | Kavish | gulati@8989 |
| Tester | tester | test@1234 |
- Backend: Python 3.12, Django 5.2.1
- Async & Scheduling: Celery 5 + Redis
- API: Django REST Framework + drf-yasg (Swagger UI)
- Database: SQLite (development) / PostgreSQL (production)
- Containerization: Docker & Docker Compose
- CI: GitHub Actions
- Frontend: Django Templates + Bootstrap 5
- User Authentication
- Register, Log in, Log out
- “Show password” toggle & “Forgot password” reset flow
- Wallet Operations
- Deposit, Withdraw, Transfer funds
- Support for multiple currencies (INR, USD, etc.)
- Transaction history per user
- Validation & Atomicity
- Overdraft protection, minimum amount checks
- All operations wrapped in atomic transactions
- Fraud Detection
- Flags for rapid transfers & large withdrawals
- Immediate email alerts (console backend in dev)
- Daily Celery-beat scans with summary email
- Soft Delete
is_activeflag on Wallet & Transaction for data retention
- Reporting & Admin API
- Admin web view for flagged transactions
- REST endpoints for flags, balances, top users
- Swagger UI available at
/swagger/
- Python 3.8+ and pip
- Redis server
- (Optional) Docker & Docker Compose
Download the repository ZIP or clone via your preferred Git client into a directory containing manage.py.
cd <project-root>
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txtpython manage.py migratepython manage.py shell
>>> from wallet_app.models import Currency
>>> Currency.objects.create(id=1, code='INR', name='Indian Rupee')
>>> Currency.objects.create(code='USD', name='US Dollar')
>>> exit()python manage.py createsuperuser
# or use default Admin credentials aboveIn one terminal:
redis-server &
python manage.py runserverIn another terminal:
celery -A wallet_project worker --beat --loglevel=info- Main UI: http://127.0.0.1:8000/
- Admin Panel: http://127.0.0.1:8000/admin/
- Swagger UI: http://127.0.0.1:8000/swagger/
Log in as Kavish / gulati@8989 (Admin) or tester / test@1234 (Tester).
docker-compose up --build- web: Django + Celery + Redis
- redis: Redis service
- Ports: 8000 → Django, 6379 → Redis
python manage.py test- Swagger UI at
/swagger/is the primary API explorer. - (Optional) Use
curl:curl -u Kavish:gulati@8989 http://127.0.0.1:8000/api/flags/
- A
.github/workflows/ci.ymlis included for GitHub Actions CI. - Tests, migrations, and linting run on each push/pull request.
This project is licensed under the MIT License. See LICENSE for details.