Please review the Assignment document for the detailed business requirements of this assignment.
-
Environment Setup
- Copy the example environment file to create your own configuration:
cp .env.example .env
- Edit
.envand update the values as needed for your local setup.
- Copy the example environment file to create your own configuration:
-
Project Lifecycle Commands
- Use the provided
runscript to manage the project:- Build the project (install dependencies, migrate, seed):
./run build
- Start the project:
./run start
- Stop and remove containers and volumes:
./run teardown
- Run backend checks:
./run check-be
- Run frontend checks:
./run check-fe
- Build the project (install dependencies, migrate, seed):
- Use the provided
You will need to first execute the ./run build command before starting the project for the first time. Then you can
use the ./run start command to start the project. The ./run teardown command can be used to stop and remove all
containers and volumes (clean-up). Finally, while the project is running, you can use the ./run check-xx command to
run the automated checks.
- You can now visit the URL:
http://localhost:5173and access the project.
The following test users can be used to log in:
| Role | Password | Name | |
|---|---|---|---|
| Manager | [email protected] | managerpass123 | Manager User |
| Employee | [email protected] | employeepass123 | Employee User |
- Manually testing the API
- Example login request:
curl -v -X POST http://localhost:8080/auth/login \ -H "Content-Type: application/json" \ -d '{"email": "[email protected]", "password": "managerpass123"}'
- Alternatively you can use the
./test_routes.shscript inside thebefolder to test all the API routes.
- Example login request:
Refer to the run script for more details on each command.