Skip to content

πŸ›‘οΈ Secure, Dockerized Contact Manager built with Vanilla PHP 8.2 & Clean Architecture. Features AES-256 encryption, Privacy Mode, and CI/CD pipelines.

License

Notifications You must be signed in to change notification settings

rafaumeu/gerenciador-de-contatos

Repository files navigation

πŸ“‡ Contact Manager

License Bob PHP Composer

Contact Manager is a simple and efficient solution for organizing your personal and professional contacts. Designed with a clean architecture in mind, it serves as a robust example of a PHP application without heavy frameworks.

✨ Features

  • πŸ“‡ Contact Operations: Create, Read, Update, and Delete (CRUD) contacts easily.
  • πŸ” Modern Search: Quickly find contacts by name or email.
  • πŸ” Military-Grade Security: AES-256 encryption for sensitive data (Email & Phone).
  • πŸ‘οΈ Privacy Mode: Blur/Hide sensitive info by default with password unlock.
  • πŸ›‘οΈ Robust Auth: Middleware protection, Session management & Secure Logout.
  • πŸ€– Automated: Full CI/CD pipeline for code quality ensuring every commit is pristine.

πŸš€ Getting Started

Prerequisites

  • PHP 8.2+
  • Composer
  • Git

Installation

  1. Clone the repository:

    git clone https://github.com/rafaumeu/gerenciador-de-contatos.git
    cd gerenciador-de-contatos
  2. Environment Setup: Copy the example environment file and generate your encryption key:

    cp .env.example .env
    # Generate a secure key
    php -r "echo base64_encode(openssl_random_pseudo_bytes(32));"
    # Paste the key into your .env file at ENCRYPTION_KEY=...
  3. Install dependencies:

    composer install
  4. Docker (Recommended): Start the application containers:

    docker compose up -d --build

    Access at http://localhost:8000.

  5. Manual Setup (Alternative): Run the migrations and start the server:

    php database/migration.php
    php -S localhost:8000 -t public
  6. Seed Database (Optional): Populate with test data (Admin + 5 encrypted contacts):

    docker compose exec app php database/seeder.php
    ```    git clone https://github.com/rafaumeu/gerenciador-de-contatos.git
    cd gerenciador-de-contatos
  7. Install dependencies:

    composer install
  8. Run the application (Development Mode):

    php -S localhost:8000 -t public

πŸ› οΈ Tech Stack

  • Language: PHP 8.2+
  • Architecture: Framework-agnostic, Clean Architecture principles.
  • Storage: SQLite (Dev) / MySQL (Prod).
  • Tooling: Composer, PHPUnit, Laravel Pint.

πŸ“‚ Project Structure

gerenciador-de-contatos/
β”œβ”€β”€ App/                # Domain Logic
β”‚   β”œβ”€β”€ Controllers/    # Request Handlers
β”‚   └── Models/         # Data Models
β”œβ”€β”€ Core/               # Framework Kernel
β”‚   β”œβ”€β”€ Database.php    # DB Connection (Singleton)
β”‚   └── Model.php       # Base Model
β”œβ”€β”€ config/             # Configuration files
β”œβ”€β”€ database/           # SQLite file & Migrations
β”œβ”€β”€ public/             # Web Root (Entry Point)
β”œβ”€β”€ views/              # Blade/HTML Templates
β”œβ”€β”€ tests/              # PHPUnit Tests
└── vendor/             # Composer Dependencies

🀝 Contributing

We strictly follow the GitHub Flow.

  1. Fork the project.
  2. Create your feature branch (git checkout -b feature/amazing-feature).
  3. Commit your changes following Conventional Commits (feat: add new filter).
  4. Push to the branch.
  5. Open a Pull Request.

πŸ‘¨β€πŸ’» Author

Made with πŸ’œ by Rafael Dias Zendron

Linkedin Badge Gmail Badge

About

πŸ›‘οΈ Secure, Dockerized Contact Manager built with Vanilla PHP 8.2 & Clean Architecture. Features AES-256 encryption, Privacy Mode, and CI/CD pipelines.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

 
 
 

Contributors 3

  •  
  •  
  •