👋 Codebase for the Ilume backend skill assesment test
🚚 The link to the heroku deployment : https://ilume-backend-service.herokuapp.com/
- Each dog will only have one owner
- Each dog will be one breed
- DOB cannot be in the future
- DOB can be any date in the past
- Install nodejs on your system.
- Run
npm install
to install dependencies. - Take a copy of
.env.example
and rename it to.env
. Update theMONGO_URI
andTOKEN_KEY
with a mongo db uri and a random string respectively. - Run
npm start
to run the server. The server should start onhttp://localhost;8080
. You should see aWelcome 🙌
on the home route. You should be able to test all the api's from the postman collection below.
- After setting up the project, run
ts-node src/seed/breed.ts
to seed the Breed types into the database. Only do this, if the database is a setup fresh.
The api documentation is hosted here as a postman collection.
- No email and password validation done, only checking whether they are not null.
- For some errors, the apis return a generic error message such as
Unable to <task>. Please check logs.
These can be better wrapped into pre-defined error categories. - Instead of deleteing the dog, we can have another field to specify if the dog is active or not. This allows us to safely delete the dog without dependency issues in the future.