Git Product home page Git Product logo

social_network's Introduction

Social Network

It's a web based application that:

  • generates n number of users and fills posts and likes for them
  • provides the REST API with the possibility of authorization (login/register), new post creation, posts liking functionality

Alt text

Stack

This application is built using Django and Django REST framework and JWT.

Requirements

Social Network uses python language version 3 and above. You can install it using this article. Also you should have installed pip and virtualenv in order to deploy application locally.

Installation

Please follow these steps if you want to run the local copy of the app:

I. Download archive with project and unzip it II. Move into unzipped folder using console like this:

$ cd social_network

III. Create virtual environment to isolate application specific dependencies. Please keep in mind that this instruction will not work for windows user. If you are using windows try to find another way to install virtual environment with python 3 and above.

$ virtualenv venv -p /usr/bin/python3

IV. Enable virtual environment

$ source venv/bin/activate

V. Install application dependencies in the isolated environment

$ pip install -r requirements.txt

VI. Create necessarry tables in the database:

$ python manage.py migrate

VII. Populate database with automatically generated users, posts and likes:

$ python manage.py populate

VIII. Register on Hunter and obtain its API key We'll use this service to verify potential user email address.
When you'll register your self there, you have to get API key and place it as the value for variable HUNTER_API in the env file. You can find it using this path:

core/.env  

IX. Run application's local server:

$ python manage.py runserver

Usage

If you are done with installation process, you can visit http://localhost:8000/ url and see Social Network working. On the front page you should see table with posts data.

API for Social Network is divided by access level.

Public endpoints:

/api/auth/register/
/api/auth/token/ (Login purpose)
/api/posts/(GET)

Authorized endpoints:

To authorize yourself you have to use access token from /api/auth/token/ endpoint
/api/users/
/api/posts/(POST)
/api/impact/post/(POST, endpoint to like/unlike posts)

social_network's People

Watchers

Oleksandr Yemets 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.