Metadata-Version: 2.1
Name: cybermarket_server
Version: 1.0.1
Summary: The server of the online network market accepts login, listing, purchase, etc. requests sent by the client.
Author-email: Hailin Liu <0123liuhailin@gmail.com>
License: MIT License
        
        Copyright (c) 2024 Hailin Liu
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Keywords: shopping,online-market
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas==2.2.1
Requires-Dist: SQLAlchemy==2.0.25

# cybermarket_server

The server of a online cybermarket.

## Statement of solved problem

**Module goals:** Build a module to accept binary messages from cybermarket_client, parse the messages and perform add, delete, modify and query operations in the database based on parameters.

**Client functions**:
  - **Create an account**:
    - Provide username, email, and password to create a new client.
  - **Account login or logout**:
    - Log in using username or email and password and log out
  - **Modify Personal Information**:
    - Username, email, and password are allowed to be modified
  - **Add or remove products**:
    - Allow customers to add or remove items from their shopping cart
  - **List order items**:
    - Users can view the items in their shopping cart
  - **Get total price**:
    - The user can get the total price of the items in the shopping cart
  - **Checkout order**:
    - Users can check out items in their shopping cart

**Merchant functions**:
  - **Create invitation code**:
    - Merchants can generate invitation codes to invite new merchants to join
  - **Create an account**:
    - Provide storename, description, email, password, and the invitation information to create a new merchant.
  - **Account login or logout**:
    - Log in using storename or email and password and log out
  - **Modify Personal Information**:
    - Storename, description, email, and password are allowed to be modified
  - **Put on or off the shelf**:
    - Merchants should be able to put products on or off the shelves
  - **Product restock**: 
    - Merchants should be able to restock products on shelves
  - **Get profit**:
    - Merchants should be able to capture their profits

**Common functions**:
  - **List Merchant**:
    - Allows to get a list of merchants without logging in
  - **List Product**:
    - Allows to obtain the product list of a specified merchant without logging in

## Description of proposed solution tools
| Depends        | Description |
|---|---|
| Pandas          | A tool for data analysis and manipulation. |
| SQLAlchemy      | A tool for interfacing between Python and databases. |

## Database ERD diagram
![ERD diagram](./ERD_diagram.png)
