/Watchdogs

POPOLO is the only populated neighborhood. Use it for testing purposes

Primary LanguageCSSMIT LicenseMIT

Watchdogs

A web application that allows you to be in the loop about everything happening in your neighborhood. From contact information of different handymen to meeting announcements or even alerts.

Getting Started

To get a copy of the project up and running on your local machine for development and testing purposes,

  1. clone this repository
    git clone https://github.com/KarenNgala/Watchdogs
    
  2. Set up a Python development environment that includes; Python, pip & a virtual environment
    $ python3.6 -m venv --without-pip virtual
    
    $ source virtual/bin/activate
    
    (virtual) $ curl https://bootstrap.pypa.io/get-pip.py | python

Prerequisites

  1. Install project dependencies
     (virtual) $ pip install -r requirements.txt
  • See deployment for notes on how to deploy the project on a live system.

Installing

  1. To get a development env running, use the .env.example file to create your own .env file.
  2. Create a postgres db and add the credentials to .env file
(virtual)$ psql
pc-name=#  CREATE DATABASE <name>;
  1. Apply initial migrations
(virtual) $ python manage.py migrate 
  1. Make migrations to your database
(virtual) $ python manage.py makemigrations application
(virtual) $ python manage.py migrate
  1. Create admin account
(virtual) $ python manage.py createsuperuser
  1. Start development server
 (virtual) $ python3 manage.py runserver

Running the tests

Run automated tests for this system

(virtual) $ python3 manage.py test application

Deployment

With all environment variables changed to suit your local copy of this repository, deploy the application to Heroku to see it live

User stories:

  • System admin should appoint a neighborhood admin who should be able to add information about neighborhoods for example: Add businesses, health care centers, police stations, etc. which a regular user cannot do.
  • Add search functionality for businesses in a neighborhood
  • Models: Profile, Neighborhood, User, Business
  • Allow user to change their neighborhood on moving out
  • A user can only belong to one neighborhood at a time
  • Update templates
  • Copy contact for emergency services like hospitals, fire departments and police stations
  • Allow users to create a new post

Endpoints

Endpoint Functionality Notes
POST /auth/signup Register a user A Token should be provided
POST /auth/login Login a user A JWT Token should be provided
POST /api/v1/join Join a hood
POST /api/v1/profile Create posts on a hood
PUT /api/v1/profile Edit a profile
POST /api/v1/create_hood An Admin can create a hood Super Admin ( Implement CRUD functionality also )
POST /api/v1/manage_hood An Admin can appoint a user as a hood manager Appointed Admin
GET /api/v1/hoods View hoods
GET /api/v1/view_hood View hoods information

Built With

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details