Skip to content

Mythfinity/email-signature-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Email Signature Manager

A self-hostable, open-source email signature management platform built with Laravel and GrapesJS. Design professional, Gmail-compatible email signatures visually with a drag-and-drop editor, manage multiple signatures per user, and administer your team through a built-in admin panel.

Published by Mythfinity Ltd.

Screenshots

Landing page

How it works

Features

  • Visual Drag & Drop Editor — Powered by GrapesJS with the official Newsletter Preset for email-optimized layouts
  • Gmail-Compatible Export — Automatic CSS inlining and table-based layouts that render correctly in Gmail and other email clients
  • One-Click Copy — Copy signatures as formatted HTML (for Gmail) or raw HTML (for other applications)
  • Automatic Image Upload — Drag-and-drop images are automatically uploaded and hosted (no base64, Gmail-friendly)
  • Multiple Signatures Per User — Create, rename, duplicate, and delete as many signatures as needed
  • Admin Panel — Full user management with role-based access control (admin / user)
  • Quick Role Management — Promote or demote users instantly via AJAX-powered dropdowns
  • Login-As Support — Admins can switch into any user's session for support and troubleshooting
  • Secure Previews — Sandboxed iframe previews protect against XSS
  • Responsive UI — Modern interface built with Tailwind CSS and Alpine.js

Tech Stack

Backend

Frontend

Dev Tooling

  • Laravel Pint — PHP code style fixer
  • PHPUnit — Testing framework
  • Laravel Pail — Log tailing
  • Laravel Sail — Docker-based local dev environment

Requirements

  • PHP 8.2 or higher
  • Composer 2.x
  • Node.js 18+ and npm
  • MySQL 8.0+ (or MariaDB / PostgreSQL / SQLite)
  • A web server (Nginx or Apache) for production

Installation

1. Clone the repository

git clone https://github.com/Mythfinity/email-signature-manager.git
cd email-signature-manager

2. Install PHP dependencies

composer install

3. Install JavaScript dependencies

npm install

4. Configure environment

cp .env.example .env
php artisan key:generate

Edit .env and set your database credentials and app URL:

APP_NAME="Email Signature Manager"
APP_URL=http://localhost:8000

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_database
DB_USERNAME=your_username
DB_PASSWORD=your_password

5. Run migrations

php artisan migrate

6. Build frontend assets

For production:

npm run build

For development (with hot reload):

npm run dev

7. Create the first admin user

php artisan tinker
$user = User::create([
    'name' => 'Admin',
    'email' => 'admin@example.com',
    'password' => 'your-secure-password',
]);
$user->role = 'admin';
$user->save();

8. Start the server

php artisan serve

Visit http://localhost:8000 and log in with your admin credentials.

Usage

Creating a Signature

  1. Log in and click New Signature on the dashboard
  2. Use the GrapesJS editor to drag and drop blocks (sections, images, text, etc.)
  3. Click Save when done

Copying for Gmail

  1. On the dashboard, click Copy for Gmail on any signature
  2. Open Gmail Settings → Signatures, and paste into the signature editor
  3. Save the Gmail settings

Managing Users (Admin)

  1. Navigate to /admin/users
  2. Create, edit, or delete users
  3. Change roles via the dropdown next to each user
  4. Use Login as to troubleshoot issues from a user's perspective

Project Structure

app/
├── Http/Controllers/
│   ├── SignatureController.php    # Signature CRUD, Gmail formatting
│   ├── BuilderController.php      # GrapesJS editor routing
│   └── Admin/UserController.php   # User management
├── Models/
│   ├── User.php                   # User with custom password_hash field
│   └── Signature.php              # Signature model
└── Support/
    └── SignatureFormatter.php     # Gmail HTML formatter & sanitizer

resources/
├── js/
│   └── grapesjs-editor.js         # GrapesJS config with newsletter preset
└── views/
    ├── dashboard.blade.php        # Signature listing with iframe previews
    ├── builder-grapesjs-clean.blade.php  # Clean editor page
    └── admin/users/               # Admin user management views

routes/
└── web.php                        # Application routes

Common Commands

# Clear caches
php artisan cache:clear
php artisan config:clear
php artisan view:clear
php artisan route:clear

# Run tests
php artisan test

# Check code style
./vendor/bin/pint

# Watch assets during development
npm run dev

# Build production assets
npm run build

# Create a new migration
php artisan make:migration create_example_table

Deployment

  1. Set APP_ENV=production and APP_DEBUG=false in .env
  2. Run composer install --optimize-autoloader --no-dev
  3. Run npm run build
  4. Run php artisan migrate --force
  5. Cache configuration and routes:
    php artisan config:cache
    php artisan route:cache
    php artisan view:cache
  6. Ensure storage/ and bootstrap/cache/ are writable by the web server
  7. Configure your web server (Nginx/Apache) to serve from the public/ directory

Security

  • All state-changing endpoints are CSRF-protected
  • Signature previews are rendered in sandboxed iframes to prevent XSS
  • Image uploads are validated by MIME type, file size (max 5MB), and magic bytes
  • Admins cannot change their own role (prevents lockout)
  • Policy-based authorization for all signature operations

If you discover a security vulnerability, please email the maintainers rather than opening a public issue.

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Please follow the existing code style (run ./vendor/bin/pint before committing) and include tests where applicable.

License

Copyright (C) 2026 Mythfinity Ltd.

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).

This means you are free to use, modify, and distribute this software, but if you run a modified version as a network service (e.g., SaaS), you must make the source code of your modifications available to your users under the same license.

See the LICENSE file for the full license text, or visit gnu.org/licenses/agpl-3.0.

Acknowledgments

About

Self-hostable email signature management platform built with Laravel and GrapesJS. Visual drag-and-drop editor, Gmail-compatible export, admin role management.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors