On ten-year-old Maggie's birthday, her grandfather lets her in on a magical secret he has been hiding right in front of her.

His old wooden bookcase is in fact magical, the books it houses able to transport them from any time, anywhere.

Maggie, like her creator Megan Murray, is excited to dip her toes into the world of Scottish history and go between the pages to uncover language, confront people from the past and see historic events as they happen.

Now after years of development, Megan's self-published book series is about to be released, with hopes of educating children about Scotland's past while falling in love with the story's magic and adventure.

The 26-year-old from Gourock, Inverclyde, says she has been interested in books and storytelling from a young age.

Her mother and father would recount Scottish folk stories on holidays to the Highlands, while books by JK Rowling and Michael Morpurgo were stacked in her bedroom, the tales of fantasy and magic intriguing her.

Megan says: "I loved books and writing and I've always written wee diaries. I remember since I was a wee girl I wanted to tell stories and I've written stories down."

Yet it wasn't until she went to Glasgow university that she entertained the idea of her own novels lining children's bookshelves, especially those with a little sprinkling of magic and a dash of Scottish history.

Taking archeology classes as part of her English degree, Megan became fascinated with Scotland's rich tapestry of tales from the Stone Age to the Viking invasions.

After stumbling upon Sir Walter Scott's Tales of a Grandfather series, in which he recounted historical facts written especially for his grandchildren to aid their education, Megan became intrigued by the idea of a modern-day novel series for children full of history, language and plenty of adventure.

She researched the curriculum for children online and moulded the stories for school-age readers, matching the reading level and vocabulary.

"It's kind of like cutting up vegetables and putting them through food - I've kind of sprinkled a lot of historical facts through the narrative so that they pick it up without really realising it and hopefully they pick up all this vocabulary as well," Megan says.

The story's heroine, ten-year-old Maggie, is loosely based upon herself.

Megan explains: "She's very intelligent and switched on, she knows what she likes and she knows what she wants.

"She's very capable, she likes to question things and think about things in her own way.

"She's kind of based off me as a child, I didn't like being put in boxes. She's just a girl for everyone, she can hold her own."

While the titular character's roots lie firmly with the author, Maggie and the Magic Bookcase has been something of a family affair for Megan.

Her mother and father are extremely supportive, she says, and never urged her to "get a real job" when she spent her days after graduation penning stories and drawing illustrations while working part-time behind the bar at Gourock Golf Club.

Her uncle who works as an art teacher also inspired her to illustrate the book herself.

As for Maggie's Granda, the character is based on Megan's two grandfathers who worked in the shipping industry.

"I was lucky enough to grow up with both grandfathers, sadly both have now passed on and there's bits of both of them in the Granda in the story," she says.

Deciding to self-publish the first book in the series, The Prehistoric Prologue, Megan has been surprised at the sudden wave of interest her books have garnered due to social media.

Book shops have asked to stock physical copies and places as far flung as Australia are interested in selling the series.

As Maggie and the Magic Bookcase reaches shelves both online and instore in October, Megan is far from finished with her adventurous heroine and cheeky Granda.

Two more books about the Romans in Scotland and the first Gaelic kingdom are nearing completion and Megan hopes to explore a Burns story, the Greenock blitz, Vikings and Picts and even a tale about James Watt.

In total, Megan hopes to publish at least ten stories yet her mind is brimming with even more Scottish historical events she wants to explore with Maggie and Granda by her side.

In the meantime, she hopes young readers will devour her stories while learning something new about the country.

"I just hope they will get lost in the whole story, I really love the two main characters and think they have a lot to offer and I hope that people will get on board with them," she says.

"I hope that kids will learn something about their country and its history but find it an entertaining way to do it, something they can really lose themselves in the way books used to make me feel and still make me feel as a child and now."