Hello friends. Learning Elixir for the second month, decided to make a small pet project on Phoenix. There is a user and an administrator. The general point:
- to build one HTTP API that allows user to make leave requests
- another that provides administrator with an overview of all leave requests and allows him to decline or approve requests
The way I see the overall structure of routes is this:
1) There should be API routes that allow user to:
- See its requests
- Filter by status (approved, pending, rejected)
- See the number of remaining leave days
- Make a new request if the user have not exhausted his total limit (for example 30 per year)
2) There should be API routes that allow admin to:
- See an overview of user requests
- Filter by pending and approved
- Process the user request and either approve or reject it
Please help me to build a structure in my head, where to start and how to go step by step. For example start with creating user and admin first or start with leaves controller or something else? And what to do next? I will be glad for any help, the more detailed you explain the better, while my head is in a mess