Skip to content

Broadcaster enables any/every citizen to bring any form of corruption to the notice of appropriate authorities and the general public. Users can also report on any other things that need government intervention

Notifications You must be signed in to change notification settings

gitegob/BroadCaster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BroadCaster

Build Status Coverage Status Maintainability

Broadcaster enables any/every citizen to bring any form of corruption to the notice of appropriate authorities and the general public. Users can also report on things that need government intervention.

Screenshot (1)

API Endpoints included

  • POST /auth/signup: Create an account
  • POST /auth/signin: Log into your account
  • POST /records/: Create a new record
  • GET /records/:recordID: Fetch a single record
  • GET /records: Fetch all records
  • GET /records/red-flags: Fetch all red-flag records
  • GET /records/interventions: Fetch all intervention records
  • PATCH /records/:recordID: Update a record
  • DELETE /records/:recordID: Delete a record

Installation and Environment Setup

Clone the repository from Github.

( You will need Git for this if you are running a Windows PC, Get it HERE )

git clone https://github.com/gitego-brian/BroadCaster.git

To Install all dependencies:

npm install

To run the tests:

npm run test

Now to start the app:

npm run start

To start the app in development mode:

( You need nodemon installed for this, run npm i -g nodemon to install it )

npm run dev

Test the endpoints in your favorite API client, I strongly recommend Postman though 👌

Sample Request

Request body for sign up

{
    "firstName": "John",
    "lastName": "Smith",
    "email": "jsmith@gmail.com",
    "password": "complicatedPswd@111",
    "userName": "jsmith",
    "phone": "+112233445566"
}

Response body for signup

{
    "status": 201,
    "message": "User created successfully",
    "data": {
        "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MiwiZmlyc3ROYW1lIjoiQmVuIiwibGFzdE5hbWUiOiJHaXNhIiwiZW1haWwiOiJnaXRlZ29iN0B5YWhvby5jb20iLCJpc0FkbWluIjpmYWxzZSwiaWF0IjoxNTc0MTczOTk1fQ.aEsCstbsBKGiGCGhF5GrShADpbxnTpq6wSBKXLlhIU"
    }
}

Tools used

  • Server-Side Framework: Node/Express
  • Linter: ESLint
  • Style Guide: Airbnb
  • Testing framework: Mocha/Chai

More Tools

Deployments

Contribute

If you ever have an idea on how you might help improve the app, yo are welcome to contribute your changes to the repository, Just follow the steps below:

Assumming you have the repo cloned on your PC,

  • Pull the latest changes to the remote repo by running:
git pull origin develop

NB: You need to be on the develop branch when you do this

  • Create & switch the new branch where you will add your changes by running:
git checkout -b yournewbranchname
  • After adding your changes, commit and push them then create a pull request for against the develop branch. I will review and merge them if they are helpful.

Author:

Brian GITEGO

About

Broadcaster enables any/every citizen to bring any form of corruption to the notice of appropriate authorities and the general public. Users can also report on any other things that need government intervention

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published