https://github.com/imperadorxs/todo-api
A robust api, for creating lists and tasks, plus all the functionality of login, password recovery and password reset, and account creation, created with nodejs in typescript using express
https://github.com/imperadorxs/todo-api
express mongodb node nodejs postgresql typescript
Last synced: 17 days ago
JSON representation
A robust api, for creating lists and tasks, plus all the functionality of login, password recovery and password reset, and account creation, created with nodejs in typescript using express
- Host: GitHub
- URL: https://github.com/imperadorxs/todo-api
- Owner: imperadorxs
- License: mit
- Created: 2021-04-10T14:42:50.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-13T13:30:28.000Z (about 5 years ago)
- Last Synced: 2025-07-10T06:05:16.723Z (12 months ago)
- Topics: express, mongodb, node, nodejs, postgresql, typescript
- Language: TypeScript
- Homepage:
- Size: 201 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

API to register tasks todo


About the project |
Technologies |
Getting started |
How to contribute |
License
## 👨🏻💻 About the project
This API allows you to create a user and log in, create lists and tasks, in addition to creating tasks for the current day or independent tasks.
Project developed using TDD, in addition to being developed based on 3 entities, User, Task, List.
## 🚀 Technologies
Technologies that I used to develop this api
- [Node.js](https://nodejs.org/en/)
- [Typescript](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html)
- [Express](https://expressjs.com/pt-br/)
- [TypeORM](https://typeorm.io/#/)
- [JWT-token](https://jwt.io/)
- [PostgreSQL](https://www.postgresql.org/)
- [Redis](https://hub.docker.com/_/redis)
- [Date-fns](https://date-fns.org/)
- [Nodemailer](https://nodemailer.com/)
- [ethereal](https://ethereal.email/)
- [handlebars](https://handlebarsjs.com/)
- [multer](https://github.com/expressjs/multer)
- [celebrate](https://github.com/arb/celebrate)
- [class-transformer](https://github.com/typestack/class-transformer)
- [rate-limiter-flexible](https://github.com/animir/node-rate-limiter-flexible/wiki/Overall-example)
- [Jest](https://jestjs.io/)
- [Babel](https://babeljs.io/setup)
- [Eslint](https://eslint.org/)
- [Prettier](https://prettier.io/)
- [EditorConfig](https://editorconfig.org/)
## 💻 Getting started
Import the `Insomnia.json` on Insomnia App
### Requirements
- [Docker](https://www.docker.com/)
- [Node](https://nodejs.org/en/download/)
- [Yarn](https://classic.yarnpkg.com/en/docs/install#windows-stable)
**Clone the project and access the folder**
```bash
$ git clone https://github.com/imperadorxs/todo-api && cd todo-api
```
**Follow the steps below**
```bash
# Create a docker container postgres
# Change POSTGRES_PASSWORD
# if your have other container using postres change the first external port to 5436 or greather
$ docker run --name todo-api -e POSTGRES_PASSWORD=your-password -p 5432:5432 -d postgres
# Create a docker container redis
# if your have other container using redis change the first external port to 6380 or greather
$ docker run -d --name redis -e REDIS_PASSWORD= -p 6379:6379 redis:alpine
# Install the dependencies
$ yarn
# Make a copy of '.env.example' to '.env'
# and set with your environment variables
# remenber generate an md5 code at http://www.md5.cz/ and change the variable APP_SECRET
$ cp .env.example .env
# Make a copy of 'ormconfig.example.json' to 'ormconfig.json'
# and set with your database variables
$ cp ormconfig.example.json ormconfig.json
# Run the migrations and seeds
$ yarn typeorm migration:run
# Run this command to start the server in development mode
$ yarn dev:server
# to generate your build
# when you generate build remenber for change src to dist and ts to js in ormconfig.json
$ yarn build
# start aplication *NEED BUILD *
$ yarn start
# Well done, project is started!
```
## 👨🏻💻 Endpoints
# User
- /users: [ POST ] Sign up to create a new user.
- /users/avatar: [ PUT ] To change a profile image.
- /password/forgot: [ POST ] To generate a new token to reset password.
- /password/reset: [ POST ] To use a token for reset password.
- /profile: [ GET ] To get user profile data.
- /profile: [ PUT ] To update use profile data.
- /sessions: [ POST ] Sign in to get the access token.
# Lists
- /lists: [ GET ] Get all user lists.
- /lists: [ POST ] Create a new list.
- /lists: [ DEL ] Delete one user list.
- /lists: [ PUT ] Update one user list.
# Tasks
- /tasks: [ GET ] Get all user tasks.
- /tasks/scheduled: [ GET ] Get all user scheduled tasks.
- /tasks/type: [ GET ] Get all user tasks by type.
- /tasks/today: [ GET ] Get all user today tasks.
- /tasks: [ POST ] Create a new task.
- /tasks: [ DEL ] Delete one task.
- /tasks: [ PUT ] Update one task.
## 🤔 How to contribute
- **Make a fork of this repository**
```bash
# Fork using GitHub official command line
# If you don't have the GitHub CLI, use the web site to do that.
$ gh repo fork imperadorxs/todo-api
```
```bash
# Clone your fork
$ git clone your-fork-url && cd todo-api
# Create a branch with your feature
$ git checkout -b my-feature
# Make the commit with your changes
$ git commit -m 'feat: My new feature'
# Send the code to your remote branch
$ git push origin my-feature
```
After your pull request is merged, you can delete your branch
## 📝 License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
---
Made with 💜 by Allan Santiago 👋 [See my linkedin](https://www.linkedin.com/in/imperadorxs/)