TeamWork is an app for collaboration of employees within a company.
Set up the node/express server and RESTful API, then persist the data with PostgreSQL.
- NodeJS/Express Server-side programming
- ESLint Linting Library, Airbnb style guide
- Mocha Unit Testing Framework
- PostgreSQL Database
- TravisCI Continuous Integration
- Coveralls Coverage Status
- GitHub Projects Project Management Board
- GitHub Track changes over time in the project
- Admin can create an employee user account.
- Admin/Employees can sign in.
- Employees can post gifs.
- Employees can write and post articles.
- Employees can edit their articles.
- Employees can delete their articles.
- Employees can delete their gifs post.
- Employees can comment on other colleagues' article post.
- Employees can comment on other colleagues' gif post.
- Employees can view all articles and gifs, showing the most recently posted articles or gifs first.
- Employees can view a specific article.
- Employees can view a specific gif post.
- Node js
- Express
- Git
- Clone this repository into your local machine:
git clone https://github.com/CodenNerd/TeamWork.git
- Install dependencies:
e.g npm install.
- To start the application:
e.g npm start
- Use postman to test all endpoints on port 3000.
- Test
Run Mocha test with:
npm run test
https://teamwork4andela.herokuapp.com/api/v1
Login response example header:
headers {
'x-access-token', `${token}`
}
-
Admin Login: POST /auth/signin
request example
body { email: '[email protected]', password: 'atanda' }
success response
{ "status": "success", "data": { "message": "User logged in successfully", "userId": UUID, "token": "String" }
}
- Create user: POST /auth/create-user
request example
body {
"email": "[email protected]",
"password": "abuabu",
"firstName": "Abuu",
"lastName": "Abu",
"gender": "Male",
"jobRole": "Manager",
"department": "Finance",
"address": "30, Odubosu close, Ikeja"
}
req header
headers {
'x-access-token', `${token}`
}
}
success response
{
"message": "Succesfully Created in User",
"status": "success",
"data": {
"message": "Employee account created successfully",
"userId": UUID,
"token": STRING
}
}
- Create Article: POST /articles
req example
success
body { title: 'An example title', article: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Possimus unde itaque mollitia, soluta sit voluptate omnis beatae placeat veniam assumenda amet voluptas, nihil eos obcaecati in iusto! Fugit, deleniti ut.', tag: 'health' } headers { 'x-access-token', `Bearer ${token}` }
{ "status": "success", "data": { "message": "Article successfully posted", "articleId": UUID, "datetime": STRING, "title": STRING, "userId": UUID }
}
-
View Article by Id: GET /articles/:id
-
Edit Article: PATCH /articles/:id
-
Delete Article: DELETE /articles/:id
-
Comment POST /gifs/:id/comments
-
Search Articles by Tags: POST /search
- Create Gifs: POST /gifs
- View Gif - GET /gifs/:id
- Delete Gif DELETE /gifs/:id
- Comment POST /gifs/:id/comments
- View all articles and gif: GET /feed
- AbdulAzeez Atanda
- This project is licensed under the MIT Public License - see the LICENSE file for details
Heartfelt thanks to :
- Andela
- Facebook Developers Circle
- The organisers of the 3-month old program