Shopyo
Featured on Weekly Python issue 436 ๐
๐ Open inventory management and Point of sales (powered by python) for small shops.
- ๐ Crisp UI
- ๐ Intuitive
- ๐ Instant lookup
- โ๏ธ Towards customisation
Shopyo makes a great Flask base. In continuous improvement.
โ๏ธ Stability
beta - now in beta!
alpha - highly volatile, core features not yet finished
๐ Contributing Countries
๐ฒ๐บ x 1 | ๐ฉ๐ช x ? | ๐จ๐ณ x ? | ๐ฌ๐ง x ? | ๐ธ๐ฌ x ? | ๐บ๐ฌ x 1 | ๐ฎ๐ณ x ?
๐ฅ Just Added Features
- Confirmation before deleting section
- Settings fully operationable
- Apply settings works for existing and non-existing db
- Instantly checks duplicate
- Appointment section
๐ Testimonial
This is my first time contributing to a public repo and I have quite enjoyed it. If you're a
first-time-contributor
the community is very helpful and can help you progress. Since I have been helping in this repo, I have also learnt a few things myself. The owner of the repo is active and is always willing to help.Also, if I'm around and you're stuck give us a shout. I'll help if I can.
@blips5
๐ฐ In The News
- Shopyo is announced on LinkedIn
- Featured on Python Weekly issue 436
- Bhavesh Solanki tells about his Open Source experience contributing to Shopyo on LinkedIn
- Arthur Nangai from Andela joins the project as 3rd core comitter
- Project goes officially in Beta, v1.0.0 released
- Duckduckgo recognises Shopyo
Understand Shopyo
Shopyo internals explained here: Shopyo: Enhance Your Flask by Exploring An Advanced Flask App
๐ History
I want to learn!
Months ago, I was searching github for a point of sales solution that used Python. What bothered me was that many of the applications I found were not ideal. Some required Posgres with the expectation that a user would already have this installed, others had codebases that were a mess of spaghetti code, yet others were django-based accounting monsters ...
I decided to try making my own solution, modeled after a client request, I had once recived. I Made it flask-based with SQLalchemy and SQLite. You can instantly get started with no hassle, switching to something more powerful when you want to (since it uses an ORM)
For the UI, we used the latest, bootstrap4, fa5 and jq3. Interestingly enough, I had two shop owners try it and they were very impressed with the ease of use.
It is still in devolopment and supports instant lookup. Long story short, with some programming skills, you can solve some everyday problems. And yes, no cdn, all libs are bundled so that you can use it completely offline
See this linked-in article!
โจ๏ธ Contributing
If you want to contribute, go ahead, we โค๏ธ it. We follow a ๐ฏ % first-timers-friendly policy.
- Fork repo.
git clone https://github.com/<your-username>/shopyo.git
- Create a new branch. For example:
bg-fix-migration-file
.
git checkout -b bg-fix-migration-file
- Once you have add your changes ensure tests are still passing. # beginners ignore this one until we write more explicit docs
- Add tests for any new functionality added. # beginners ignore this one until we write more explicit docs
- Ensure you commits follow the standard specified here.
- Follow the Pull request template.
- Add your country flag in readme after accepted PR
- Update fork as below then
- Push
git push origin <branch-name>
- If it closes an issue, add
Fixes #94
for example, as seen here
Update Fork
cd <your/local/cloned/repo/path/here>
git remote add upstream https://github.com/Abdur-rahmaanJ/shopyo.git
git fetch upstream
git pull upstream master
๐ฌ Community: Discord
๐ง Install instructions
- download python3.7
- clone and cd into project
- run
python -m pip install -r requirements.txt
๐ Run instructions
cd
into shopyo/shopyo if not already.
initialise and setup app.
python manage.py initialise
run the app.
python manage.py runserver
go to the indicated url
Super User password
User ID: user
password: pass
๐ฉ Migrations
In case of change to models, do
python manage.py db migrate
pyhton manage.py db upgrade
๐ Complete Commands
Initialise database.
python manage.py db init # create db from new
python manage.py db migrate
python manage.py db upgrade
clean project
python manage.py clean
removes __pycache__/
, test.db
and migrations
.
๐ Docs
Sphinx docs generater
Run
sphinx-build -b html sphinx_source docs
in shopyo/
to generate docs
Read the docs for Sphinx Alablaster
๐ง Developing a template.
Show me how
Each landing page and subsection should contain the following headers.
{% extends "base/main_base.html" %}
// extends the base.html file.
{% set active_page = "sectionName" %}
// sets the active section (change section name).
Create the main landing page of a new section in the template folder.
Inside the template folder create a folder named as you want
/template
/base
/<changeme> (swap <changeme> for section name).
index.html
Create a subsection template.
Inside the template folder create a new file under the folder named same as the section.
/template
/base
/section_name
index.html
anotherfile.html
Create navigation elements for a new section.
Inside the template folder create a file named nav.html
.
/template
/base
/example_section_name
index.html
nav.html
In the nav.html
file elements for the navigation can be created.
To display the navagation elements.
Open the template /base
folder and locate the nav_base.html
.
In the nav_bar_log([])
array. Enter the section name last in the list.
{% set nav_bar_log = [
('section0'),
('section1'),
('new_section')
] %}
Now enter a new elif statement containing a reference to the _nav.html
{% if active_page == nav_bar_log[0] %}
{% include "section0/nav.html" %}
{% elif active_page == nav_bar_log[1] %}
{% include "section1/nav.html" %}
{% elif active_page == nav_bar_log[2] %} <- - - Add 1 to index.
{% include "new_section/nav.html" %}
Then the navagation elements will be displayed in the new section.
Windows Deployment
Show me how
๐ณ In Action
Roadmap
- โ๏ธ Models
- โ๏ธ Migrations
- โ๏ธ Restful Api
- โ๏ธ Manage.py
- โ๏ธ CSRF protection
- โ๏ธ Easy dev/production mode switch
- โ๏ธ Login
- โ๏ธ Api namespacing / apps
- โ๏ธ Django-like structure (where models, views and templates all in one folder)
In Progress
- ๐ Unit tests
- ๐ Integration tests
- ๐ Permission levels
Crossed Out
- โ๏ธ Forms (We believe it should be to the front-end designer's taste)