Coder Social home page Coder Social logo

lunaticsatoshi / django-auth-api Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 206 KB

A base template for a simple Django based backend API with JWT Authentication

License: MIT License

Shell 2.43% Dockerfile 0.71% Python 96.87%
django python3 jwt-authentication docker docker-compose postgresql authentication

django-auth-api's Introduction

Django Auth API

A base template for a simple Django based backend API with JWT Authentication

Features

  • Register as a User
  • Create posts anonymously
  • Comment on posts

๐Ÿ—๏ธ Built With

๐Ÿงฉ Getting Started

To get a local copy up and running follow these simple steps.

Clone the repo

  1. Clone the repository using the following command
git clone https://github.com/Lunaticsatoshi/Django-Auth-Api.git
# After cloning, move into the directory having the project files using the change directory command
cd django-auth-api

Starting the development server with docker ๐Ÿณ (Recommended)

Prerequisites

Make sure you have Docker and docker-compose installed on your machine.

Steps to start the server

  1. Add environment file .env in server directory with the variables fiven in the .env.example file.

  2. Run the following command to build the docker containers in the project directory itself.

    docker-compose -f docker/docker-compose.debug.yml build
  3. Run the following command to run the docker containers in the project directory itself.

    docker-compose -f docker/docker-compose.debug.yml up
  4. Open http://localhost:8000 to view it in the browser.

Starting the development server without docker ๐Ÿ“ก

Prerequisites

Make sure you have Python installed on your machine.

NOTE:

The project was made with python version 3.9. and requires pipenv

Install pipenv globally

pip install pipenv
  1. Create a virtual environment using pipenv where all the required python packages will be installed
# Use this on Windows
py -m pipenv shell
# Use this on Linux and Mac
python -m pipenv shell
  1. Install pipenv
# Windows
pip install pipenv
# Linux and Mac
pip install pipenv
  1. Install all the project Requirements
pipenv install 

-Apply migrations and create your superuser (follow the prompts)

# apply migrations and create your database
python manage.py migrate

# Create a user with manage.py
python manage.py createsuperuser
  1. Run the development server
# run django development server
python manage.py runserver

๐Ÿ” License

This project is licensed under the MIT License - see the LICENSE.md file for details

Suggestions and Bug Reports

Since this is an open source project all suggestions, requests and bug reports are always welcomed. If you have any don't forget to leave them in the issues section. But we recommend creating an issue or replying in a comment to let us know what you are working on first that way we don't overwrite each other.

django-auth-api's People

Contributors

lunaticsatoshi avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.