Skip to content

A secure, modern PHP digital vault. Built from scratch with a custom MVC, Composer autoloader, and AES-256 encryption. Features a polished UI with TailwindCSS & Alpine.js.

License

Notifications You must be signed in to change notification settings

rafaumeu/lockbox

Repository files navigation

LockBox 🔒

PHP Composer Laravel Pint Carbon SQLite TailwindCSS Alpine.js Security License

A secure and organized way to manage your private notes, receipts, and documents. Built with PHP, SQLite, and a modern frontend.

🚀 Features

  • Digital Vault: Securely store and organize your important notes and receipts.
  • Privacy First: Designed to keep your sensitive data protected.
  • Quick Search: Instantly retrieve any document or note.
  • Secure Authentication: Robust login and registration system with session management.
  • Custom MVC Architecture: Built from scratch with a custom Router and Autoloader (PSR-4 style).
  • Encryption: Two-layer encryption (AES-256-CBC + HMAC SHA3-512) for sensitive note content.

⚙️ Configuration

  1. Environment Setup Copy the example environment file:

    cp .env.example .env
  2. Generate Encryption Keys You MUST generate unique keys to secure your application. Run the following command in your terminal:

    # Generate First Key (32 bytes)
    php -r "echo base64_encode(openssl_random_pseudo_bytes(32));"
    
    # Generate Second Key (64 bytes)
    php -r "echo base64_encode(openssl_random_pseudo_bytes(64));"

    Paste the outputs into your .env file for ENCRYPT_FIRST_KEY and ENCRYPT_SECOND_KEY.

🛠 Tech Stack

  • Backend: Native PHP 8.3+ (Class-based Controllers, Custom Routing)
  • Dependency Manager: Composer
  • Database: SQLite
  • Frontend: TailwindCSS + DaisyUI 5
  • Interactivity: Alpine.js
  • Date Handling: Carbon
  • Code Style: Laravel Pint (PSR-12)
  • Icons: Phosphor Icons

📂 Project Structure

lockbox/
├── App/                # Application Logic
│   ├── Controllers/    # Class-based Controllers
│   └── Models/         # Data Models
├── Core/               # Framework Core (Router, DB, Validator)
├── config/             # Configuration files (Database, Routes)
├── public/             # Entry point (index.php)
├── vendor/             # Composer Dependencies
└── views/              # UI Templates

📦 Installation

  1. Clone the repository

    git clone https://github.com/rocketseat-education/php-lockbox.git
    cd lockbox
  2. Install Dependencies

    composer install
  3. Start the server You can use the built-in PHP server for development:

    php -S localhost:8888 -t public

💅 Code Style

This project uses Laravel Pint to ensure code quality and consistency (PSR-12).

# Fix code style automatically
./vendor/bin/pint
  1. Access the application Open http://localhost:8888 in your browser.

🤝 Contributing

Contributions are welcome! Please check the CONTRIBUTING.md file for guidelines on how to contribute to this project.

  1. Fork the project
  2. Create your feature branch (git checkout -b feat/AmazingFeature)
  3. Commit your changes (git commit -m 'feat(scope): add some AmazingFeature')
  4. Push to the branch (git push origin feat/AmazingFeature)
  5. Open a Pull Request

📄 License

Distributed under the MIT License. See LICENSE for more information.


Made with ❤️ by Rafael Dias Zendron

LinkedIn GitHub

About

A secure, modern PHP digital vault. Built from scratch with a custom MVC, Composer autoloader, and AES-256 encryption. Features a polished UI with TailwindCSS & Alpine.js.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published