{"id":18563446,"url":"https://github.com/vvkin/shop-admin","last_synced_at":"2026-04-10T15:45:01.738Z","repository":{"id":129012145,"uuid":"317675390","full_name":"vvkin/shop-admin","owner":"vvkin","description":"Simple administration panel for building materials store.","archived":false,"fork":false,"pushed_at":"2021-08-04T18:46:26.000Z","size":1844,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-17T13:11:53.528Z","etag":null,"topics":["cms","docker","docker-compose","flask","postgresql","python","sql"],"latest_commit_sha":null,"homepage":"","language":"PLpgSQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vvkin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-01T21:43:01.000Z","updated_at":"2022-12-24T18:55:57.000Z","dependencies_parsed_at":"2023-04-25T20:12:19.615Z","dependency_job_id":null,"html_url":"https://github.com/vvkin/shop-admin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvkin%2Fshop-admin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvkin%2Fshop-admin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvkin%2Fshop-admin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvkin%2Fshop-admin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vvkin","download_url":"https://codeload.github.com/vvkin/shop-admin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254394726,"owners_count":22063984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cms","docker","docker-compose","flask","postgresql","python","sql"],"created_at":"2024-11-06T22:12:41.550Z","updated_at":"2025-12-30T23:04:58.271Z","avatar_url":"https://github.com/vvkin.png","language":"PLpgSQL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shop Admin\nSimple administration panel for building materials shop.\n## Used tools\n* `Python`\n* `flask` (with extensions)\n* `psycopg2`\n* `python-dotenv`\n* `bootstrap`\n* `JavaScript`\n* `HTML/CSS`\n* `PostgreSQL`\n* `Docker`\n* `docker-compose`\n## Get started\nFirst of all, you must have installed **docker** and **docker-compose** on your computer.\\\nAfter that, if needed, change setting in .env files.\nIf you deal with it, do the following steps\n```\ngit clone https://github.com/vvkin/store-admin\ncd shop-admin\ndocker-compose up -d --build\ndocker-compose exec web flask init-db\n```\nAfter that just visit **localhost:5000** to work with application.\\\nIf you run it not for the first time, exclude `--build`.\n## About\nThis application implements simple authentication system that allows admin panel to be used only for users with admin privileges, which are marked on \nthe database level. Administrators differ from regular users by value of the **is_admin** attribute in **customers** relation. It is **TRUE**, if user is \nan admin and **FALSE** otherwise. You can access administration panel using GUI (Profile -\u003e Administrate) or directly using the URL (localhost:5000/admin). \nThe mentioned panel allows you to list all users in table form with pagination, create new users and products, list products filtered by name, \ncategory, update and delete products via user-friendly graphical interface. All of relations are in the 3NF (third normal form) and include at least 10 records.\nAlso application defines user **shop_manager_user**, which have all of the privileges needed to work with admin panel, but is unable to change database schema.\n## How it works\nThe server side of the application, written using Flask with many extensions for it. To access database was used psycopg2 Python library. \nFrontend part was developed with HTML/CSS/JavaScript and Bootstrap to simplify design creation. Application does not use ORM, so all of tools \nlike filtering, pagination, CRUD functionality are defined on the database level as procedures, views, functions. Docker and docker-compose make it easy \nto create and manage containers, which are used to separate database and server.\n## How to create new administrator\nThe easiest way to do this is to use psql tool inside a database container.\\\nTo get inside the container and use psql just type\n```\ndocker-compose exec db psql -U [database_owner]\n```\n*By default database_owner is equal to postgres*\\\nAfter that execute the following query\n```SQL\nINSERT INTO users (email, password, is_admin)\nVALUES ('your email', 'your password', TRUE);\n```\nTo exit from psql type \\q.\n## Contributors\nVadym Kichur, vvkin.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvvkin%2Fshop-admin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvvkin%2Fshop-admin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvvkin%2Fshop-admin/lists"}