Giter VIP home page Giter VIP logo

ah-backend-stark's Introduction

Authors Haven - A Social platform for the creative at heart.

Build Status Coverage Status Maintainability

Vision

Create a community of like minded authors to foster inspiration and innovation by leveraging the modern web.

Getting started

Prerequisites

Technologies used

Setting up the application

Clone the project repo to your prefered location

$ git clone https://github.com/andela/ah-backend-stark.git

Install a virtual environment via pip or prefered package manager

$ pip install virtualenv

Create a virtual environment. "env" can be any name

$ virtualenv env

Activate environment

  • On Windows $ env\scripts\activate

  • On Mac OS $ source env/bin/activate

Install dependencies

$ pip install -r requirements.txt

Database Setup

Rename the .env.example file to .env and change the dummy fields to your respective database connection credencials

Make migrations

$ python manage.py makemigrations

$ python manage.py migrate

Running Tests

$ python manage.py tests

Tests with coverage

$ coverage run --source=authors/ manage.py test

$ coverage report -m

Test the application

Run server

$ python manage.py runserver

Endpoints that can be tested on Postman

Documentation on how to test the endpoints

Method Endpoint Functionality
POST /api/users/ Register user
POST /api/users/activate_account/:token/ Verify user account
POST /api/users/login/ Login a user
GET /api/user Get current user
GET /api/profiles/:username/ Get user profile
PUT /api/profiles/:username/ Update profile
POST /api/profiles/:username/follow/ Follow user
DELETE /api/profiles/:username/unfollow/ Unfollow user
POST /api/articles/ Create article
GET /api/articles/ List articles
GET /api/articles/:slug/ Get article
PUT /api/articles/:slug/ Update article
DELETE /api/articles/:slug/ Delete article
POST /api/articles/:slug/comments/ Add comments to an article
GET /api/articles/:slug/comments/ Get comments from an article
DELETE /api/articles/:slug/comments/:id/ Delete comment
POST /api/articles/:slug/favorite/ Favourite articles
DELETE /api/articles/:slug/favorite/ Unfavourite articles
GET /api/articles/favourites/ List favourated articles
POST /api/articles/:slug/like/ Like articles
PUT /api/articles/:slug/like/ Unlike articles
PUT /api/articles/:slug/rate_article/ Rate aricle

Deployment site

Heroku

ah-backend-stark's People

Contributors

balaakagordon avatar joylubega avatar edward-k1 avatar kenneth051 avatar j0flintking02 avatar eltronix avatar api-imperfect avatar malep2007 avatar

Watchers

James Cloos 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.