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.
- 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
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 👌
{
"firstName": "John",
"lastName": "Smith",
"email": "jsmith@gmail.com",
"password": "complicatedPswd@111",
"userName": "jsmith",
"phone": "+112233445566"
}
{
"status": 201,
"message": "User created successfully",
"data": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MiwiZmlyc3ROYW1lIjoiQmVuIiwibGFzdE5hbWUiOiJHaXNhIiwiZW1haWwiOiJnaXRlZ29iN0B5YWhvby5jb20iLCJpc0FkbWluIjpmYWxzZSwiaWF0IjoxNTc0MTczOTk1fQ.aEsCstbsBKGiGCGhF5GrShADpbxnTpq6wSBKXLlhIU"
}
}
- Server-Side Framework: Node/Express
- Linter: ESLint
- Style Guide: Airbnb
- Testing framework: Mocha/Chai
- Continuous integration: Travis-Ci
- ES6 Transpiler: Babel
- Test coverage: nyc
- Maintainability: Code climate
- Deployment: Heroku and Github pages
-
The UI template is hosted on Github pages at https://gitego-brian.github.io/BroadCaster/UI
-
The API is hosted on Heroku at http://brian-broadcaster.herokuapp.com/
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.
Brian GITEGO