https://github.com/tameronline/pro_product_pg
https://github.com/tameronline/pro_product_pg
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/tameronline/pro_product_pg
- Owner: TamerOnLine
- Created: 2025-05-06T04:42:02.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-07T10:00:33.000Z (about 1 year ago)
- Last Synced: 2025-05-07T13:56:56.054Z (about 1 year ago)
- Language: HTML
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ Flask Product Manager - tameronline-pro_product
A simple and professional product management system built with Python and Flask. It includes an admin panel, public product listing, image uploads, and SQLite-based storage.
---
## โ
Main Features
- ๐ Admin dashboard with login protection
- โ Add products with image, description, specs, and price
- ๐ผ๏ธ Upload and store product images in `static/uploads/`
- ๐ View product details on a separate page
- ๐๏ธ Admin page to manage (edit/delete) all products
- ๐งน Button to reset the entire database
- ๐ Fully Arabic user interface with clean design
---
## ๐ Project Structure
```
tameronline-pro_product/
โโโ myapp.py # Main application entry point
โโโ config.py # App configuration
โโโ requirements.txt # Required packages
โโโ instance/products.db # SQLite database
โโโ models/ # Product model definition
โโโ routes/ # Admin and user routes
โโโ templates/ # HTML templates for both admin and user views
โโโ static/ # CSS and image uploads
โโโ utils/logic/ # Helper modules (currently empty)
โโโ .env # (Optional) Environment variables
```
---
## โ๏ธ Running Locally
### 1. Clone the Repository:
```bash
git clone https://github.com/your-username/tameronline-pro_product.git
cd tameronline-pro_product
```
### 2. Create a Virtual Environment and Install Dependencies:
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
```
### 3. Set Environment Variables:
Create a `.env` file with the following:
```env
cv_kay=your_secret_key_here
ADMIN_USERNAME=admin
ADMIN_PASSWORD=your_password
```
### 4. Run the App:
```bash
python myapp.py
```
Open [http://localhost:8030](http://localhost:8030) in your browser.
---
## ๐ Admin Login
- Username: as set in `ADMIN_USERNAME` in `.env`
- Password: as set in `ADMIN_PASSWORD` in `.env`
---
## ๐๏ธ Notes
- Uses SQLite for local development
- Images are saved under `static/uploads/` with unique names
- Only valid image formats are accepted (png, jpg, jpeg, webp)
- No categories, search, or API support yet
---
## ๐ Future Improvements
- โ
Add product categories
- โ
Implement search functionality
- โ
Create a RESTful API
- โ
Add Contact/About pages
- โ
Enable notifications (e.g., email)
- โ
Deploy to PythonAnywhere / Render
---
## ๐ License
Open-source for personal and educational use.