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

https://github.com/iamsabbiralam/ghost-notes

๐Ÿ‘ป Transform hidden code tags into a professional dev-diary. Features a sleek dashboard, Git integration, VS Code links, and multi-format exports for Laravel projects.
https://github.com/iamsabbiralam/ghost-notes

code-analysis dev-diary developer-experience developer-tools ghost-notes laravel laravel-package package php productivity-tool technical-debt

Last synced: 5 months ago
JSON representation

๐Ÿ‘ป Transform hidden code tags into a professional dev-diary. Features a sleek dashboard, Git integration, VS Code links, and multi-format exports for Laravel projects.

Awesome Lists containing this project

README

          

# ๐Ÿ‘ป GhostNotes - Transform Code Comments into a Dev Diary

[![Latest Version on Packagist](https://img.shields.io/packagist/v/iamsabbiralam/ghost-notes.svg?style=flat-square)](https://packagist.org/packages/iamsabbiralam/ghost-notes)
[![Total Downloads](https://img.shields.io/packagist/dt/iamsabbiralam/ghost-notes.svg?style=flat-square)](https://packagist.org/packages/iamsabbiralam/ghost-notes)
[![License](https://img.shields.io/packagist/l/iamsabbiralam/ghost-notes.svg?style=flat-square)](https://packagist.org/packages/iamsabbiralam/ghost-notes)

![Ghost Notes Preview](src/images/ghost-notes.png)

**GhostNotes** is a powerful Laravel utility that scans your codebase for hidden tags like `@ghost`, `@todo`, or `@fixme` and compiles them into a beautiful, organized developer diary, multi-format reports, and a modern Web Dashboard.

![Dashboard Preview](src/images/dashboard.png)

---

## โœจ Features

- ๐Ÿ” **Advanced Tag Scanning:** Automatically finds `@ghost`, `@todo`, `@fixme`, and `@note` with optional **Priority Levels** (high|medium|low).
- ๐ŸŽจ **Modern Dashboard:** A sleek, Tailwind-powered dashboard with **Search**, **Priority Badges**, and **Source Code Snippets**.
- ๐Ÿ“Š **Multi-Format Export:** Export your dev-diary into **Markdown**, **JSON**, or **CSV** (Excel compatible).
- ๐Ÿ† **Resolved Graveyard:** Track resolved notes in the "Resolved Ghosts" history after clearing them from your code.
- ๐Ÿš€ **VS Code & GitHub Integration:** Open files directly in VS Code from the dashboard or view them on GitHub with line-specific links.
- ๐Ÿ‘ค **Git Context:** Automatically identifies the author using `git blame`.
- ๐Ÿงน **Code Cleanup:** Use the `--clear` flag to safely remove tags from source code once they are logged.
- ๐Ÿ”’ **Safe for Devs:** Dashboard and routes are automatically disabled in production.

---

## ๐Ÿš€ Installation

Install the package via composer:

```bash
composer require iamsabbiralam/ghost-notes
```
Set up everything with a single command:
```bash
php artisan ghost:install
```
This command publishes the config file and prepares the internal storage.

---

## ๐Ÿ›  Usage
1. Adding Tags in Code
You can now add priority levels to your tags:
```bash
// @ghost:high: Fix this critical security vulnerability
// @todo:medium: Implement the user profile update logic
// @fixme:low: Minor alignment issue on the footer
// @note: This is a general architectural note
```
2. Generating the Diary
Run the command to scan files and update the dashboard cache:
```bash
php artisan ghost:write
```
3. Exporting Reports
Generate reports in your preferred format:
```bash
php artisan ghost:write --format=markdown
php artisan ghost:write --format=json
php artisan ghost:write --format=csv
```
4. Clearing and Archiving
Log the notes to the Resolved History and remove them from your code:
```bash
php artisan ghost:write --clear
```

---

## ๐Ÿ–ฅ Web Dashboard
Visit the interactive dashboard at: http://your-app.test/ghost-notes

In the Dashboard you can:
* ๐Ÿ” Search through notes by author, message, or file name.
* ๐Ÿ–ฑ๏ธ One-click Open files directly in VS Code.
* ๐Ÿ“ฆ Download reports as CSV, JSON, or Markdown.
* ๐Ÿ–จ๏ธ Print a clean PDF report of your technical debt.
* ๐Ÿ“œ View History of all resolved/cleared notes.

---

## โš™๏ธ Configuration
The configuration file ```(config/ghost-notes.php)``` allows you to customize:
```bash
return [
'tags' => ['@ghost', '@todo', '@fixme', '@note'],
'filename' => 'GHOST_LOG.md',
'ignore_folders' => ['vendor', 'node_modules', 'storage', 'tests'],
'git_context' => true,
'repo_url' => env('GHOST_NOTES_REPO_URL', ''), // Auto-detected if empty
'default_branch' => 'main',
];
```
---

## ๐Ÿค Contributing
Contributions are welcome! If you have any ideas, feel free to open an issue or submit a pull request.

---

## ๐Ÿ“„ License
The MIT License (MIT). Please see License File for more information.

Developed by [Sabbir Alam](https://github.com/iamsabbiralam)