paulahemsi / transcendence

:sparkles:
MIT License
2 stars 0 forks source link

transcendence

:sparkles:

amigo-rejeita-jogo

game-funcionandoooo

blocked-blur

Setup

NodeJS Installation step-by-step:

sudo apt-get install curl

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

command -v nvm prompt should return nvm, if not close your current terminal, reopen it, and try again

nvm install --lts

Usefull commands:

nvm ls

node --version

npm --version

FrontEnd

Create React App:

npx create-react-app my-app --template typescript

Running the application

npm start

Material UI Installation

npm install @mui/material @emotion/react @emotion/styled

Roboto font Installation

npm install @fontsource/roboto

Icons Installation

npm install @mui/icons-material

Import Icon

import IconNameIcon from '@mui/icons-material/IconName';

Colors theme Installation

npm install material-ui-colors

BackEnd

Create a new Nest project

npm i -g @nestjs/cli

nest new project-name

Running the application

npm run start

npm run start:dev

Architecture

Benefits achieved by dividing the software into layers:

From The Clean Architecture

Nest.js layer architecture

image

Cors

Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources on a web page to be requested from another domain outside the domain from which the first resource was served.

CORS defines a way in which a browser and server can interact to determine whether it is safe to allow the cross-origin request. It allows for more freedom and functionality than purely same-origin requests, but is more secure than simply allowing all cross-origin requests.

From wikipedia

Enable Cors in Nest.js

To enable CORS, call the enableCors() method on the Nest application object:

const app = await NestFactory.create(AppModule);
app.enableCors();
await app.listen(3000);

ORM

@JoinColumn must be set only on one side of relation - the side that must have the foreign key in the database table

Login_flow

image

Encryption_and_Hashing

Encryption is the process of encoding information.

This process converts the original representation of the information, known as plaintext, into an alternative form known as ciphertext.

Ideally, only authorized parties can decipher a ciphertext back to plaintext and access the original information. Encryption does not itself prevent interference but denies the intelligible content to a would-be interceptor. Encryption is a two-way function; what is encrypted can be decrypted with the proper key.

Hashing is the process of converting a given key into another value. A hash function is used to generate the new value according to a mathematical algorithm. Once hashing has been done, it should be impossible to go from the output to the input.

Study_Resources

FrontEnd