A comprehensive platform designed for the Creative Community club at VVITU. The platform serves as the center for student activities, managing attendance, resources, internal notifications, and member registration. It features a robust, secure backend and a retro-futuristic, "hacker-themed" user interface.
- Secure Member Authentication & Management: Role-based access control (Admin/Member) with specialized dashboards.
- Hardware-Level Ban Enforcement: Advanced fingerprinting (
canvas+hardwaremetrics) paired with a server-side IP firewall blocks malicious users across refreshes, incognito modes, and Cloudflare layers. - Live Attendance Checking: Real-time polling with an active countdown for club checking mechanisms.
- Resource Vault: A curated library of links, GitHub repositories, and tools for students with GitHub API integration for stars and forks.
- Dynamic Profile Avatars: Users can upload and customize their PFPs.
- Backend: Python 3.10+, Flask, Waitress/Gunicorn (for prod).
- Database: MySQL / MariaDB (via
mysql-connector-python). - Frontend: Vanilla JS (ES6+), CSS3 with Custom Variables, HTML5.
- Infrastructure Context: Specifically built to run behind Cloudflare and within Pterodactyl container environments.
- Python 3.8 or higher
- MySQL / MariaDB installed and running.
pip
-
Clone the repository:
git clone https://github.com/your-org/creative-community.git cd creative-community -
Create a virtual environment and install dependencies:
python -m venv venv source venv/bin/activate # Or `venv\Scripts\activate` on Windows pip install Flask mysql-connector-python requests python-dotenv
-
Configure Environment Variables:
- Copy the example config:
cp .env.example .env - Edit
.envto match your local database instance. - Define your
ADMIN_*variables. The first time the server boots, it will use these settings to auto-generate the root Administrator account.
- Copy the example config:
Run the Flask application:
python app.pyNote: The application defaults to port
10018. Visithttp://127.0.0.1:10018/creative-community/to view the site.
This application employs a highly aggressive auto-banning mechanism targeting malicious inspectors (e.g., users trying to bypass the client flow using Ctrl+U or F12).
- Frontend Fingerprinting:
main.jsgenerates an immutable hardware/canvas fingerprint (getDeviceId()). - Event Listeners: Context menus and common inspector hotkeys are blocked. Triggering them executes a POST to
/api/security/block. - Database Logging: Both the generated Device ID and the real client IP (via
CF-Connecting-IP/X-Forwarded-For) are saved. - Server Intercept: The core Flask app uses an
@app.before_requesthook (check_ip_ban()) to intercept and drop requests matching the banned IPs, falling back to Device ID checks if the IP floats.
If you lock yourself out locally, remove your IP/ID from the blocked_devices table.