DEV Community

Bobby Iliev
Bobby Iliev

Posted on

Write gorgeous documentations for your products using Markdown inside your Laravel app

I've been working on a personal project using Laravel. It is a simple web-based API. As with every API, I came to a point where I had to write some documentation for any future users.

After some quick research, I came across the LaRecipe package. I was facilitated by the simplicity and the intuitive frontend design. It basically saved me tons of time and I could just focus on writing my documentation in Markdown!

Introduction

LaRecipe is simply a code-driven package that provides an easy way to create beautiful documentation like this for your product or application inside your Laravel app. However, the usage of LaRecipe is not limited to creating documentation only. See an example.

LaRecipe uses some open-source third-party libraries/packages, many thanks to the web community:

  • Laravel
  • VueJs
  • TailwindCSS
  • erusev/parsedown-extra
  • symfony/dom-crawler
  • phpunit/phpunit
  • orchestra/testbench

Installation

You need to have Laravel and composer already installed, besides that all you need to do to install the LaRecipe package is to run the following command:

composer require binarytorch/larecipe
Enter fullscreen mode Exit fullscreen mode

After that you have to run the install command to publish the needed assets and configurations:

php artisan larecipe:install
Enter fullscreen mode Exit fullscreen mode

This is it! Then you will have your documentation ready at your_domain.com/docs.

Configuration

After installing LaRecipe your configuration file would be stored at config/larecipe.php.

In this file, you can find various options to change the configuration of your LaRecipe installation like changing the default /docs route, adding extra versions for your API, caching, SEO settings a more.

It even has a built-in search functionality powered by algolia.

Demo

Here is a demo of the LaRecipe package:

https://larecipe.binarytorch.com.my/docs/2.2/overview

You can also take a look at this video by Tony Lea where he goes through a quick installation and introduction of the package:

https://devdojo.com/episode/larecipe

Conclusion

LaRecipe is an amazing open-source package that is easy to install and configure and at the same time it has some powerful functionality that allows you to build amazing documentation that your users would love to read!

If anyone is interested in the personal project that I've been working on, you can take a look at it here:

https://quizapi.io

It is still under development but I hope to have this ready soon :)

Top comments (0)