{"id":19961844,"url":"https://github.com/chuksjoshuaa/storefront","last_synced_at":"2026-05-01T21:34:30.127Z","repository":{"id":108267755,"uuid":"448031051","full_name":"ChuksJoshuaa/Storefront","owner":"ChuksJoshuaa","description":"Automated testing using pytest and performance testing using locust and django-silk .","archived":false,"fork":false,"pushed_at":"2022-01-17T03:01:51.000Z","size":4547,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-20T02:41:27.291Z","etag":null,"topics":["beat","celery-tasks","djangorestframework","docker","flower","redis","silk"],"latest_commit_sha":null,"homepage":"","language":"Python","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/ChuksJoshuaa.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":"2022-01-14T16:19:09.000Z","updated_at":"2022-08-11T15:30:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"588ccf9f-f56c-484d-adda-bbe9ed20a7a2","html_url":"https://github.com/ChuksJoshuaa/Storefront","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ChuksJoshuaa/Storefront","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChuksJoshuaa%2FStorefront","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChuksJoshuaa%2FStorefront/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChuksJoshuaa%2FStorefront/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChuksJoshuaa%2FStorefront/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChuksJoshuaa","download_url":"https://codeload.github.com/ChuksJoshuaa/Storefront/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChuksJoshuaa%2FStorefront/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32513762,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["beat","celery-tasks","djangorestframework","docker","flower","redis","silk"],"created_at":"2024-11-13T02:08:35.600Z","updated_at":"2026-05-01T21:34:30.104Z","avatar_url":"https://github.com/ChuksJoshuaa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[Django REST framework](http://www.django-rest-framework.org/) is a powerful and flexible toolkit for building Web APIs.\n\n## Requirements\n\n- Python 3.7\n- Django 3.1\n- Django REST Framework\n\n## Installation\n\nAfter you clone the repository, you want to create a virtual environment, so you have a clean python installation.\nYou can do this by running the command.\n\n```\npython -m venv env\n```\n\nAfter this, it is necessary to activate the virtual environment, you can get more information about this [here](https://docs.python.org/3/tutorial/venv.html)\n\nYou can install all the required dependencies by running.\n\n```\npip install -r requirements.txt\n```\n\n## Structure\n\nIn a RESTful API, endpoints (URLs) define the structure of the API and how end users access data from our application using the HTTP methods - GET, POST, PUT, DELETE.\n\nIn our case, we have one single resource, `store`, so we will use the following URLS - `/store/products/` and `/store/collections/` for getting the list of products and their respective collections.\n\n| Endpoint             | HTTP Method | CRUD Method | Result               |\n| -------------------- | ----------- | ----------- | -------------------- |\n| `store`              | GET         | READ        | Get all Api Root     |\n| `store/products/`    | GET         | READ        | Get all products     |\n| `store/collections/` | GET         | READ        | Get all collections  |\n| `store/products/:id` | POST        | CREATE      | Create a new product |\n| `store/products/:id` | PUT         | UPDATE      | Update a product     |\n| `store/products/:id` | DELETE      | DELETE      | Delete a product     |\n\n## Use\n\nWe can test the API using [Postman](https://www.postman.com/).\n\nPostman, it is an HTTP client that tests HTTP requests, utilizing a graphical user interface, through which we obtain different types of responses that need to be subsequently validated.\n\nFirst, we have to start up Django's development server.\n\n```\npython manage.py runserver\n```\n\nOnly authenticated users can use the API services, for that reason, we use this to create an account:\n\n```\nhttp  http://127.0.0.1:8000/auth/users\n```\n\n## Create users and Tokens\n\nAfter we create an account we can use those credentials to get a token\n\nTo get a token first we need to request.\n\n```\nhttp http://127.0.0.1:8000/auth/jwt/create\nusername=\"username\" password=\"password\"\n\n```\n\nafter that, we get the token. Something like this.\n\n```\n{\n    \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTYxNjI5MjMyMSwianRpIjoiNGNkODA3YTlkMmMxNDA2NWFhMzNhYzMxOTgyMzhkZTgiLCJ1c2VyX2lkIjozfQ.hP1wPOPvaPo2DYTC9M1AuOSogdRL_mGP30CHsbpf4zA\",\n    \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjE2MjA2MjIxLCJqdGkiOiJjNTNlNThmYjE4N2Q0YWY2YTE5MGNiMzhlNjU5ZmI0NSIsInVzZXJfaWQiOjN9.Csz-SgXoItUbT3RgB3zXhjA2DAv77hpYjqlgEMNAHps\"\n}\n```\n\nWe got two tokens, the access token will be used to authenticate all the requests we need to make, this access token will expire after a day.\n\n`\nThe API has some restrictions:\n\n- The store are always associated with the admins or users with neccessary permissions.\n- Only authenticated users may read and see store products and their collections.\n- Only the admin or users with necessary permissions may update or delete it.\n- The API doesn't allow unauthenticated requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchuksjoshuaa%2Fstorefront","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchuksjoshuaa%2Fstorefront","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchuksjoshuaa%2Fstorefront/lists"}