A Netflix like website made with React js
Here are the required technologies
Technologies | Part | Links |
---|---|---|
Docker | Launch | install |
Node | Both | install |
npm | Both | By node installation |
Typescript | Front | install |
React 1.16.0 | Front | From Script |
Express | Back | install |
MySql | Database | install |
In order to install the dependencies that are required for the project, please use the following command at the root of your repository :
cd frontend/frontend && ./DownloadDependencies && cd ../../backend && ./DownloadDependencies && cd ..
In order to launch the project, you'll need to start the back and front and the database. To start it all at once, you can either use docker: (Currently broken)
sudo docker-compose up
Or launch everything separetly following the next steps.
To initialize the database :
cd db/ && ./CreateDatabase && cd ..
In the middle of this project, it is possible that the programme ask you your computer password or/and the password of your root user in your mysql service.
If you haven't, you should first start the mysql service.
To launch the project, you'll need two terminals
In the first one, copy and execute the following command:
cd backend/ && npm run start
Then, execute in the second the command below:
cd frontend/frontend && npm run start
If the project is started, you can now check it by going on any browser using this url:
http://locahost:3000/
Most routes have been secured using JWT The secret have been pushed on the repository in the .env file at the root at the repository and must been changed if you plan to use this project for security reasons.
The only routes that doesn't require a valid token to accept a request are the route:
- /register
- /login
Any other router would need a valid token. Each token produced by the backend expire after 1 hour.
If the use doesn't not have a valid or non-expired token, he will be redirected to the home page if he tries to go to any route that require a token.
Route | Require a token | Redirected to |
---|---|---|
/login | NO | No Redirection |
/register | NO | No Redirection |
/ | NO | If there is a token : /browse |
/browse | YES | If there is no token : / |
/YourAccount | YES | If there is no token: / |
/[unknown] | NO | / 404 |