Implementing the QuizManager with Processes

Let's start creating our first GenServer, the quiz manager.

QuizManager

The quiz manager will start with an empty map:

  • We’ll add quizzes to it through a call to :build_quiz.

  • Then, we’ll add templates to a quiz in the store through a call to :add_template.

  • We’ll add a function to let our users look up a quiz by name.

Declaring our boundary

We’ll open up /lib/mastery/boundary/quiz_manager.ex. It’s a straight Elixir module that looks like this:

Get hands-on with 1200+ tech skills courses.