GabrSobral / CarpeDIem-API

This API are in development, and it is an API that user can answer a questionnaire and we are going to list activities that can help the user life style, based in his answers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Carpe Diem API Typescript

(This project is in development yet πŸ”§).

I'm building this API to my course, because I have one last work to present, and show the skills that I learned in the course.

Features

πŸ”΅ Login and register with JsonWebToken authentication;

πŸ”΅ Questionnaire with questions to collect the user preferences about categories;

πŸ”΅ The app will automatically list diary activities to user to improve his life style and prevent mental ilnesess;

πŸ”΅ User can make feedback about activities, and it will change the algorithm about automatically listing;

πŸ”΅ The ADMIN can make upload of files, like musics, videos and audios, to use in activities;

πŸ”΅ Admin can make the basic CRUD, to activities, files, questions and categories;

Technologies πŸ› 

  • NodeJS Nodejs
  • PostgreSQL Postgres
  • Typescript TypeScript
  • Express Express.js
  • JsonWebToken
  • TypeORM
  • Bcrypt
  • Multer
  • Cloudinary

Patterns πŸ“ƒ

  • Singleton pattern
  • Service pattern
  • Repository pattern
  • Some SOLID concepts

Prerequisites βš™οΈ

  • Node v14.17.1 (version used to build the API)
  • Package Manager (npm or yarn)
  • PostgreSQL

Installation πŸ’»

Step 1

Clone this repository with this command:

git clone https://github.com/Sobraloser/TCC_API_Typescript.git

Step 2

And then, open the repository local folder, and install all dependencies with the following commands:

yarn

or if you use npm:

npm install

Step 3

after this, let's run the migrations:

yarn typeorm migration:run

or

npm run typeorm migration:run

Step 4

Create an account in Cloudinary, take your API secrets and put in .env file. (dont forget to put some secret in TOKEN_SECRET field, he's responsible to turn your JsonWebToken unique)

TOKEN_SECRET= JsonWebToken secret here
CLOUDINARY_CLOUD_NAME= 
CLOUDINARY_API_KEY= 
CLOUDINARY_API_SECRET= 
CLOUDINARY_URL= (Do not forget to fill in this field, it is extremely necessary to work)

Step 5

Now, let's start the server with dev script:

yarn dev

About

This API are in development, and it is an API that user can answer a questionnaire and we are going to list activities that can help the user life style, based in his answers.

License:MIT License


Languages

Language:TypeScript 97.8%Language:HTML 2.2%