Help define the structure of the very simple Phoenix leave requests application

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:

  1. to build one HTTP API that allows user to make leave requests
  2. 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 :exploding_head:

Hi @liebus,

In order for us to provide some guidance it would be helpful to understand where you are in your learning process. Here are some questions that would help us in that regard:

  • Have you done introductory Elixir material and feel comfortable with manipulating data?
  • Have you gone through the intro Phoenix material and feel comfortable with basic stuff like reading and writing from the database?
  • Have you built a REST API in another language before?

Hi @benwilson512 thx for reply. Yes, I have gone through the beginning materials and am now studying OTP Concurrency. I know what is CRUD but I have a very little experience with REST API (before Elixir, I worked in Data Science and didn’t use the REST API). So it would be helpful to see the big picture in step-by-step form: where to start, what block to do first, and what’s next.