Skip to content

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

Notifications You must be signed in to change notification settings

GabrSobral/CarpeDIem-API

Repository files navigation

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published