A comprehensive e-commerce web application built with Flask that connects craftspeople and artisans with customers looking for unique, handmade products. CraftsmanCorner provides a marketplace where sellers can showcase their handcrafted items and buyers can discover and purchase authentic artisanal goods.
- Product Discovery: Browse and search through a curated collection of handcrafted items
- Advanced Filtering: Filter products by type, gender, brand, size, price range, and seller
- Shopping Cart: Add products to cart and manage quantities
- Order Management: Track order history and status
- Favorites: Save favorite products for later
- User Balance: Manage account balance for purchases
- Shop Directory: Browse all registered shops and sellers
- Review System: Rate and review purchased products
- Reporting: Report inappropriate content or issues
- Product Management: Add, edit, and manage product listings with multiple images
- Inventory Tracking: Monitor stock levels and product performance
- Order Processing: View and manage incoming orders
- Business Profile: Create detailed seller profiles with business information
- Sales Analytics: Access sales reports and performance metrics
- Balance Management: Withdraw earnings from sales
- Verification System: Get verified seller status for increased credibility
- User Management: Oversee buyer and seller accounts
- Content Moderation: Review and respond to user reports
- System Analytics: Generate comprehensive system reports
- Platform Oversight: Monitor platform health and user activity
- Backend: Flask (Python)
- Database: MySQL 5.7
- Frontend: HTML5, CSS3, Bootstrap 4, JavaScript
- Email Service: Flask-Mail with SMTP
- File Upload: Werkzeug secure file handling
- Containerization: Docker & Docker Compose
- Session Management: Flask sessions
- Security: Password hashing, SQL injection protection
- Docker and Docker Compose
- Python 3.9+ (for local development)
- MySQL 5.7+ (for local development)
-
Clone the repository
git clone <repository-url> cd CraftsmanCornerProject
-
Build and run with Docker Compose
docker-compose up --build
-
Access the application
- Open your browser and navigate to
http://localhost:5000 - The MySQL database will be available on
localhost:3307
- Open your browser and navigate to
The application will automatically:
- Set up the MySQL database
- Create all necessary tables using
schema.sql - Insert sample data
- Start the Flask application
-
Install dependencies
pip install -r requirements.txt
-
Set up MySQL database
mysql -u root -p CREATE DATABASE craftsmancornerdb; -
Import database schema
mysql -u root -p craftsmancornerdb < schema.sql -
Configure environment Update the database configuration in
app/app.py:app.config['MYSQL_HOST'] = 'localhost' # Change from 'db' to 'localhost' app.config['MYSQL_USER'] = 'root' app.config['MYSQL_PASSWORD'] = 'your_password' app.config['MYSQL_DB'] = 'craftsmancornerdb'
-
Run the application
cd app python app.py
CraftsmanCornerProject/
βββ app/
β βββ admin/ # Admin functionality
β β βββ __init__.py
β β βββ route.py # Admin routes and dashboard
β βββ static/ # Static assets
β β βββ logo.png # Application logos
β β βββ products/ # Product images
β βββ templates/ # HTML templates
β β βββ admin/ # Admin templates
β β βββ buyer_*.html # Buyer interface templates
β β βββ seller_*.html # Seller interface templates
β β βββ *.html # General templates
β βββ app.py # Main Flask application
β βββ product.py # Product management blueprint
β βββ profile.py # User profile management
β βββ order.py # Order processing
β βββ report.py # Reporting system
βββ docker-compose.yaml # Docker composition configuration
βββ Dockerfile # Docker container configuration
βββ requirements.txt # Python dependencies
βββ schema.sql # Database schema and sample data
βββ README.md # Project documentation
- Start the application using Docker or local setup
- Create accounts:
- Visit
http://localhost:5000 - Register as a buyer or seller
- Admin login is available at
/admin/login_admin
- Visit
- Buyers: Can browse, search, and purchase products
- Sellers: Can list products, manage inventory, and process orders
- Admins: Have full system access for moderation and analytics
Update email settings in app/app.py:
app.config['MAIL_SERVER'] = 'your-smtp-server.com'
app.config['MAIL_USERNAME'] = 'your-email@domain.com'
app.config['MAIL_PASSWORD'] = 'your-email-password'app.config['UPLOAD_FOLDER'] = 'uploads/'
app.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024 # 16MB max file sizeThe application uses a comprehensive database schema with the following main entities:
- User: Base user information with balance management
- Buyer/Seller: Role-specific user extensions
- Product: Product catalog with images and metadata
- Order: Order processing and tracking
- Review: Product reviews and ratings
- Report: User reporting system
- Admin: Administrative users
- Password hashing for user accounts
- SQL injection protection through parameterized queries
- Secure file upload handling
- Session-based authentication
- Role-based access control
- User blocking/banning capabilities
/- Home page/login- User authentication/register_buyer- Buyer registration/register_seller- Seller registration/buyer_dashboard- Buyer interface/seller_dashboard- Seller interface
/product/*- Product management/order/*- Order processing/report/*- Reporting system/admin/*- Administrative functions
- Fork the repository
- Create a 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.
For support, please create an issue in the repository or contact the development team.
- Payment gateway integration
- Real-time chat between buyers and sellers
- Mobile application
- Advanced analytics dashboard
- Multi-language support
- Social media integration
- API for third-party integrations