An open API service indexing awesome lists of open source software.

https://github.com/Mapping-Apping/laravel2doc

Automate generating comprehensive documentation for Laravel applications, including Entity Relationship Diagrams (ERD), UML Class Diagrams, Sequence Diagrams, API Documentation, and more.
https://github.com/Mapping-Apping/laravel2doc

api-documentation documentation erdiagram laravel laravel2doc nodejs sequence-diagram sql uml-diagram

Last synced: about 1 month ago
JSON representation

Automate generating comprehensive documentation for Laravel applications, including Entity Relationship Diagrams (ERD), UML Class Diagrams, Sequence Diagrams, API Documentation, and more.

Awesome Lists containing this project

README

          

# Laravel2Doc (Live Now โ€” May 2025)

[![npm version](https://img.shields.io/npm/v/@priom7/laravel2doc?color=blue)](https://www.npmjs.com/package/@priom7/laravel2doc)
[![npm downloads](https://img.shields.io/npm/dt/@priom7/laravel2doc?label=Downloads&color=green)](https://www.npmjs.com/package/@priom7/laravel2doc)
[![License: MIT](https://img.shields.io/badge/license-MIT-yellow.svg)](LICENSE)
[![Node.js](https://img.shields.io/badge/Node.js-%3E=14.0.0-brightgreen)](https://nodejs.org/)
[![Made by priom7](https://img.shields.io/badge/Made%20by-priom7-blueviolet)](https://github.com/priom7)

> Automatically generate beautiful, interactive documentation for Laravel projects in seconds.

---

### โญ Feel free to leave a star and follow for updates!
### ๐Ÿ“ฃ Feedback is always welcome โ€” suggest features you'd like to see!

๐Ÿ“– **Read the article**:

Read Article

---

## โœจ Features

- ๐Ÿ“Š **ERD** โ€” Entity Relationship Diagrams
- ๐Ÿ“ **UML** โ€” Class Diagrams for Models
- ๐Ÿ”„ **Sequence Diagrams** โ€” Component interaction flows
- ๐Ÿ“š **API Docs** โ€” Endpoints, controllers, routes
- ๐Ÿš€ **Interactive Viewer** โ€” Browse via built-in web interface
- ๐Ÿ” **Zero Config** โ€” Auto-analyzes Laravel project structure

---

## ๐Ÿ“ฆ Installation

### Global:

```bash
npm install -g @priom7/laravel2doc
````

### Local (within a Laravel project):

```bash
cd your-laravel-project
npm install @priom7/laravel2doc
```

---

## ๐Ÿš€ Usage

Inside your Laravel project:

```bash
npx laravel2doc
```

This generates documentation in the `laravel2doc/` folder and launches a web viewer.

### โš™๏ธ Options

| Flag | Description | Default |
| -------------------- | --------------------------------- | ------------- |
| `-p, --port ` | Port for local server | `3333` |
| `-o, --output ` | Directory to output documentation | `laravel2doc` |

### ๐Ÿงช Demo Mode

Try it outside a Laravel project to see a live example:

```bash
npx laravel2doc
```

---

## ๐Ÿงพ Generated Documentation

### ๐Ÿ“Š Entity Relationship Diagram (ERD)

* Tables, columns, data types
* Primary/foreign keys, relationships


ERD Sample

---

### ๐Ÿ— UML Class Diagram

* Model properties, methods
* Relationships and inheritance


UML Sample

---

### ๐Ÿ”„ Sequence Diagrams

* Controller method flows
* CRUD interaction flow


Sequence Sample

---

### ๐ŸŒ API Documentation

* Routes, HTTP methods, controllers
* Parameter and handler mappings


API Sample

---

## ๐Ÿง  How It Works

1. **Scans** Laravel models for relationships and attributes
2. **Parses** migrations to reconstruct DB schema
3. **Analyzes** controllers and route files
4. **Generates** Mermaid-based diagrams and structured API docs
5. **Serves** everything via a local web interface

---

## ๐Ÿ›  Requirements

* Node.js 14+
* Laravel 8+ project

---

## ๐Ÿค Contributing

Contributions are welcome! Feel free to submit a pull request or feature request.

---

## ๐Ÿ‘จโ€๐Ÿ’ป Author

Created by [@priom7](https://github.com/priom7)
Md Sharif Alam

---

> ๐ŸŒŸ Found it useful? Give it a โญ on GitHub and share with Laravel developers!