Code Monkey home page Code Monkey logo

shopcube's Introduction

First Timers Only

๐Ÿ‡ฒ๐Ÿ‡บ ๐Ÿ‡ต๐Ÿ‡ฐ ๐Ÿ‡ณ๐Ÿ‡ฌ ๐Ÿ‡ฎ๐Ÿ‡ณ ๐Ÿ‡ป๐Ÿ‡ณ ๐Ÿ‡ฌ๐Ÿ‡ญ ๐Ÿ‡ฌ๐Ÿ‡ง

Discord CodeQL

shopcube ko-fi

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

  • ๐Ÿ›’ cart
  • โญ wishlist
  • ๐Ÿ“‘ orders
  • ๐Ÿ“ค upload by csv
  • ๐Ÿ“Š charts
  • ๐Ÿ–Œ๏ธ theming

If you want to contribute, go ahead, we โค๏ธ it. We follow a ๐Ÿ’ฏ % first-timers-friendly policy. Join #shopcube if you get stuck or would just like to chat and say hi.

Powered by Shopyo, a Python web framework built on top of Flask.

Testimonials

source

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

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

โšก Quick try

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

Go to http://127.0.0.1:5000

๐Ÿผ First time setup

  • Install maildev

  • Run maildev, go to the webapp url shown

  • Download and install the latest version of git.

  • Configure git with your username and email.

    $ git config --global user.name 'your name'
    $ git config --global user.email 'your email'
    
  • Make sure you have a GitHub account.

  • Fork shopcube to your GitHub account by clicking the Fork button.

  • Clone the main repository locally (make sure to have your SSH authentication setup!). Replace {username} with your username.

    $ git clone [email protected]:{username}/shopcube.git
    $ cd shopcube
    
  • Create a virtualenv named env and activate the virtual environment:

    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 [email protected] 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": "[email protected]",
          "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 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.

    $ 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. 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.

๐Ÿ”จ Troubleshooting Guide

If you need further assistance, ping @contributor on discord.

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

    In 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.

  • Additional development insights?

โœจ 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

Tests

In venv

cd src/shopcube
python -m pytest ./

shopcube's People

Contributors

90r1ll4 avatar abdur-rahmaanj avatar arch-cl0wn avatar bensonosei avatar caldwell-77 avatar cleopatra2772 avatar dependabot[bot] avatar dozykeys avatar geeythree avatar kumaryogesh17 avatar many-fac3d-g0d avatar matejcech20 avatar rajdeepch10 avatar rehmanis avatar vaithisniper avatar vickywane avatar westsi avatar yadnu avatar yemiodetola avatar zahur76 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shopcube's Issues

Add permission levels

Currently we have only login, not permission control. A basic classification would be admin and non-admin accounts.

Add Accounting Section

  • Feel free to do some research
  • This is primarily for learning. We encourage first timers. Please join our discord to have a chat!

ideas bin

  • what if appointmements clash?
  • percentage profit ?

Add TODO list

A todo section. You can add, modify and delete items. You can also cross out items.

Add Images to Products

  • Let users upload image
  • This is primarily for learning. We encourage first timers. Please join our discord to have a chat!

Help info for contributing.

How do we go about setting up information helping new contributors.

Does this need a new file. such as contributing.md ?

Flask: Add people section

add another view -> people, see products or appointments and do the same | any help needed ask!

People need the following:

  • Name
  • Surname
  • Age
  • Info

Others as needed

You are expected to add an icon in nav.

Add theming support - bootstrap

If you know bootstrap, try implementing theming. See screenshots, currently it's black, it'll be a nice challenge to implement theming in a flask app. Gurl, get those grey matters running

Add more information to Products

Add more information to Products model i.e. title, description

Check out what data other eCommerce sites hold. but keep it simple.

Add appointment section

add another view -> appointments/meetings, see products and do the same | any help needed ask!

Add Payroll Section

  • Requires Employee model
  • This is primarily for learning. We encourage first timers. Please join our discord to have a chat!

Add Point of Sales section

  • Integrates with products
  • This is primarily for learning. We encourage first timers. Please join our discord to have a chat!

Repeated base.html

Hi,
Been checking out the Shopyo app and noticed the base.html is repeated for each section of pages.
would it not be cleaner to have only one standard base template.

Add people section

add another view -> appointments/meetings, see products and do the same.

for people models we need

  • name
  • age
  • birthday (from there calculate age)
  • about
  • social media links

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.