Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/oliveira-andre/open_todoist

Open source project inspired on todoist.com build to benefit myself
https://github.com/oliveira-andre/open_todoist

Last synced: about 1 month ago
JSON representation

Open source project inspired on todoist.com build to benefit myself

Lists

README

        

# Open Todoist

![logo](./public/open_todoist_logo.png)

This project is a clone of todoist to benefit who wants to get a open source project and get the same result of this
amazing tecnology

## running project

config dotenv variables:
```
db_user=root
db_pass=root
db_host=postgres
```

starting server rails and webpack
```
sudo docker-compose up --build
```

create and migrate database:
```
sudo docker-compose run --rm web_app rails db:create db:migrate
```

## How run tests

rspec
```
sudo docker-compose run --rm web_app rspec
```

rubocop
```
sudo docker-compose run --rm web_app rubocop -A
```

brakeman
```
sudo docker-compose run --rm web_app brakeman
```

## API

### Authenticity token

Get

- curl:
```shell
curl -X "GET" 'http://localhost:3000' --cookie-jar cookie | grep csrf
```

- return:
```HTML

```

### Session

Create

- curl:
```shell
curl -kv -H 'Content-Type: application/json' -d '{"users": { "email": "[email protected]", "password": "123456"}, "authenticity_token": "eZHlcA3MW7i4Kfl6lo4i7wvE6V54x3SZcdIvWYXT5idHpnjTFgA+rjIzFbp78L3jnXLmAnVcSEA2rBHpw7JbOA==" }' --cookie cookie -X 'POST' "http://localhost:3000/api/v1/sessions" | jq
```

- status_code: 201 Created

- return:
```json
{
"authentication_token": "2yPsyWBjLPci4xoyzaG4"
}
```

### Projects

Get

- curl:
```shell
curl -kv -H 'Content-Type: application/json' -H 'token: 2yPsyWBjLPci4xoyzaG4' --cookie cookie -X 'GET' "http://localhost:3000/api/v1/projects" | jq
```

- status_code: 200 Ok

- return:
```json
[]
```