{"id":19304133,"url":"https://github.com/amirpsd/drf_blog_api","last_synced_at":"2025-05-05T16:45:09.867Z","repository":{"id":38414111,"uuid":"414116756","full_name":"amirpsd/drf_blog_api","owner":"amirpsd","description":"a simple blog and otp Authentication with django rest framework ","archived":false,"fork":false,"pushed_at":"2024-06-05T20:43:45.000Z","size":219,"stargazers_count":71,"open_issues_count":0,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-30T22:32:08.336Z","etag":null,"topics":["api","django","django-rest-framework","docker","docker-compose","gunicorn","nginx","postgresql","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/amirpsd.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":"2021-10-06T07:43:24.000Z","updated_at":"2025-02-04T21:21:54.000Z","dependencies_parsed_at":"2024-11-09T23:29:02.636Z","dependency_job_id":"e8c44447-4715-4a49-ad18-fdbf063cefe3","html_url":"https://github.com/amirpsd/drf_blog_api","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/amirpsd%2Fdrf_blog_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirpsd%2Fdrf_blog_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirpsd%2Fdrf_blog_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirpsd%2Fdrf_blog_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amirpsd","download_url":"https://codeload.github.com/amirpsd/drf_blog_api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252535541,"owners_count":21763973,"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":["api","django","django-rest-framework","docker","docker-compose","gunicorn","nginx","postgresql","python"],"created_at":"2024-11-09T23:28:46.903Z","updated_at":"2025-05-05T16:45:09.848Z","avatar_url":"https://github.com/amirpsd.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DRF Blog Api With Otp Authentication\n\n![Django Rest Framework](src/static/django_rest_framework.png)\n\nThis project is a Blog site written with **python3.9** and **Django3.2** and **Django_rest_framework_3.12** which is for using api.\n\nThe purpose of this project was to see how a blog with **otp** authentication can be implemented using the django-rest-framework.\n\n## Features\n\n- Authentication with phone number and **Otp** code.\n- Send otp code to user's phone.\n- Two-step verification for authentication.\n- Use cache to temporarily store otp code.\n- The presence of throttling in authentication.\n- Generate tokens using **simple-jwt** after authentication.\n- Production-ready configuration for Static Files, Database Settings, Gunicorn, Ngnix, Docker.\n- Easy installation.\n- Ability to comment on blogs.\n- Ability advanced filter of articles.\n- Use the PostgreSQL database to store data.\n- Existence of logger for debugging.\n- Automated execution of unit tests with GitHub Actions.\n\n\n## Technologies used\n\n- [Python 3.9](https://www.python.org/) , Programming Language. [](https://img.shields.io/badge/python-3.9-red)\n- [Django 3.2](https://docs.djangoproject.com/en/3.2/releases/3.2/) ,  Web Framework.\n- [Django Rest Framework 3.12](https://www.django-rest-framework.org/) , Web API's.\n- [JWT](https://jwt.io/), JSON Web Tokens.\n- [Nginx](https://www.nginx.com/) , Web Server.\n- [Docker](https://www.docker.com/) , Container Platform.\n- [PostgreSQL](https://www.postgresql.org/) , Database.\n- [Gunicorn](https://gunicorn.org/) , WSGI HTTP Server.\n- [Git](https://git-scm.com/doc) , VCS(Version Control System).\n- [GitHub Actions](https://docs.github.com/en/actions) , CI/CD. \n\n## Requirements\n\n**install Docker**\n\nTo run this project, you must install Docker.\n\n- [install Docker in Linux](https://docs.docker.com/engine/install/)\n- [install Docker in Windows](https://docs.docker.com/desktop/windows/install/)\n- [install Docker in Mac](https://docs.docker.com/desktop/mac/install/)\n\nand also install docker-compose.\n\n- [install docker-compose](https://docs.docker.com/compose/install/)\n\n\n## Installation\n\n**Clone the project**\n\n```shell\ngit clone https://github.com/amirpsd/drf_blog_api.git \u0026\u0026 cd drf_blog_api\n```\n\nPlease enter the required information in the **.env** and **.env.db** files before running the project.\n\n**Run project**\n\n**create docker network**\n\n```shell\ndocker network create nginx_network\ndocker network create blog_network\n```\n\n**create docker volume**\n\n```shell\ndocker volume create db_data\n```\n\n**run project**\n\n```shell\ndocker-compose up -d\n```\n\nYou currently have 3 containers running:\n\n- web\n- nginx \n- db\n\nNow create a super user with a **web** container to access the Django admin panel.\n\n```shell\ndocker exec -it web python3 manage.py createsuperuser\n```\n\nAfter creating a super user, go to http://127.0.0.1:80/account/api/login/.\n\nAnd after authentication, create the super user two-step password. http://127.0.0.1:80/account/api/create-two-step-password/\n\nFinally, go to the admin panel. http://127.0.0.1:80/admin/\n\n\n## Endpoints\n\nYou can see the [endpoints.yaml](https://github.com/amirpsd/drf_blog_api/blob/main/endpoints.yaml) file to see the exact details of the endpoints.\n\nor you can go to http://127.0.0.1:80/api/schema/swagger-ui/ or http://127.0.0.1:80/api/schema/redoc/\nto see the endpoints after running the project.\n\n\n## LICENSE\n\nsee the [LICENSE](https://github.com/amirpsd/drf_blog_api/blob/main/LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famirpsd%2Fdrf_blog_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famirpsd%2Fdrf_blog_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famirpsd%2Fdrf_blog_api/lists"}