{"id":20495472,"url":"https://github.com/vyahello/quotes","last_synced_at":"2025-04-13T17:43:54.964Z","repository":{"id":42489464,"uuid":"250532898","full_name":"vyahello/quotes","owner":"vyahello","description":"📋 Web app to reflect famous quotes (django, pytest, docker, k8s, heroku, travisCI)","archived":false,"fork":false,"pushed_at":"2024-04-26T09:05:45.000Z","size":13243,"stargazers_count":4,"open_issues_count":6,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T08:45:12.064Z","etag":null,"topics":["django","fullstack","quotes","quotes-application","web-application"],"latest_commit_sha":null,"homepage":"https://quote-quote.herokuapp.com","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/vyahello.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-27T12:48:53.000Z","updated_at":"2024-04-26T09:05:49.000Z","dependencies_parsed_at":"2022-09-09T13:20:40.790Z","dependency_job_id":null,"html_url":"https://github.com/vyahello/quotes","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vyahello%2Fquotes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vyahello%2Fquotes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vyahello%2Fquotes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vyahello%2Fquotes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vyahello","download_url":"https://codeload.github.com/vyahello/quotes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248756632,"owners_count":21156799,"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","fullstack","quotes","quotes-application","web-application"],"created_at":"2024-11-15T17:45:59.969Z","updated_at":"2025-04-13T17:43:54.948Z","avatar_url":"https://github.com/vyahello.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Screenshot](media/logo.png)\n\n[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/)\n[![Build Status](https://travis-ci.org/vyahello/quotes.svg?branch=master)](https://travis-ci.org/vyahello/quotes)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Checked with pylint](https://img.shields.io/badge/pylint-checked-blue)](https://www.pylint.org)\n[![Checked with flake8](https://img.shields.io/badge/flake8-checked-blue)](http://flake8.pycqa.org/)\n[![Checked with pydocstyle](https://img.shields.io/badge/pydocstyle-checked-yellowgreen)](http://www.pydocstyle.org/)\n[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE.md)\n[![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org)\n[![CodeFactor](https://www.codefactor.io/repository/github/vyahello/quotes/badge)](https://www.codefactor.io/repository/github/vyahello/quotes)\n[![Docker pulls](https://img.shields.io/docker/pulls/vyahello/quotes.svg)](https://hub.docker.com/repository/docker/vyahello/quotes)\n[![Website](https://img.shields.io/website?url=https%3A%2F%2Fpep8-checker.herokuapp.com)](https://quote-quote.herokuapp.com)\n\n# Quotes\n\n\u003e Simple web application to show quotes of famous people.\n\u003e\n\u003e It is built with **django** python web framework.\n\n_**Note**: please take into account that it is built for demo purpose but not for actual usage._\n\n## Tools\n\n### Production\n\n- front-end\n  - html5\n  - css3\n- back-end\n  - python 3.7, 3.8\n  - [django](https://www.djangoproject.com/) web framework\n- [docker](https://www.docker.com/) \u003e= 18.0\n- [k8s](https://kubernetes.io/) \u003e= 1.21.1\n\n### Development \n\n- [pytest](https://pypi.org/project/pytest/)\n- [black](https://black.readthedocs.io/en/stable/)\n- [mypy](http://mypy.readthedocs.io/en/latest)\n- [pylint](https://www.pylint.org/)\n- [flake8](http://flake8.pycqa.org/en/latest/)\n- [pydocstyle](https://github.com/PyCQA/pydocstyle)\n- [travis](https://travis-ci.org/)\n\n## Usage\n\n![Usage](media/usage.gif)\n\n### Quick start \n\nPlease discover app via:\n  - https://quote-quote.herokuapp.com (prod stage)\n  - http://178.62.222.165:5003 (test stage)\n\n### Docker\n\n```bash\ndocker run --rm -it -p 3000:5001 vyahello/quotes:\u003cversion\u003e quotes\n```\n\n\u003e Please access an application via http://0.0.0.0:3000 endpoint\n\n### K8S \n\n```bash\nkubectl create deployment quotes --image=vyahello/quotes \nkubectl expose deployment quotes --type=LoadBalancer --port=3000\n```\n\n\u003e Please access an application via http://0.0.0.0:3000 endpoint\n\n### Source code\n\n```bash\ngit clone git@github.com:vyahello/quotes.git\ncd quotes \npython3 -m venv venv \n. venv/bin/activate\npip install -r requirements.txt \npip install -r requirements-dev.txt \npython quotes/manage.py runserver\n```\n\n\u003e Please access an application via http://127.0.0.1:8000 endpoint\n\n**[⬆ back to top](#quotes)**\n\n## Development notes\n\n### REST API\n\nRest api is build with `djangorestframework` and `drf-yasg` (swagger) libraries.\n\nHere are available api endpoints:\n- `/api`: \n  - `GET`: _Retrieves all quotes_\n  - `POST`: _Creates a new quote_\n- `/api/\u003cid\u003e`:\n  - `GET`: _Retrieves a single quote by it's id_\n  - `PUT`: _Updates a single quote by it's id_\n  - `DELETE`: _Deletes a quote by it's id_\n\n\u003e Please refer to `/api/docs` endpoint which provides a neat swagger REST API documentation.\n\n### Setup\n\u003e Please use it as a reference to create/manage fresh django application\n```bash\ndjango-admin startproject manager  # create application manager\ndjango-admin startapp app  # create application source\npython quotes/manage.py makemigrations  # add new model (if exists) to database\npython quotes/manage.py migrate  # sync models with database\npython quotes/manage.py shell  # start interactive shell\npython quotes/manage.py createsuperuser  # create user for administration\n```\n\nTo manage an application please use `/admin` endpoint.\n\nPlease use `admin` superuser for management.\n\n### Docker \n\nPlease use the following [example notes](https://github.com/vyahello/quotes#development-notes) to proceed with docker image provisioning.\n\n### K8S\n\nIt is possible to orchestrate app via kubernetes, the following command will launch 3 instances of app.\n\n```bash\nkubectl apply -f k8s/deployment.yaml\nkubectl get pods\nNAME                      READY   STATUS    RESTARTS   AGE\nquotes-6f64474dc5-7ct8t   1/1     Running   0          4m49s\nquotes-6f64474dc5-95cx8   1/1     Running   0          4m49s\nquotes-6f64474dc5-dg5n8   1/1     Running   0          4m49s\n```\n\n### Testing\n\nGenerally, `pytest` tool is used to organize testing procedure.\n\nPlease follow next command to run only **unit** tests:\n```bash\npytest -m unit\n```\n\nOr only **api** tests:\n```bash\npytest -m api\n```\n\nOr only **web** tests, eventually:\n```bash\npytest -m web\n```\n\n### CI\n\nProject has Travis CI integration using [.travis.yml](.travis.yml) file thus code analysis (`black`, `pylint`, `flake8`, `mypy`, `pydocstyle`) and unittests (`pytest`) will be run automatically after every made change to the repository.\n\nTo be able to run code analysis, please execute command below:\n```bash\n./analyse-source-code.sh\n```\n### Release notes\n\nPlease check [changelog](CHANGELOG.md) file to get more details about actual versions and it's release notes.\n\n### Meta\n\nAuthor – _Volodymyr Yahello_. Please check [authors](AUTHORS.md) file for more details.\n\nDistributed under the `MIT` license. See [license](LICENSE.md) for more information.\n\nYou can reach out me at:\n* [vyahello@gmail.com](vyahello@gmail.com)\n* [https://twitter.com/vyahello](https://twitter.com/vyahello)\n* [https://www.linkedin.com/in/volodymyr-yahello-821746127](https://www.linkedin.com/in/volodymyr-yahello-821746127)\n\n### Contributing\nI would highly appreciate any contribution and support. If you are interested to add your ideas into project please follow next simple steps:\n\n1. Clone the repository\n2. Configure `git` for the first time after cloning with your `name` and `email`\n3. `pip install -r requirements.txt` to install all project dependencies\n4. `pip install -r requirements-dev.txt` to install all development project dependencies\n5. Create your feature branch (git checkout -b feature/fooBar)\n6. Commit your changes (git commit -am 'Add some fooBar')\n7. Push to the branch (git push origin feature/fooBar)\n8. Create a new Pull Request\n\n### What's next\n\nAll recent activities and ideas are described at project [issues](https://github.com/vyahello/quotes/issues) page. \nIf you have ideas you want to change/implement please do not hesitate and create an issue.\n\n**[⬆ back to top](#quotes)**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvyahello%2Fquotes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvyahello%2Fquotes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvyahello%2Fquotes/lists"}