{"id":20106772,"url":"https://github.com/nneji123/prioritysoft-test","last_synced_at":"2026-05-05T01:36:50.853Z","repository":{"id":244104260,"uuid":"813708211","full_name":"Nneji123/prioritysoft-test","owner":"Nneji123","description":"Django Project Solution for PrioritySoft","archived":false,"fork":false,"pushed_at":"2024-06-16T02:09:50.000Z","size":842,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T01:33:36.472Z","etag":null,"topics":["django-rest-framework","docker-compose","github-actions","openapi3","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nneji123.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-06-11T15:30:19.000Z","updated_at":"2024-06-16T02:09:53.000Z","dependencies_parsed_at":"2024-11-13T17:54:49.520Z","dependency_job_id":"e8873ebf-f12c-42c1-b91d-3dc76924193e","html_url":"https://github.com/Nneji123/prioritysoft-test","commit_stats":null,"previous_names":["nneji123/prioritysoft-test"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nneji123%2Fprioritysoft-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nneji123%2Fprioritysoft-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nneji123%2Fprioritysoft-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nneji123%2Fprioritysoft-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nneji123","download_url":"https://codeload.github.com/Nneji123/prioritysoft-test/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241549087,"owners_count":19980475,"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":["django-rest-framework","docker-compose","github-actions","openapi3","python"],"created_at":"2024-11-13T17:54:43.921Z","updated_at":"2026-05-05T01:36:45.816Z","avatar_url":"https://github.com/Nneji123.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Priority Store\n| Category | Badges |\n| --- | --- |\n| CI/CD | [![tests](https://github.com/Nneji123/prioritysoft-test/actions/workflows/tests.yml/badge.svg)](https://github.com/Nneji123/prioritysoft-test/actions/workflows/tests.yml) [![codecov](https://codecov.io/gh/Nneji123/prioritysoft-test/graph/badge.svg?token=PmwZ7zM9xC)](https://codecov.io/gh/Nneji123/prioritysoft-test) ![Docker](https://img.shields.io/badge/Docker-blue?style=flat\u0026logo=docker\u0026logoColor=white) |\n| Meta | [![Language](https://img.shields.io/badge/Python-3.8-blue.svg?style=flat\u0026logo=python\u0026logoColor=white)](https://www.python.org) [![Framework](https://img.shields.io/badge/Django-darkgreen.svg?style=flat\u0026logo=django\u0026logoColor=white)](https://www.djangoproject.com/) [![Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![isort](https://img.shields.io/badge/code%20style-isort-000000.svg)](https://pycqa.github.io/isort/) [![Ruff](https://img.shields.io/badge/linter-ruff-000000.svg)](https://github.com/charliermarsh/ruff) [![Pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white)](https://github.com/pre-commit/pre-commit) [![Gitpod](https://img.shields.io/badge/Gitpod-ready--to--code-ff69b4?logo=gitpod\u0026logoColor=white)](https://gitpod.io/) [![License - MIT](https://img.shields.io/badge/license-MIT-9400d3.svg)](./LICENSE) |\n\n\n\n\nPriority Store is a Django Rest Framework project designed to manage the inventory of items and suppliers efficiently. This project includes various features such as a custom user model, Celery for task handling, Docker for containerization, and more. This documentation provides an extensive overview of the project's structure, setup, and usage.\n\n**Features**\n\n- **Custom User Model:** A tailored user model to meet specific authentication needs.\n- **Celery:** Handles asynchronous tasks such as password reset emails and supplier notification emails.\n- **Rate Throttling:** Implements rate limiting to control the number of requests a user can make, enhancing security and preventing abuse.\n- **Pagination:** Provides efficient data retrieval and user-friendly navigation by breaking down large datasets into manageable chunks.\n- **Use of Django Signals:** Triggers supplier notifications through Django signals, ensuring real-time updates and streamlined communication.\n- **Pre-commit Hooks:** Configured with black and isort to ensure code quality and consistency.\n- **Makefile:** Simplifies common tasks and commands.\n- **Docker Compose:** Supports multiple environments (production and development).\n- **Separated Settings:** Different settings for development and production environments.\n- **Automated Tests:** Uses GitHub Actions, pytest, and codecov for continuous integration and code coverage.\n- **Modular Apps Structure:** Enhances code modularity and maintainability.\n- **OpenAPI Documentation:** Provides extensive API documentation using Swagger and Redoc with drf-spectacular.\n- **Custom Admin Interface:** Utilizes Django admin interface package for a customized admin experience.\n- **Staticfiles Hosting:** Uses Whitenoise for serving static files.\n- **Postgres and Redis Services:** Facilitates easy setup with Docker.\n- **Mailpit:** Email testing functionality with visual representation of Mailpit UI.\n\n## Project Structure\n\n```\nprioritysoft-test/\n.\n├── LICENSE\n├── Makefile\n├── README.md\n├── apps\n│   ├── __init__.py\n│   ├── accounts\n│   │   ├── __init__.py\n│   │   ├── admin.py\n│   │   ├── apps.py\n│   │   ├── managers.py\n│   │   ├── migrations\n│   │   ├── mixins.py\n│   │   ├── models.py\n│   │   ├── schema.py\n│   │   ├── serializers.py\n│   │   ├── tasks.py\n│   │   ├── templates\n│   │   ├── throttles.py\n│   │   ├── urls.py\n│   │   ├── utils.py\n│   │   └── views.py\n│   ├── core\n│   │   ├── __init__.py\n│   │   ├── apps.py\n│   │   ├── management\n│   │   ├── middlewares.py\n│   │   ├── migrations\n│   │   ├── templates\n│   │   └── utils.py\n│   └── inventory\n│       ├── __init__.py\n│       ├── admin.py\n│       ├── apps.py\n│       ├── migrations\n│       ├── models.py\n│       ├── pagination.py\n│       ├── permissions.py\n│       ├── schema.py\n│       ├── serializers.py\n│       ├── signals.py\n│       ├── tasks.py\n│       ├── templates\n│       ├── urls.py\n│       ├── utils.py\n│       └── views.py\n├── compose.yml\n├── data\n│   ├── cert.pem\n│   ├── csr.pem\n│   ├── key.pem\n├── docker\n│   ├── Dockerfile.dev\n│   ├── Dockerfile.prod\n│   ├── requirements.development.txt\n│   └── requirements.production.txt\n├── docs\n│   └── code_samples\n│       └── accounts\n├── manage.py\n├── requirements.txt\n├── scripts\n│   ├── deploy.sh\n│   └── entrypoint.sh\n├── store\n│   ├── __init__.py\n│   ├── asgi.py\n│   ├── celery.py\n│   ├── settings\n│   │   ├── __init__.py\n│   │   ├── base.py\n│   │   ├── development.py\n│   │   └── production.py\n│   ├── urls.py\n│   └── wsgi.py\n├── tests\n│   ├── __init__.py\n│   ├── conftest.py\n│   ├── test_accounts\n│   ├── test_core\n│   └── test_inventory\n```\n\n## Apps Overview\n\n### Core\n\nThe **Core** app contains essential functions and utilities that are shared across the project. These include:\n\n- **Middlewares**: Custom middlewares for request processing.\n- **Templates**: Base templates for rendering views.\n- **Management Commands**: Custom Django management commands for various administrative tasks.\n\n### Accounts\n\nThe **Accounts** app manages user-related functionality, including:\n\n- **Admins**: Users with full access to the system.\n- **Employees**: Users who can perform operations on items but can only view supplier information without modification rights.\n- **Models**: Defines user roles and permissions.\n- **Views**: Manages the API endpoints for user operations.\n- **Serializers**: Transforms user data for API responses.\n- **Permissions**: Defines access control logic for different user roles.\n\n### Inventory\n\nThe **Inventory** app handles the management of items and suppliers:\n\n- **Items**: Products that can have multiple suppliers.\n- **Suppliers**: Entities that provide items.\n- **Models**: Defines the schema for items and suppliers.\n- **Views**: Manages the API endpoints for inventory operations.\n- **Serializers**: Transforms inventory data for API responses.\n- **Permissions**: Defines access control logic for item and supplier operations.\n\n## UI Screenshots\n\n\u003cdetails\u003e\n\u003csummary\u003eSwagger UI\u003c/summary\u003e\n\u003cimg src=\".github/images/Screenshot%20(694).png\" alt=\"Swagger UI\"\u003e\n\u003cimg src=\".github/images/Screenshot%20(695).png\" alt=\"Swagger UI2\"\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eRedoc UI\u003c/summary\u003e\n\u003cimg src=\".github/images/Screenshot%20(698).png\" alt=\"Redoc UI\"\u003e\n\u003cimg src=\".github/images/Screenshot%20(699).png\" alt=\"Redoc UI\"\u003e\n\u003c/details\u003e\n\n### Mailpit UI\n\n\u003cdetails\u003e\n\u003csummary\u003eMailpit UI\u003c/summary\u003e\n\u003cimg src=\".github/images/Screenshot%20(696).png\" alt=\"Mailpit UI\"\u003e\n\u003cimg src=\".github/images/Screenshot%20(697).png\" alt=\"Mailpit UI\"\u003e\n\u003c/details\u003e\n\n### Custom Admin Interface\n\nThis project includes a custom admin interface using Django admin interface package. You can access the admin panel at `/admin/`.\n\n\u003cdetails\u003e\n\u003csummary\u003eAdmin UI\u003c/summary\u003e\n\u003cimg src=\".github/images/Screenshot%20(700).png\" alt=\"Admin UI\"\u003e\n\u003cimg src=\".github/images/Screenshot%20(701).png\" alt=\"Admin UI\"\u003e\n\u003c/details\u003e\n\n## Getting Started\n\n### Prerequisites\n\n- Docker\n- Docker Compose\n- Git\n- Python 3.8+\n\n### Setup\n\n#### Clone the Repository\n\n```sh\ngit clone https://github.com/nneji123/prioritysoft-test.git\ncd prioritysoft-test\n```\n\n#### Environment Variables\n\nCreate a `.env` file in the root directory and add the necessary environment variables. Refer to `.env.sample` for guidance.\n\n#### Using Docker\n\nBuild and run the containers:\n\n```sh\ndocker build -t my_image_name /docker/Dockerfile.dev\ndocker run -d --name my_container_name my_image_name\n```\n\nFor production:\n\n```sh\ndocker build -t my_image_name /docker/Dockerfile.prod\ndocker run -d --name my_container_name my_image_name\n\n```\n\n#### Using Docker Compose\n\nBuild and run the containers:\n\n```sh\ndocker compose up --build\n```\n\n#### Using Makefile\n\nTo run the project using Makefile:\n\n```sh\nmake start\n```\n\n#### Using Python Commands\n\nIf you prefer not to use Docker, you can set up the project with Python:\n\n1. Install dependencies:\n\n```sh\npip install -r requirements.txt\n```\n\n2. Apply migrations:\n\n```sh\npython manage.py migrate\n```\n\n3. Run the development server:\n\n```sh\npython manage.py runserver\n```\n\n### Running with Gitpod\n\n\nYou can use Gitpod, a free online VS Code-like environment, to quickly start contributing.\n\n[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/nneji123/prioritysoft-test)\n\n### Running with CodeSpaces\n\nTo run the project in GitHub Codespaces:\n\n1. Open the repository in Codespaces.\n2. Codespaces will set up the environment and start the development server.\n\n## Testing\n\nTo run the tests:\n\n```sh\npip install pytest pytest-mock pytest-celery pytest-cov pytest-django\nDJANGO_SETTINGS_MODULE=store.settings.development pytest --cov=apps tests --cov-report=xml\n```\n\nCoverage reports will be generated by Codecov.\n\n### Setting Up Pre-Commit Hooks\n\nWe use `pre-commit` to ensure code quality. Install it by running:\n\n```bash\npip install pre-commit\npre-commit install\n```\n\nNow, `pre-commit` will run automatically before each commit to check for linting and other issues.\n\n\n## OpenAPI Documentation\n\nThis project includes extensive API documentation generated with drf-spectacular. You can access the Swagger UI and Redoc documentation at the following endpoints:\n\n- Swagger UI: `/swagger/`\n- Redoc: `/docs/`\n\nThe OpenAPI `yaml` spec file is located in the `docs` directory.\n\n\n## Static Files\n\nStatic files are served using Whitenoise. Ensure your static files are collected:\n\n```sh\npython manage.py collectstatic\n```\n\n## Services\n\n### Postgres\n\nPostgres is used as the database service. It is configured in the Docker Compose files.\n\n### Redis\n\nRedis is used as a message broker for Celery tasks. It is also configured in the Docker Compose files.\n\n### Mailpit\n\nMailpit is used for email testing. The `.pem` files required for Mailpit to start are located in the `data` directory.\n\n## Contributing\n\nContributions are welcome! Please follow the guidelines below:\n\n### Submitting a Pull Request\n\n1. Fork the repository and create a new branch for your contribution:\n\n    ```bash\n    git checkout -b feature-or-fix-branch\n    ```\n\n2. Make your changes, run tests and commit them:\n\n    ```bash\n    git add .\n    git commit -am \"Your meaningful commit message\"\n    ```\n\n3. Push the changes to your fork:\n\n    ```bash\n    git push origin feature-or-fix-branch\n    ```\n\n4. Open a pull request on GitHub. Provide a clear title and description of your changes.\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnneji123%2Fprioritysoft-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnneji123%2Fprioritysoft-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnneji123%2Fprioritysoft-test/lists"}