Johanna Spyri wrote this story for her son, Berhard Diethelm Spyri. People and places in the story come from Spyry's own life. Catherine Eayrs, a literary critic, thinks that the village of Dorfli may come from Jenins in Switzerland, a place that Spyri visited as a child, however Dorfli is an actual town in Switzerland. Also, the kindly doctor is similar to Spyri's own father, and Klara's grandmother is a good storyteller, just like Spyri's own mother.