A way to plan and organize tasks, to-dos, and whatever else. An expressive API that can be consumed by any frontend visualization.
- NodeJS
- Express
- MongoDB
- Jest
- Twilio
- Swagger (in-progress)
- Docker (in-progress)
To get a local copy up and running follow these steps:
- Create a Twilio account and outgoing number at https://twilio.com
- Clone the repo
git clone https://github.com/kyler-swanson/planii.git
- Install NPM packages
npm install
- Create a
.env
cp .env.example .env
- Enter your Twilio keys in
.env
TWILIO_SID = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' TWILIO_TOKEN = 'your_auth_token' TWILIO_NUM = '+12345678901'
- Start the project
npm run dev
Here, a "Thing" is a task or something to be completed.
- List Things
- [GET]
/api/thing
- Query Params:
- sort, string (
dueDate
,state
, etc.) - order, string (
asc
ordesc
) - group, string (
group
,state
,dueDate
, etc.)
- sort, string (
- Example:
/api/thing?sort=dueDate&order=asc
- [GET]
- Get Thing
- [GET]
/api/thing/{thing_id}
- Example:
/api/thing/621e47f6f8ee1fc524b3295a
- [GET]
- Create Thing
- [POST]
/api/thing
- Body (
application/json
):-
{ "title": "Get groceries", "desc": "eggs, milk, cheese", "dueDate": "2022-03-02T12:00:00.000Z", "remindDate": "2022-03-01T11:25:00.000Z", "remindNumber": "+11234567890", "state": "To-do", "group": "Household" }
-
- [POST]
- Update Thing
- [PATCH]
/api/thing/{thing_id}
- Body (
application/json
):-
{ "state": "In progress" }
-
- [PATCH]
- Delete Thing
- [DELETE]
/api/thing/{thing_id}
- [DELETE]
In each controller (ex. app/controllers/Thing
), there exists a [controller].spec.js file. This project uses Jest and Supertest to perform a basic suite of integration tests.
You may also run these tests yourself!
Simply run,
npm run test
You will also notice a coverage
directory that is generated post-test. This folder contains a test report and coverage analysis. You can open a generated web report at coverage/lcov-report/index.html
.