npm ci
npm run build
npm start
npm run docker:build
npm run docker:run
You will need credentials for my Docker Hub, or you will have to reconfigure the image name to publish it.
docker login
npm run docker:publish
Run:
git clone [email protected]:SilentImp/adyen.git
cd adyen
docker-compose -f docker-compose.yml up --build -d
This command will start Nginx as a reverse proxy to the next.js node server. Also, Watchtower will be started and will update an image on each push to docker hub.
I have configured my VPS, so the project was available on https://adyen.frontender.info/.
npm run lint
npm test
Core app functionality would still work in a browser with JavaScript disabled.
Because I do not know project domain, user journeys planned etc. I decided to keep it simple. I have added the folders with self-descriptive names:
- components
- contexts
- configs
- utils
From there we can move toward DDD or atomic design, for example.
Dockerization enables us to scale seamlessly.
- We can add cypress tests for e2e. But they are costly, so everything we can we should cover with jest.
- Storybook can be added.
- Performance testing/monitoring could be added.
- Typescript can be used for higher type-safety.
- We can add localyzation
- We can diverse API's by adding additional sources, Visa API for example.
- Improve a bit naming consistency