Currently researching a job or a company that would hire me for one year for a work-based training. To see my other projects, look at my portfolio or my linkedin. 💻
Why: I was able to learn new technologies like mongoDB, a payment API (Stripe), typescript and hooks with react. It has required lots of research on the internet in order to comprehend the full extent of each technology. The project is a clone of the following website.
Features
- select a product
- choose a quantity
- create an account
- check your cart 🧺
- pay
The website has been secured thanks to cookies, dotenv, bcrypt and jsonwebtoken.
To run this project, you will need typescript and ts-node to be installed globally:
npm install -g typescript
npm install -g ts-node
The repository is composed of two package.json. You will need to run npm install
two times, in the root folder and in the client folder.
Create 2 .env: one in the root folder the other in the client folder.
.env in the root folder
- SERVER_ADDRESS = port (Ex: 4000)
- DB = link to your mongodb atlas cluster
- URL_DOMAIN = URL for the domain name (in this case: https://pic-wik-toys-clone.herokuapp.com/)
- URL_LOCALHOST = URL for localhost (Ex: http://localhost:3000)
- STRIPE_KEY = Private key given by stripe
- SECRETJWT = JWT secret for tokenisation
- DB_TEST = link to the mongodb cluster for testing
.env in the client folder
- REACT_APP_SERVER_ADDRESS = server address/api/ (Ex: http://localhost:4000/api/)
- REACT_APP_URL_ADDRESS = URL address/api/ (Ex: https://pic-wik-toys-clone.herokuapp.com/api/)
- PUBLIC_STRIPE_KEY = Public key given by stripe
Use npm run dev
in the root folder in order to launch the back and front concurrently.
Use npm test
to run the test with jest in the root folder