shopcube


Nameshopcube JSON
Version 4.6.1 PyPI version JSON
download
home_pageNone
SummaryE-commerce solution
upload_time2024-09-26 20:44:37
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseMIT
keywords flask pos management shop ecommerce cms erp e-commerce
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">



<img src="https://github.com/Abdur-rahmaanJ/shopcube/raw/dev/assets/logo.png" width="250" />

[![First Timers Only](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](https://www.firsttimersonly.com/)

🇲🇺 🇵🇰 🇳🇬 🇮🇳 🇻🇳 🇬🇭 🇬🇧

</div>

<div align="center">

[![Discord](https://img.shields.io/badge/chat%20on-discord-green.svg)](https://discord.gg/k37Ef6w)
[![CodeQL](https://github.com/shopyo/shopcube/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/shopyo/shopcube/actions/workflows/codeql-analysis.yml)

</div>

# shopcube [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/S6S2GDNC7)

shopcube is an e-commerce solution for shops. Complete with

- [x] 🛒 cart
- [x] ⭐ wishlist
- [x] 📑 orders
- [x] 📤 upload by csv
- [ ] 📊 charts
- [x] 🖌️ theming

If you want to contribute, go ahead, we ❤️ it. We follow a 💯 % first-timers-friendly policy. Join [#shopcube](https://discord.gg/Gnys4C6xZX) if you get stuck or would just like to chat and say hi.

Powered by [Shopyo](https://github.com/shopyo/shopyo), a Python web framework built on top of Flask.

## Testimonials

[source](https://github.com/shopyo/shopcube/discussions/16)

> This was my first time contributing to an open source project and I struggled quite a bit but Abdur-Rahmaan and shams are responsive , helpful, and welcoming!! I was able to make a small contribution despite having little experience using Flask. Whenever I had questions, they were answered well on discord. I recommend working with Abdur-Rahmaan and shams! If you're nervous about contributing, they make the experience much less intimidating than I had anticipated. --[@taanguyen](https://github.com/taanguyen)

> I'd like to thank @Abdur-rahmaanJ for creating this project! Though I have limited experience working with Flask, and was unable to understand the code and its functioning at first, Abdur-rahmaanJ explained everything very patiently and helped me clear all the doubts! I was able to learn new concepts and it was an amazing experience overall. I'd recommend opensource newbies like me and even experienced contributors to make contributions to this project. 💯 --[@geeythree](https://github.com/geeythree)

## ⚡ Quick try

```
$ python -m pip install shopcube
$ shopcube initialise
$ shopcube rundebug
```

Go to [http://127.0.0.1:5000](http://127.0.0.1:5000)

## 🍼 First time setup

- Install [maildev](https://www.npmjs.com/package/maildev)

- Run `maildev`, go to the webapp url shown

- Download and install the [latest version of git](https://git-scm.com/downloads).

- Configure git with your [username](https://docs.github.com/en/github/using-git/setting-your-username-in-git) and [email](https://docs.github.com/en/github/setting-up-and-managing-your-github-user-account/setting-your-commit-email-address).

  ```
  $ git config --global user.name 'your name'
  $ git config --global user.email 'your email'
  ```

- Make sure you have a [GitHub account](https://github.com/join).

- Fork shopcube to your GitHub account by clicking the [Fork](https://github.com/shopyo/shopcube/fork) button.

- [Clone](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#step-2-create-a-local-clone-of-your-fork) the main repository locally (make sure to have your [SSH authentication](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) setup!). Replace `{username}` with your username.

  ```
  $ git clone git@github.com:{username}/shopcube.git
  $ cd shopcube
  ```

- Create a virtualenv named env and activate the [virtual environment](https://docs.python.org/3/tutorial/venv.html):

  Linux/macOS

  ```
  $ python3 -m venv env
  $ . env/bin/activate
  ```

  Windows

  ```
  > py -3 -m venv env
  > env\Scripts\activate
  ```

- Upgrade pip and setuptools:

  ```
  $ python -m pip install --upgrade pip setuptools
  ```

- Install the development dependencies and shopcube requirements:

  ```
  $ python -m pip install -r reqs/dev.txt
  $ pre-commit install
  ```

- Now initialize the app by running:

  ```
  $ python -m pip install -e .
  $ cd src/shopcube
  $ shopyo initialise
  ```

- Run shopcube:

  ```
  $ flask run
  ```

- Go to the link http://127.0.0.1:5000/ and you should see the shopcube app running.

- Login as administrator by clicking on the login icon on the top right hand side of the screen.

  Enter admin@domain.com as the username and 'pass' as the pasword.

  After login, you should be directed to http://0.0.0.0:5000/dashboard/.

  ```
  # see config.json
   "admin_user": {
        "email": "admin@domain.com",
        "password": "pass"
    }
  ```

## 🎫 Some explanations

Shopcube has two modes:

- package mode if you want to just use the app as is
- control mode if you want to see exactly what's going on

Package mode has several commands to manage the json settings file

```
$ shopcube showjson # show settings
$ shopcube copyjson # copy json file from site-packages in current directory
$ shopcube applyjson # apply json file in current directory
$ shopcube restorejson # restore original json file in site-packages
$ shopcube create # create new project named shopcube in current directory
$ shopcube packageinfo # path of project
```

Control mode allows you to use Shopyo commands as you would in any project

```
$ shopcube create
$ ls shopcube/
├── app.py
├── config.example.json
├── config.json
├── config.py
├── conftest.py
├── file.log
├── __init__.py
├── init.py
├── instance
├── __main__.py
├── modules
├── __pycache__
├── pyproject.toml
├── requirements.txt
├── setup.cfg
├── static
├── tests
├── utils
└── wsgi.py
$ cd shopcube
$ shopyo initialise
$ shopyo rundebug # or flask run
```

## ↩ Pull Requests

--> Add flag to readme

Make sure you have setup the repo as explained in [First time setup](https://shopyo.readthedocs.io/en/latest/contrib.html#setup) before making Pull Request (PR)

- Create a branch for the issue you would like to work on:

  ```
  $ git fetch origin
  $ git checkout -b <your-branch-name> origin/dev
  ```

  Note

  As a sanity check, you can run `git branch` to see the current branch you are on in case your terminal is not setup to show the current branch.

- Using your favorite editor, make your changes, [committing as you go](https://dont-be-afraid-to-commit.readthedocs.io/en/latest/git/commandlinegit.html#commit-your-changes).

  ```
  $ git add <filenames to commit>
  $ git commit -m "<put commit message here>"
  ```

- Push your commits to your fork on GitHub. The -u option allows your local branch to be pushed to your GitHub repo.

  ```
  $ git push -u origin your-branch-name
  ```

- [Create a pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request). You should see the PR link in the terminal after you successfully push your commits. Link to the issue being addressed with `fixes #123` in the pull request. See [example PR](https://github.com/shopyo/shopyo/pull/55).

## 🔨 Troubleshooting Guide

If you need further assistance, ping [@contributor](https://discord.gg/k37Ef6w) on discord.

- When I initialise the app, I get an error related to MySQL (ie: a Connection Error)

  In `instance/config.py`, make sure you have a database URI

  ```
  SQLALCHEMY_DATABASE_URI = "mysql+pymysql://{username}:{password}@{server_name}/{db_name}".format(
      username='shopcube',
      password='pass1234-A',
      server_name='localhost',
      db_name='shopcube'
  )
  ```

  or paste the following into `config.py` inside of the `class DevelopmentConfig(Config)`:

  ```
  SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(base_path, 'app.db')
  ```

- I launched the app but nothing shows up in /dashboard.

  - Log in as admin@domain.com with the password 'pass'

- Additional development insights?

  - Read the [shopyo](https://shopyo.readthedocs.io/en/latest/) docs!

## ✨ Useful commands

```
$ flask flight-info

Python version: 3.10.7 (main, Sep  7 2022, 15:22:19) [GCC 9.4.0]
Shopyo version: 4.5.8
Shopcube version : 4.2.0
SQLALCHEMY_DATABASE_URI: sqlite:///shopcube.db
```

## 🍳 In Action

![](screenshots/new_screenshots/1.png)
![](screenshots/new_screenshots/2.png)
![](screenshots/new_screenshots/3.png)
![](screenshots/new_screenshots/4.png)

# Tests

In venv

```
cd src/shopcube
python -m pytest ./
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "shopcube",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "flask, pos, management, shop, ecommerce, cms, erp, e-commerce",
    "author": null,
    "author_email": "Abdur-Rahmaan Janhangeer & contributors <arj.python@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/30/c7/88267862458876b13c559b98fe2a66c8b0ca284084bc93ac67850e2328fc/shopcube-4.6.1.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n\n\n\n<img src=\"https://github.com/Abdur-rahmaanJ/shopcube/raw/dev/assets/logo.png\" width=\"250\" />\n\n[![First Timers Only](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](https://www.firsttimersonly.com/)\n\n\ud83c\uddf2\ud83c\uddfa \ud83c\uddf5\ud83c\uddf0 \ud83c\uddf3\ud83c\uddec \ud83c\uddee\ud83c\uddf3 \ud83c\uddfb\ud83c\uddf3 \ud83c\uddec\ud83c\udded \ud83c\uddec\ud83c\udde7\n\n</div>\n\n<div align=\"center\">\n\n[![Discord](https://img.shields.io/badge/chat%20on-discord-green.svg)](https://discord.gg/k37Ef6w)\n[![CodeQL](https://github.com/shopyo/shopcube/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/shopyo/shopcube/actions/workflows/codeql-analysis.yml)\n\n</div>\n\n# shopcube [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/S6S2GDNC7)\n\nshopcube is an e-commerce solution for shops. Complete with\n\n- [x] \ud83d\uded2 cart\n- [x] \u2b50 wishlist\n- [x] \ud83d\udcd1 orders\n- [x] \ud83d\udce4 upload by csv\n- [ ] \ud83d\udcca charts\n- [x] \ud83d\udd8c\ufe0f theming\n\nIf you want to contribute, go ahead, we \u2764\ufe0f it. We follow a \ud83d\udcaf % first-timers-friendly policy. Join [#shopcube](https://discord.gg/Gnys4C6xZX) if you get stuck or would just like to chat and say hi.\n\nPowered by [Shopyo](https://github.com/shopyo/shopyo), a Python web framework built on top of Flask.\n\n## Testimonials\n\n[source](https://github.com/shopyo/shopcube/discussions/16)\n\n> This was my first time contributing to an open source project and I struggled quite a bit but Abdur-Rahmaan and shams are responsive , helpful, and welcoming!! I was able to make a small contribution despite having little experience using Flask. Whenever I had questions, they were answered well on discord. I recommend working with Abdur-Rahmaan and shams! If you're nervous about contributing, they make the experience much less intimidating than I had anticipated. --[@taanguyen](https://github.com/taanguyen)\n\n> I'd like to thank @Abdur-rahmaanJ for creating this project! Though I have limited experience working with Flask, and was unable to understand the code and its functioning at first, Abdur-rahmaanJ explained everything very patiently and helped me clear all the doubts! I was able to learn new concepts and it was an amazing experience overall. I'd recommend opensource newbies like me and even experienced contributors to make contributions to this project. \ud83d\udcaf --[@geeythree](https://github.com/geeythree)\n\n## \u26a1 Quick try\n\n```\n$ python -m pip install shopcube\n$ shopcube initialise\n$ shopcube rundebug\n```\n\nGo to [http://127.0.0.1:5000](http://127.0.0.1:5000)\n\n## \ud83c\udf7c First time setup\n\n- Install [maildev](https://www.npmjs.com/package/maildev)\n\n- Run `maildev`, go to the webapp url shown\n\n- Download and install the [latest version of git](https://git-scm.com/downloads).\n\n- Configure git with your [username](https://docs.github.com/en/github/using-git/setting-your-username-in-git) and [email](https://docs.github.com/en/github/setting-up-and-managing-your-github-user-account/setting-your-commit-email-address).\n\n  ```\n  $ git config --global user.name 'your name'\n  $ git config --global user.email 'your email'\n  ```\n\n- Make sure you have a [GitHub account](https://github.com/join).\n\n- Fork shopcube to your GitHub account by clicking the [Fork](https://github.com/shopyo/shopcube/fork) button.\n\n- [Clone](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#step-2-create-a-local-clone-of-your-fork) the main repository locally (make sure to have your [SSH authentication](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) setup!). Replace `{username}` with your username.\n\n  ```\n  $ git clone git@github.com:{username}/shopcube.git\n  $ cd shopcube\n  ```\n\n- Create a virtualenv named env and activate the [virtual environment](https://docs.python.org/3/tutorial/venv.html):\n\n  Linux/macOS\n\n  ```\n  $ python3 -m venv env\n  $ . env/bin/activate\n  ```\n\n  Windows\n\n  ```\n  > py -3 -m venv env\n  > env\\Scripts\\activate\n  ```\n\n- Upgrade pip and setuptools:\n\n  ```\n  $ python -m pip install --upgrade pip setuptools\n  ```\n\n- Install the development dependencies and shopcube requirements:\n\n  ```\n  $ python -m pip install -r reqs/dev.txt\n  $ pre-commit install\n  ```\n\n- Now initialize the app by running:\n\n  ```\n  $ python -m pip install -e .\n  $ cd src/shopcube\n  $ shopyo initialise\n  ```\n\n- Run shopcube:\n\n  ```\n  $ flask run\n  ```\n\n- Go to the link http://127.0.0.1:5000/ and you should see the shopcube app running.\n\n- Login as administrator by clicking on the login icon on the top right hand side of the screen.\n\n  Enter admin@domain.com as the username and 'pass' as the pasword.\n\n  After login, you should be directed to http://0.0.0.0:5000/dashboard/.\n\n  ```\n  # see config.json\n   \"admin_user\": {\n        \"email\": \"admin@domain.com\",\n        \"password\": \"pass\"\n    }\n  ```\n\n## \ud83c\udfab Some explanations\n\nShopcube has two modes:\n\n- package mode if you want to just use the app as is\n- control mode if you want to see exactly what's going on\n\nPackage mode has several commands to manage the json settings file\n\n```\n$ shopcube showjson # show settings\n$ shopcube copyjson # copy json file from site-packages in current directory\n$ shopcube applyjson # apply json file in current directory\n$ shopcube restorejson # restore original json file in site-packages\n$ shopcube create # create new project named shopcube in current directory\n$ shopcube packageinfo # path of project\n```\n\nControl mode allows you to use Shopyo commands as you would in any project\n\n```\n$ shopcube create\n$ ls shopcube/\n\u251c\u2500\u2500 app.py\n\u251c\u2500\u2500 config.example.json\n\u251c\u2500\u2500 config.json\n\u251c\u2500\u2500 config.py\n\u251c\u2500\u2500 conftest.py\n\u251c\u2500\u2500 file.log\n\u251c\u2500\u2500 __init__.py\n\u251c\u2500\u2500 init.py\n\u251c\u2500\u2500 instance\n\u251c\u2500\u2500 __main__.py\n\u251c\u2500\u2500 modules\n\u251c\u2500\u2500 __pycache__\n\u251c\u2500\u2500 pyproject.toml\n\u251c\u2500\u2500 requirements.txt\n\u251c\u2500\u2500 setup.cfg\n\u251c\u2500\u2500 static\n\u251c\u2500\u2500 tests\n\u251c\u2500\u2500 utils\n\u2514\u2500\u2500 wsgi.py\n$ cd shopcube\n$ shopyo initialise\n$ shopyo rundebug # or flask run\n```\n\n## \u21a9 Pull Requests\n\n--> Add flag to readme\n\nMake sure you have setup the repo as explained in [First time setup](https://shopyo.readthedocs.io/en/latest/contrib.html#setup) before making Pull Request (PR)\n\n- Create a branch for the issue you would like to work on:\n\n  ```\n  $ git fetch origin\n  $ git checkout -b <your-branch-name> origin/dev\n  ```\n\n  Note\n\n  As a sanity check, you can run `git branch` to see the current branch you are on in case your terminal is not setup to show the current branch.\n\n- Using your favorite editor, make your changes, [committing as you go](https://dont-be-afraid-to-commit.readthedocs.io/en/latest/git/commandlinegit.html#commit-your-changes).\n\n  ```\n  $ git add <filenames to commit>\n  $ git commit -m \"<put commit message here>\"\n  ```\n\n- Push your commits to your fork on GitHub. The -u option allows your local branch to be pushed to your GitHub repo.\n\n  ```\n  $ git push -u origin your-branch-name\n  ```\n\n- [Create a pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request). You should see the PR link in the terminal after you successfully push your commits. Link to the issue being addressed with `fixes #123` in the pull request. See [example PR](https://github.com/shopyo/shopyo/pull/55).\n\n## \ud83d\udd28 Troubleshooting Guide\n\nIf you need further assistance, ping [@contributor](https://discord.gg/k37Ef6w) on discord.\n\n- When I initialise the app, I get an error related to MySQL (ie: a Connection Error)\n\n  In `instance/config.py`, make sure you have a database URI\n\n  ```\n  SQLALCHEMY_DATABASE_URI = \"mysql+pymysql://{username}:{password}@{server_name}/{db_name}\".format(\n      username='shopcube',\n      password='pass1234-A',\n      server_name='localhost',\n      db_name='shopcube'\n  )\n  ```\n\n  or paste the following into `config.py` inside of the `class DevelopmentConfig(Config)`:\n\n  ```\n  SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(base_path, 'app.db')\n  ```\n\n- I launched the app but nothing shows up in /dashboard.\n\n  - Log in as admin@domain.com with the password 'pass'\n\n- Additional development insights?\n\n  - Read the [shopyo](https://shopyo.readthedocs.io/en/latest/) docs!\n\n## \u2728 Useful commands\n\n```\n$ flask flight-info\n\nPython version: 3.10.7 (main, Sep  7 2022, 15:22:19) [GCC 9.4.0]\nShopyo version: 4.5.8\nShopcube version : 4.2.0\nSQLALCHEMY_DATABASE_URI: sqlite:///shopcube.db\n```\n\n## \ud83c\udf73 In Action\n\n![](screenshots/new_screenshots/1.png)\n![](screenshots/new_screenshots/2.png)\n![](screenshots/new_screenshots/3.png)\n![](screenshots/new_screenshots/4.png)\n\n# Tests\n\nIn venv\n\n```\ncd src/shopcube\npython -m pytest ./\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "E-commerce solution",
    "version": "4.6.1",
    "project_urls": {
        "Bug Reports": "https://github.com/Abdur-RahmaanJ/shopcube/issues",
        "Source": "https://github.com/Abdur-RahmaanJ/shopcube/"
    },
    "split_keywords": [
        "flask",
        " pos",
        " management",
        " shop",
        " ecommerce",
        " cms",
        " erp",
        " e-commerce"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a79071f7d95ec8d7bbd6f5b3980ed624152d6581de87b793ce350a458712f719",
                "md5": "a18eeb3595e85598c1aacea9a46d89a2",
                "sha256": "9b02741e5ff688606dab36cc3fa32ed9382ec9d506284634c1c9959e817b1046"
            },
            "downloads": -1,
            "filename": "shopcube-4.6.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a18eeb3595e85598c1aacea9a46d89a2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 179628,
            "upload_time": "2024-09-26T20:44:35",
            "upload_time_iso_8601": "2024-09-26T20:44:35.888576Z",
            "url": "https://files.pythonhosted.org/packages/a7/90/71f7d95ec8d7bbd6f5b3980ed624152d6581de87b793ce350a458712f719/shopcube-4.6.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "30c788267862458876b13c559b98fe2a66c8b0ca284084bc93ac67850e2328fc",
                "md5": "51bc5492462db6861b5ac4d51658f663",
                "sha256": "e0775e4385fae4307ba5c901e530757b05c82f3efcee55efea4ed804f8afe9d0"
            },
            "downloads": -1,
            "filename": "shopcube-4.6.1.tar.gz",
            "has_sig": false,
            "md5_digest": "51bc5492462db6861b5ac4d51658f663",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 118646,
            "upload_time": "2024-09-26T20:44:37",
            "upload_time_iso_8601": "2024-09-26T20:44:37.328216Z",
            "url": "https://files.pythonhosted.org/packages/30/c7/88267862458876b13c559b98fe2a66c8b0ca284084bc93ac67850e2328fc/shopcube-4.6.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-26 20:44:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Abdur-RahmaanJ",
    "github_project": "shopcube",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "shopcube"
}
        
Elapsed time: 0.35465s