Back to .md Directory

Zoorkhan - Persian Sports Supplement E-commerce Store

Describes a Persian-language Flask e-commerce app for sports supplements with RTL layout and admin panel.

May 2, 2026
0 downloads
0 views
llm rag workflow
View source

What this file does

Describes a Persian-language Flask e-commerce app for sports supplements with RTL layout and admin panel.

When to use it

  • Building a Flask e-commerce site targeting Persian-speaking users
  • Need a reference for RTL Bootstrap 5 integration with Flask
  • Looking for a multilingual product model with English and Persian fields
  • Want a complete admin panel with order and product management

Assumes this stack

FlaskFlask-SQLAlchemyFlask-LoginBootstrap 5 RTLSQLitePostgreSQL

Zoorkhan - Persian Sports Supplement E-commerce Store

Overview

Zoorkhan is a Persian (Farsi) e-commerce web application for sports supplements and fitness products. Built with Flask, it provides a complete online store experience with user authentication, product catalog, shopping cart, order management, and admin panel. The application is designed specifically for Persian-speaking users with RTL (right-to-left) layout and Persian language support throughout the interface.

User Preferences

Preferred communication style: Simple, everyday language.

System Architecture

Frontend Architecture

  • Template Engine: Flask Jinja2 templates with Persian language support
  • Styling Framework: Bootstrap 5 RTL for responsive design
  • Layout Direction: RTL (right-to-left) for Persian language
  • Icons: Font Awesome for consistent iconography
  • JavaScript: Vanilla JavaScript for interactivity with Bootstrap components
  • Typography: Vazirmatn Persian font family for optimal readability

Backend Architecture

  • Web Framework: Flask with modular route organization
  • Authentication: Flask-Login for session management and user authentication
  • Password Security: Werkzeug password hashing for secure credential storage
  • Application Structure: Single-module Flask app with separated models and routes
  • Session Management: Flask built-in sessions with configurable secret key
  • Proxy Support: ProxyFix middleware for deployment behind reverse proxies

Database Layer

  • ORM: SQLAlchemy with Flask-SQLAlchemy integration
  • Database: SQLite for development with PostgreSQL support via DATABASE_URL
  • Schema Design: Relational model with proper foreign key relationships
  • Connection Pooling: Configured pool recycling and pre-ping for reliability
  • Migration Support: SQLAlchemy model-based schema creation

Data Models

  • User Model: Complete user profiles with authentication, contact info, and admin roles
  • Product Model: Multilingual product information (English/Persian names and descriptions)
  • Category Model: Hierarchical product categorization with Persian translations
  • Order System: Full order lifecycle with order items and status tracking
  • Shopping Cart: Session-based cart with persistent storage for logged-in users

Security & Authentication

  • User Authentication: Username/password login with secure password hashing
  • Session Security: Configurable session secrets with environment variable support
  • Authorization: Role-based access control with admin panel restrictions
  • Input Validation: Server-side validation with Bootstrap client-side feedback

Admin Panel

  • Dashboard: Administrative overview with statistics and metrics
  • Product Management: CRUD operations for products with image upload support
  • Order Management: Order status tracking and fulfillment workflow
  • User Management: Admin capabilities for user account oversight

External Dependencies

Core Framework Dependencies

  • Flask: Web application framework
  • Flask-SQLAlchemy: Database ORM integration
  • Flask-Login: User authentication and session management
  • Werkzeug: WSGI utilities and security functions

Frontend Dependencies

  • Bootstrap 5 RTL: CSS framework with right-to-left language support
  • Font Awesome: Icon library for UI elements
  • Google Fonts (Vazirmatn): Persian typography support

Database Support

  • SQLite: Development database (default)
  • PostgreSQL: Production database support via DATABASE_URL environment variable

Development Tools

  • Python Logging: Built-in logging configuration for debugging
  • Environment Variables: Configuration management for database and secrets

Deployment Considerations

  • ProxyFix Middleware: Support for reverse proxy deployments
  • Environment Configuration: DATABASE_URL and SESSION_SECRET environment variables
  • Static File Serving: Flask static file handling for images and assets

What's inside

Overview, architecture, data models, security, admin panel, dependencies, and deployment notes across 7 sections

Change this for your project

  • Replace Zoorkhan with your store name throughout
  • Replace amirhosein-fasihi/zoorkhan-store with your repository URL
  • Replace Vazirmatn Persian font with your chosen font if different

Where it goes

Keep it in your repository where the agent or team that needs it will read it.

Worth borrowing

  • Separate English and Persian fields in product and category models for bilingual support
  • Use ProxyFix middleware for Flask deployments behind reverse proxies

Related Documents