PJ Store is a comprehensive, full-stack e-commerce platform built with Python and Flask. It provides a robust, multi-role ecosystem for customers, sellers, and administrators, featuring product management, secure payments with Stripe, and an integrated support system.

- Super Admin: Full platform control, including managing admins and global settings.
- Admin: Manage users, approve sellers, and oversee product listings.
- Seller: Dedicated dashboard for managing products, variants, inventory, and orders.
- Support: Specialized interface for handling customer support tickets.
- Customer: Browsing products, managing a shopping cart, and tracking orders.
- Product Management: Dynamic catalog with support for product variants (e.g., size, color, material) and price overrides.
- Shopping Cart: Real-time cart management for authenticated users.
- Secure Checkout: Full integration with Stripe API for processing payments safely.
- Address Book: Users can save and manage multiple shipping addresses with a default selection.
- Responsive Design: Built with Bootstrap 5 for a seamless experience across desktop and mobile.
- Security: Implements CSRF protection, secure password hashing, and role-based access control (RBAC).
- Database: Powered by SQLAlchemy with support for SQLite (development) and PostgreSQL (production).
- Automation: Includes a dedicated CLI script for initial Super Admin setup.
- Backend: Flask
- Frontend: HTML5, CSS3, Bootstrap 5, JavaScript
- Database: SQLAlchemy (ORM)
- Forms: Flask-WTF & WTForms
- Authentication: Flask-Login
- Payments: Stripe
- Environment: Python-Dotenv
git clone https://github.com/yourusername/PJ-Store-Flask.git
cd PJ-Store-Flaskpython3 -m venv venv
source venv/bin/bin/activate # On Windows: venv\Scripts\activatepip install -r requirements.txtCreate a .env file in the root directory and add the following:
APP_SECRET_KEY=your_secret_key_here
STRIPE_PUBLIC_KEY=your_stripe_public_key
STRIPE_SECRET_KEY=your_stripe_secret_key
DATABASE_URL=sqlite:///site.db # Or your PostgreSQL URLRun the following command to create your first administrative account:
python create_super_admin.pypython run.pyThe application will be available at http://127.0.0.1:5000.
PJ-Store-Flask/
├── app/
│ ├── auth/ # Authentication, User Models, & Dashboards
│ ├── main/ # Core landing pages and routes
│ ├── products/ # Product catalog, variants, and seller management
│ ├── orders/ # Shopping cart and order processing
│ ├── payments/ # Stripe integration and payment logic
│ ├── support/ # Ticket-based support system
│ ├── static/ # CSS, JS, and product images
│ └── templates/ # Jinja2 HTML templates
├── instance/ # Local database (SQLite)
├── create_super_admin.py # CLI for admin setup
├── run.py # Application entry point
└── requirements.txt # Project dependencies
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.