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.
- π 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.
- PHP 8.2+
- Composer
- Git
-
Clone the repository:
git clone https://github.com/rafaumeu/gerenciador-de-contatos.git cd gerenciador-de-contatos -
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=...
-
Install dependencies:
composer install
-
Docker (Recommended): Start the application containers:
docker compose up -d --build
Access at http://localhost:8000.
-
Manual Setup (Alternative): Run the migrations and start the server:
php database/migration.php php -S localhost:8000 -t public
-
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
-
Install dependencies:
composer install
-
Run the application (Development Mode):
php -S localhost:8000 -t public
- Language: PHP 8.2+
- Architecture: Framework-agnostic, Clean Architecture principles.
- Storage: SQLite (Dev) / MySQL (Prod).
- Tooling: Composer, PHPUnit, Laravel Pint.
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
We strictly follow the GitHub Flow.
- Fork the project.
- Create your feature branch (
git checkout -b feature/amazing-feature). - Commit your changes following Conventional Commits (
feat: add new filter). - Push to the branch.
- Open a Pull Request.