https://github.com/ngirimana/todo
todo
https://github.com/ngirimana/todo
Last synced: 8 months ago
JSON representation
todo
- Host: GitHub
- URL: https://github.com/ngirimana/todo
- Owner: ngirimana
- Created: 2021-02-21T17:02:17.000Z (over 4 years ago)
- Default Branch: develop
- Last Pushed: 2021-02-26T07:40:17.000Z (over 4 years ago)
- Last Synced: 2025-01-01T16:43:16.379Z (9 months ago)
- Language: JavaScript
- Size: 44.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Todo
Create a To-Do API. The To-Do API should allow the following operations on a todo item:
Authenitaction(Signup and Signin) Create, Update, Read, Delete[](https://travis-ci.com/ngirimana/todo)
[](https://coveralls.io/github/ngirimana/todo?branch=ch-sagger-documentation)
[](https://codeclimate.com/github/ngirimana/todo/maintainability)## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
### Prerequisites
- [Node JS](https://nodejs.org/)
- [Postgresql](https://www.postgresql.org/download/)
- [Postman](https://www.getpostman.com/downloads/)
- For windows O.S user,we recommend to download and install [Git bash](https://git-scm.com/downloads) for interacting with GitHub
- Text editor: you can choose whatever you are familiar with but I prefer [VS Code](https://code.visualstudio.com/download)### Features
| HTTP Method | Endpoint | Description |
| :---------- | :------------------------- | :---------------------------------------------- |
| GET | / | Default route |
| POST | /api/v1/auth/signup | User can create an account |
| POST | /api/v1/auth/signin | User can sign in |
| POST | /api/v1/create-todo | User can create a todo |
| PATCH | /api/v1/todo/:todoId | User can edit a todo |
| GET | /api/v1/todos | User can get all todos |
| GET | /api/v1/todo/:todoId | User can get one todo |
| DELETE | /api/v1/todo/:todoId | User can delete one todo |### Installation
1. First download and install [Node JS](https://nodejs.org/en/download/)
2. Download and install [Postman](https://www.getpostman.com/downloads/)
3. Download and install [Postgresql](https://www.postgresql.org/)4. Clone repository [Todo](https://github.com/ngirimana/todo) by running
`git clone https://github.com/ngirimana/todo`
5. Run `npm install` (`sudo apt install` for linux users) command for installing all project dependencies### Set up environment variable
- SALT_ROUNDS : for password hashing round salt
- SECRET: secrete word use when system is generating token
- DATABASE_URL: `database connection string. example: postgresql://postgres:12345@localhost/todo`
- DATABASE_URL_TEST: `database connection string. example: postgresql://postgres:12345@localhost/todo_test`### Running
- Run `npm run migrate ` to create migration
- Run `npm run dev-start` to start server* Running API test
- Run `npm test` in terminal
### Deployment
- [Heroku](https://todo-challenge-awosomity.herokuapp.com/)
- [API Documentation](https://todo-challenge-awosomity.herokuapp.com/api-docs/)### Tools used
- Server side Framework: [Node JS](https://nodejs.org/)/[Express](https://expressjs.com/)
- Linting Library: [ESLint](https://eslint.org)
- Style Guide: [Airbnb](https://github.com/airbnb/javascript) and [Prettier](https://prettier.io/)
- Testing Framework: [Mocha](https://mochajs.org/)
- TDD assertion library: [Chai](https://www.chaijs.com)
- Documentation Tools: [Swagger](https://swagger.io/tools/swagger-ui/)
- Database : [Postgresql](https://www.postgresql.org/)
- ORM : [Squelize](https://sequelize.org/)### Author
[NGIRIMANA Schadrack](https://github.com/ngirimana/)