Skip to content

NicolasMuras/Django-login-system

Repository files navigation

Content table

Introduction

The project is a platform with an authentication and authorization system that allows users to create, list, and delete resources while ensuring that they cannot access other users' resources. The platform also includes a quota system to limit the number of resources each user can create. Administrators have the ability to manage users, including their resources and quotas. The platform uses Swagger to automatically document its APIs.

Project implementation

  • Python: Programming language utilized.
  • Django: Open-source framework.
  • Django REST Framework: Django application to build a REST architecture.
  • PostgreSQL: Database engine.
  • Postman: To test the app.
  • Docker: For the deployment of the app.

Authentication and session system with tokens, and these tokens have their own expiration time.

I use Swagger to automatically document the APIs of the platform.

Run application

You will need this dependencies to run the project:


Build the cointainers:

sudo docker-compose build

Run the app:

sudo docker-compose up

Util commands



Create admin user:

Allows you to create an Admin user. You can access to /admin and you will have higher permissions.

docker ps
docker exec -it 32c743258eaa sh
python manage.py createsuperuser --email=nico@example.com
exit
Tip: Follow the instructions.

Testing:

I implemented coverage for testing, you can run the tests with the following commands. 87% covered.

docker ps
docker exec -it 32c743258eaa sh
coverage run --source='.' manage.py test
coverage report
Tip: You must be inside the docker shell to run this.

Endpoints information:

You can have a better information about the endpoints with:

http://127.0.0.1:8000/swagger/

http://127.0.0.1:8000/redoc/


I also have added the Postman collection file in the repository.

About

JWT Tokens + Django Rest Framework + Docker + PostgreSQL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors