Git Product home page Git Product logo

mydiary's Introduction

MyDiary

Build Status Coverage Status Maintainability

MyDiary is an online journal that provides users with the ability to pen down their thoughts and feelings

Features

MyDiary offers the following features

  • Create an account for a user
  • Login a user
  • View all entries in a user's diary
  • View contents of a diary entry
  • Add an entry
  • Modify an entry
  • Delete an entry

Visit the site:

https://muhanguzidavid.github.io/MyDiary/UI/index.html

Documantation Link

https://mydiary12.docs.apiary.io/#

Deployment

The application has been deployed on heroku: https://my-diary-3.herokuapp.com/api/v1/auth/signup

Getting Started

Prerequisites

Python 3
python-pip
Virtualenv

Installation

  • Clone the project at MyDiary.
  • cd into the project diractory

Setup Virtual environment

For windows:

virtualenv env
cd/env/scripts/activate

Install all dependencies

 pip install -r requirements.txt

Setting up the database

  • Install postgresql 10
  • In the terminal, enter the following command to shift to the postgres shell
psql -U <username> postgres
  • In postgress shell, create mydiary database
CREATE DATABASE mydiary;

Running the app

Supported endpoints

HTTP Method Endpoint Description
POST /api/v1/auth/signup Registers a user
POST /api/v1/auth/login Login a user
GET /api/v1/entries Retrieves all diary entries
GET /api/v1/entry/int:entry_id Retrieves a specific diary entry
POST /api/v1/add Adds an entry to the diary
PUT /api/v1/update Updates an entry in the diary
DELETE /api/v1/remove/int:entry_id Deletes an entry from the diary

Tests

To run tests, run the command (pytest -v)

  • cd into the tests folder
  • run the command
pytest -v test_diary.py

Tests with coverage

Run the command

pytest --cov=api

mydiary's People

Contributors

muhanguzidavid avatar dependabot[bot] avatar

Stargazers

Roman 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.