A robust and professional Product Management System built with Python (Flask), PostgreSQL, and Cloudinary. It features a multi-role interface (Admin / Merchant / Customer), product approval workflows, dynamic notifications, and Arabic RTL support.
- 🔒 Role-based login: Admin, Merchant, Customer
- ➕ Add, edit, delete, and approve products with rich text and image upload
- ✅ Dynamic product approval and notification system
- 🖼️ Cloudinary integration for secure and optimized image hosting
- 📨 Real-time notification flow for product tasks
- 🌐 Full Arabic RTL interface via Flask-Babel (i18n)
- 🧼 Form validation and input sanitization
- 📊 Admin dashboard and merchant portal
- 🛠️ Reset DB, seed accounts, test error pages (dev only)
tameronline-pro_product_pg/
├── myapp.py # Main entry point (Flask app)
├── config.py # App configuration
├── models/ # SQLAlchemy Models (User, Product, Notification)
├── routes/ # Route blueprints: auth, admin, merchant, reset, etc.
├── logic/ # Notifications, validation, flow control
├── templates/ # Jinja2 HTML templates
├── static/ # CSS and media folders
├── render.yaml # Deployment file for Render.com
├── requirements.txt # Python dependencies
└── .env # Environment config (locally)
git clone https://github.com/your-username/tameronline-pro_product_pg.git
cd tameronline-pro_product_pgpython -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activatepip install -r requirements.txtCreate a .env file in the root:
cv_kay=your_secret_key_here
DATABASE_URL=your_postgresql_url
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
TINYMCE_API_KEY=your_tinymce_keypython init_db.pypython myapp.pyVisit: http://localhost:8030
/test-errors/401or/test-errors/500: Simulate error pages/dev/reset: Wipe and recreate DB in development mode- Logging stored in:
logs/error.log
Use create_super_admin_if_needed() to generate first admin.
Deployment is configured via render.yaml:
- PostgreSQL + Gunicorn + Cloudinary
- Environment variables are auto-synced
startCommand: gunicorn myapp:app
- Add multilingual support
- Enable product categories
- Implement cart system
- Create REST API
- Customer order flow
- Stripe/PayPal integration
This project defaults to Arabic (RTL). Language switching can be implemented using Flask-Babel’s locale_selector_func.
MIT License – Free for personal and educational use.