ShopHive is a lightweight e-commerce platform currently in active development. The project aims to provide small businesses with tools to showcase products and manage inventory, with future plans for customer engagement features.
- ✅ Basic Flask application setup
- ✅ Project structure and organization
- ✅ Initial database models
- ✅ User authentication
- ⏳ Product management (In Progress)
- ✅ Shopping cart functionality
- ⏳ User registration (In Progress)
- 🔜 Payment integration (Planned)
- 🔜 Real-time chat system (Planned)
- Basic product listing
- Database models for users and products
- Frontend templates structure
- Development environment setup
- User authentication system
- Product management interface
- Basic inventory tracking
- Real-time chat system
- Secure payment gateway integration
- Advanced inventory management
- Customer engagement tools
shophive_packages/
├── static/ # Static files for CSS, JS, images
│ └── css/ # Stylesheets
│ └── style.css
├── templates/ # Flask Jinja2 templates
│ ├── base.html # Parent template
│ ├── home.html # Product listing page
│ ├── add_product.html # Add product form
│ ├── product_detail.html # Product details page
├── models/ # Database models
│ ├── __init__.py
│ ├── cart.py
│ ├── product.py
│ ├── user.py
├── routes/ # Application routes
│ ├── __init__.py
│ ├── cart_routes.py
│ ├── user_routes.py
│ ├── product_routes.py # Product-related routes
├── forms/ # Forms
│ ├── __init__.py
│ ├── product_form.py # Form for adding/editing products
├── tests/ # Unit and integration tests
│ ├── __init__.py
│ ├── conftest.py
│ ├── test_auth.py
│ ├── test_homepage.py
│ ├── test_routes.py
│ └── test_models/ # Test models
│ ├── test_product_model.py
│ ├── test_user_model.py
├── app.py # Main Flask application
├── config.py # Configuration settings
├── setup.sh # Script to set up the environment
├── .env.example # Example environment variables
├── generate-authors.sh # Script to generate AUTHORS file
- Python 3.8 or higher
- pip package manager
- Virtual environment tool (recommended)
- Navigate to the GitHub repository for ShopHive.
- Click on the
Code
button. - Select the
Codespaces
tab. - Click on
New codespace
.
-
Clone the repository:
git clone https://github.com/Charis04/ShopHive.git cd ShopHive
-
Set up dependencies:
./setup.sh
-
Run the development server:
flask run
OR
python app.py
-
Access the app at
http://127.0.0.1:5000
.
- Completing user authentication system
- Implementing basic product management
- Setting up testing infrastructure
- Establishing CI/CD pipeline
- Base Template: Provides a consistent layout with a header, footer, and navigation links.
- Home Page: Displays a list of products dynamically.
- Add Product Page: Allows users to add new products via a form.
- Product Detail Page: Displays detailed information about a specific product.
The frontend uses:
- CSS: For custom styling.
- Bootstrap (optional): For responsiveness and consistent design.
- JavaScript (optional): To add interactivity (e.g., form validation).
- Add screenshots of the home page, add product page, etc.
Currently implementing test suite. To run available tests:
pytest -v
For coverage reports, you can use:
pytest --cov=shophive_packages
If you want a more detailed coverage report, you can use:
pytest --cov=shophive_packages --cov-report=term-missing
This will show which lines of code are not covered by the tests.
You can also generate an HTML report:
pytest --cov=shophive_packages --cov-report=html
In VS Code terminal, you can open it with:
# For Linux
python -m http.server --directory htmlcov 8000
You can also generate an XML report:
pytest --cov=shophive_packages --cov-report=xml
NOTE: Test coverage is currently being expanded.
-
Copy
.env.example
to.env
:cp .env.example .env
-
Update the values as needed (e.g., API keys, database URLs).
The project is in early development and we welcome contributions! Please check the Issues tab for current tasks.
We welcome contributions! Follow these steps to get started:
-
Fork the repository and clone it locally.
-
Create a new branch for your feature:
git checkout -b feature-name
-
Commit your changes and push to your fork.
-
Open a pull request to the main repository.
If you're contributing for the first time:
./generate-authors.sh
- Complete basic authentication
- Implement product CRUD operations
- Set up testing infrastructure
- Shopping cart functionality
- User profiles
- Basic payment integration
- Real-time chat system
- Advanced inventory management
- Analytics dashboard
- Enhanced user authentication
- Admin dashboard for managing products
- Integration with external APIs for payments