β οΈ Disclaimer: This project is for educational and personal development purposes only. Despite the branding, no real or illegal drug-related transactions are conducted or encouraged.
MyDrugs.tm is a fully functional, backend-heavy e-commerce web application built with Python and Flask, tailored for learning and testing full-stack development patterns. It simulates a secure digital storefront offering user authentication, session handling, a cart system, user wallet, and basic purchase flows.
-
π User Authentication
- Username/password and email-based login
- TOTP-based Two-Factor Authentication (2FA)
- Secure session handling with Flask
-
π E-Commerce Functionality
- Product browsing with image support
- Cart system with add/remove capability
- Checkout and order processing
-
π³ Wallet System
- Encrypted wallet access with hashed credentials
- Balance management
- Purchase logging with unique order IDs
-
π€ User Account Management
- Profile edit & image uploads
- Secure user deletion
- Dynamic email notifications (SMTP integration)
-
π¬ Email Integration
- Email-based 2FA and account notifications
- Custom HTML mail templates
-
π§ͺ Tech-Ready Design
- Structured for modularity and testing
- Uses
.envsecrets for environment config - Organized file hierarchy with proper separation of concerns
bunny-k28-mydrugs.tm/
βββ website.py # Main Flask app
βββ __init__.py # Business logic & models
βββ requirements.txt # Python dependencies
βββ LICENSE # MIT License
βββ README.md # You're here
βββ Database/
β βββ mydrugs_database.db
β βββ product_ids.txt
β βββ secrets.env
β βββ user_UID_logs.txt
β βββ store/
β βββ products.json
β βββ product_det.json
β βββ wallet/
β βββ cart/
βββ static/
βββ images/
βββ Item_Images/
βββ User_profileImages/| Layer | Stack |
|---|---|
| Backend | Python, Flask |
| Database | SQLite3 |
| Auth & Security | PyOTP, dotenv, hashed passwords |
| Mail Server | SMTP (Gmail) |
| Frontend | HTML (Flask templates), basic CSS |
| QR Generation | qrcode Python library |
-
Clone the Repository
git clone https://github.com/yourusername/bunny-k28-mydrugs.tm.git cd bunny-k28-mydrugs.tm -
Install Dependencies
pip install -r requirements.txt
-
Set Up Environment Variables
- Update
Database/secrets.envwith your SMTP and server configs:PORT=8080 DEBUG=True HOST="0.0.0.0" SMTP_SERVER=smtp.gmail.com SERVER_PORT=465 HOST_SSID=your-email@gmail.com HOST_PSWD=your-email-password
- Update
-
Run the App
python website.py
-
Access in Browser
http://localhost:8080
Arman Das
This repository is maintained by Arman Das for backend architecture experimentation using Flask.
Got questions or suggestions? Feel free to reach out:
- π§ Email: mydrugs.allhelp@gmail.com
- π¬ WhatsApp: Click here to chat