Giter Site home page Giter Site logo

vataxia's Introduction

Overview

Vataxia is an open source social network built with Django and Django REST framework. This project is the backend REST API only. The frontend is written in React and can be found here:

Vataxia Frontend

Project Setup

Install required packages:

pip3 install -r requirements/local.txt

Initialize database:

python3 manage.py makemigrations
python3 manage.py migrate

Fixtures

To load in sample data for all tables at once:

bash scripts/load_sample_data.sh

For Windows users:

python manage.py loaddata v1\accounts\fixtures\user.json

This will create an initial superuser account with the following credentials:

Authentication

To login, send a POST request to /login with the data:

  • email
  • password

On success, user information and API token will be returned:

{
  "id": 1,
  "email": "[email protected]",
  "first_name": "Bucky",
  "last_name": "Roberts",
  "profile": {
    "id": 2,
    "image": "/media/bucky_256.png",
    "user": 1
  },
  "role": "administrator",
  "token": "cb810da7d03b85335ea18babf3536fbf2a31ccdf"
}

All subsequent API requests must include this token in the HTTP header for user identification. Header key will be Authorization with value of 'Token' followed by a single space and then token string:

Authorization: Token 753da61b4c39bd195782710c82fe3c3b1e7f7428

API Documentation

To view API documentation, run development server and visit http://127.0.0.1:8000/docs/

Links

vataxia's People

Contributors

buckyroberts avatar

Watchers

James Cloos avatar Chea Sovannoty 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.