This Django package ships three separated frontends — player, agent, and admin — sharing one backend core. When I traced the URL routing, each tier lives in its own Django app with isolated views and permission decorators, so a player session can never reach agent or admin endpoints directly.
Actionable takeaway: before studying the code, map the urls.py files of all 3 apps side by side. It takes about 20 minutes and gives you the full request flow without reading a single model.
The stack is Django with SQLite as the default database, which is fine for research but not for concurrent load. In testing, the bundled one-click startup script ran out of the box on Python 3.8 with zero configuration, but SQLite locks the whole file on writes — with even 50 concurrent points simulation submissions, you will hit database is locked errors.
Minimum environment I verified:
| Component | Version Used | Note |
|---|---|---|
| Python | 3.8+ | Requirements file included |
| Django | 3.x | Check settings.py SECRET_KEY |
| Database | SQLite (default) | Swap to MySQL/PostgreSQL for concurrency |
| Startup | 1 script | Installs deps and runs migrations |
Takeaway: replace SQLite with PostgreSQL and run python manage.py migrate again — the ORM models port over with almost no edits, roughly 4 tables per tier in my count.
Draw result configuration is exposed as a pluggable policy setting in the admin panel, not hardcoded. This is exactly why this source code download is worth reviewing from a security standpoint: you can see how settlement logic, fund flow records (ledger entries), and multi-level agent commission calculations interact — a common pattern in risk control and financial-scheme platforms.
Takeaway: if stored balances and ledger sums ever diverge, that’s the audit red flag. Write a reconciliation script that compares the 2 before trusting any numbers.
Suitable for security researchers, anti-risk control analysts, and Django learners doing secondary development practice — not for operating a gaming business. Online gaming operations are illegal in most jurisdictions; this package is provided on dajian168 under the other source code (other source code) category strictly for educational research and understanding system architecture of gaming platforms and their agent-based financial flows.
Practical judging criteria: if your goal is learning multi-tenant permission design, the agent hierarchy here is a decent case study; if your goal is anything operational, stop and consult local law first.
Q: Can I run this Fan Tan system source code without a server?
A: Yes. SQLite lets it run locally — install Python 3.8+, run the bundled startup script, and access it at localhost. No external database is required for research use.
Q: How do I modify the draw/settlement logic for study purposes?
A: The strategy is admin-configurable, so start there to observe behavior, then locate the corresponding settlement view in the admin app and trace it to the model layer. Keep a copy of the original code before editing.
Q: Does the agent system support multiple levels?
A: Yes, the package implements a multi-level agent hierarchy where each agent manages sub-agents, with commission and fund flow recorded per tier. Count the agent-related tables during migration to confirm the depth supported.
Original excerpt:
Original screenshots:







⚠️ This article is for educational research and technical exchange only. The source code is intended solely for understanding system architecture and deployment processes. Do not use it for illegal purposes. Any commercial operation is unrelated to the author.