Skip to content
This repository was archived by the owner on Jan 26, 2023. It is now read-only.

NdagiStanley/not-by-might

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

not-by-might

Build Status Coverage Status Code Health MIT License

A bucketlist basically means that the things you would like to do or achieve before you EXPIRE

This is a responsive web application that allows you to add items to your bucketlist categories.

The application is hosted at nbm-doit


Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisities

You'll need to have the following installed in your local machine to run this application Python, Postgres and GIT

Installing

  1. Clone this repository

    RUN git clone https://github.com/NdagiStanley/not-by-might.git

  2. CD into the directory

    RUN cd not-by-might

  3. Install dependencies of the application/ project

    RUN pip install -r requirements.txt

  4. Create a Postgresql database (it's best you use PGAdmin). Take note of the name, user, password and port.

  5. Open the project in your preferred text editor, navigate to the settings.py which is in todo/todo/ directory and edit the fields surrounded by [] according to the following snippet starting at line 120. Fill the name, user, password and port (without the []) in the snippet

  ....
  else:
          DATABASES = {
              'default': {
                  'ENGINE': 'django.db.backends.postgresql_psycopg2',
                  'NAME': '[name]',
                  'USER': '[user]',
                  'PASSWORD': '[password]',
                  'HOST': '127.0.0.1',
                  'PORT': '[port]',
              }
          }
  ....
  1. Setup the application

    RUN cd todo

    RUN python manage.py makemigrations

    RUN python manage.py migrate

    RUN python manage.py collectstatic --noinput

  2. Run the server

    RUN python manage.py runserver and get to http://localhost:8000

Tasks asserting completion

Implement Django API in this structure:

{
  "id": 1,
  "name": "BucketList1",
  "items": [
    {
      "id": 1,
      "title": "I need to do X",
      "date_created": "2015-08-12 11:57:23",
      "date_modified": "2015-08-12 11:57:23",
      "done": false
    }
  ],
  "date_created": "2015-08-12 11:57:23",
  "date_modified": "2015-08-12 11:57:23",
  "created_by": "1113456"
}

using

with Token Based Authentication within these rules:

EndPoint Public Access
POST /auth/login TRUE
POST /auth/register TRUE
POST /bucketlists/ FALSE
GET /bucketlists/ FALSE
GET /bucketlists/< id > FALSE
PUT /bucketlists/< id > FALSE
DELETE /bucketlists/< id > FALSE
POST /bucketlists/< id >/items/ FALSE
PUT /bucketlists/< id >/items/< item_id > FALSE
DELETE /bucketlists/< id >/items/< item_id > FALSE

It's documentation is here made using DRF Docs

Have a front-end consuming the API

This has been implemented using vuejs (frontend framework)

and Bootstrap (frontend framework)

Running the tests

This is how to run the automated tests for this application

RUN python manage.py test

Deployment

You might want to deploy this project. Well, the application is ready fro deployment to heroku. After installing heroku toolbelt; do the following (Ensure you are in the root folder):

RUN heroku local web and go to to check it how it will look after deployment

RUN heroku login and enter your credentials.

RUN heroku create [appname] without the [ ] .

RUN heroku git push [branch_name] without the [ ]. The branch_name should be master if you just cloned the repo and did not branch out.


Copyright AD-2016

Inspiration:

It's not by might that you achieve the things you do in life!

About

CP3 @andela Simulations Ninja 🏃 [@django Rest Framework, @vuejs, @twbs]

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •