Install:
- Docker
- Docker Compose
- Node.js v14.5.0
docker-compose up -d mongo
cd /path/to/your/forked/repo
npm install
npm run dev
You've just started at a new company, and your manager is greeting you in your cubicle, they look nervous.
After a brief "welcome to the team" the manager asks if you're ready to get started?
It turns out, another engineer just left suddenly without notice and has left an unfinished and buggy project that was supposed to launch this morning, yikes, what did you get yourself into?
Luckily, the previous developer left a Postman collection you should be able to use for viewing/interacting with all the API's current endpoints, Hapi Server.postman_collection.json
will serve as your guide for now.
After assessing the situation you've identified the following prioritized list of tasks (in order of importance):
- The previous developer did not build a user interface for the application, you'll need a user interface to interact with it, we recommend create-react-app as a starting point:
- Login page
- List users
- View a single user
- Delete a user
- Update a user
- A couple of fields were left missing on the user records, we'll want to add:
- Birth year
- Favorite color
- These should be displayed when viewing a single user
- Add a password reset page and API endpoints:
- Don't worry about e-mail notifications or one time password reset keys, just a page that allows a user to update their password
- Require the following fields:
- User ID
- Current password
- New password
- Repeat new password
The user interface should be created using one of the following frameworks:
- React
- Vue
- Angular
- Include an automated testing suite that uses a common testing library such as Jasmine, Jest, or Mocha.
- Keep it simple:
- Test your logic, mock any third party services or dependencies
- Give yourself some guard rails
- Any UI tests can simply validate your components are rendering when properly initialized
- Keep it simple:
- Enforce authentication for all API endpoints except:
/authenticate
and/user/create
- Search the code for commented out:
auth: 'jwt'
as a starting point - Postman will also have some information on sending the
Authorization
header as a reference
- Search the code for commented out:
- Use a modern UI/UX library such as Ant, Bootstrap, Angular Material, Vuetify, or Material-UI to implement the styling/components for your UI.
- Use Docker to containerize your application and run using the included docker-compose
- Include a CI/CD infrastructure using a common tool such as TeamCity, Travis CI, or Jenkins
- Deployed and host the app on one of the major cloud platforms
- AWS
- Azure
- Google Cloud Platform
Please submit your code as a pull request to this repository, include @m4l1c3 and @badgerops as reviewers. Once submitted, you can use the calendly link in the invitation email to schedule some time to walk through the code and talk about your approach.
This exercise was built on top of the work of the wonderful @joshjconlin to put together a reference app.
This has been brought under the entity PlexTrac-Labs using the same license and includes enhancements specific to the organization.
Original repository: https://github.com/joshjconlin/hapi-19-typescript-server