Welcome to the EF World Journeys interview! We're excited for the opportunity to learn from you and to share with you a bit about how we conduct code reviews on our team. If you have any questions at all please don't hestitate to reach out and ask!
This project is a simplified real world application for users wanting to book hotel rooms and specify their rooming preferences at the time of checkout. In this repo, you can find both the UI and API under the /apps folder.
This project is a set up as a turborepo that contains all the pieces that make up the wojo interview rooming problem.
This service uses:
- Apollo GraphQL
- NodeJS
- TypeScript
- MongoDB
- Prettier
- Jest
- Docker
- Next.js
- Expo
- Turbo
This repo uses Turborepo and has a few aliased commands in the root package.json
- Run
npm iin the root of the project - Run
npm run generatefor code/type generation - Run
docker-compose upto create a running local mongo instance - Run
sudo bash add-mongo-host.shto connect the mongo replica - Run
npm run seed:dbto seed the database with some initial sample data - Run
npm run devto start developing the web, app and GraphQL Service in parallel or run one of the below dev commands individually:- Web:
npm run dev:web - iOS:
npm run dev:ios - API:
npm run dev:api
- Web:
See the package.json for additional commands such as linting, formatting, testing, etc.
All infrastructure can be run locally via docker. (Download docker for desktop here: https://www.docker.com/products/docker-desktop/)
Once you have docker running locally, at the root of the repo run docker-compose up This will:
- Create running local mongo instance of a single node replica set. (Needed for DB transactions.)
To connect to the mongo replica we need to add the host entry for the single node to the /etc/hosts file.
You can edit the file directly or you can run this convience script in the root of the repo:
sudo bash add-mongo-host.sh (updating this file may prompt for your user password)
Once successful you can connect to the replica set with this connection string:
mongodb://localhost:27017/?replicaSet=rs0
Once you've succesfully connected to mongo locally, run npm run seed:db to intialize the db with some seed data.
To reset the data, run npm run reset:db.