This back-end project was developed during Next Level Week by Rocketseat. I named it Kudos :) It is a service where teammates can acknowledge each other for their contribution and achievements.
The Kudos database is composed of users, tags and compliments. Tags are keywords that are added to the compliments. A compliment consists in a message and a tag sent from a user to another.
- Users
- A new user must have a name, an email, a password and whether they are an admin
- No duplicate emails are allowed
- Tags
- No duplicate tags are allowed
- Names are required
- Only admin users can add new tags
- Compliments
- A user can't add a compliment to themselves
- Sender and receiver must be valid users
- User must be authenticated to add a compliment
- Lists
- List all tags
- List all compliments sent/received by user
- List all users
- Typescript
- SQLite
Dependencies
- bcryptjs
- class-transformer
- express
- express-async-errors
- jsonwebtoken
- reflect-metadata
- sqlite3
- typeorm
- typescript
- uuid
Other tools
This project was bootstrapped with Create React App.
In the project directory, you can run:
npm install
or
yarn install
To run the server in development mode, use:
yarn dev
Open http://localhost:3000 to view it in the browser.
This was my first application using Node.js and Typescript and I learned so much from this project!
- Setting up a database
- Using an API client (Insomnia) to test my requests
- Creating database migrations
- Authentication tokens using JWT
- General back-end flow: server -> routes -> controllers -> services -> repositories -> database
The next step is adding an interface to the project using cross-origin resource sharing. Note to myself:
-
yarn add cors
-
yarn add @types/cors
-
server.ts
-> addimport cors from "cors"
; -
allow all requests:
app.use(cors());
-
allow especific requests:
app.use(cors({ origin: "" }))
Another nice addition would be adding an email notification for new compliments.
- Portfolio - Bárbara Aliverti
- LinkedIn - @barbaraaliverti