Chatters is a web-based communication platform designed for educational and organizational environments, allowing users and administrators to interact. It features a PHP-based backend with a MySQL database, all containerized using Docker for easy deployment.
- User Authentication: Secure login system with Bcrypt password hashing.
- Role-based Access: Different interfaces for Users and Administrators.
- Multilingual Support: Automatic language detection based on IP address.
- File Management: Ability to upload and download various file types (PDF, Doc, Images, etc.).
- Containerized: Fully Dockerized environment for consistent development and deployment.
- Email Integration: Integrated with PHPMailer for notifications and password recovery.
- School/Organization Management: Built-in support for school and user entities.
- Backend: PHP 5.6 (with
pdo_mysql) - Database: MySQL 5.7+
- Frontend: HTML, CSS, JavaScript (AJAX)
- Containerization: Docker & Docker Compose
- Server: Apache (via PHP Docker image)
-
Clone the repository:
git clone https://github.com/your-username/chatters.git cd chatters -
Environment Setup: The project uses a
.envfile for Docker and aconfig/bd/geral.inifor PHP. Ensure they match.Example
.env:MYSQL_ROOT_PASSWORD=root_password MYSQL_DATABASE=chatters MYSQL_USER=myuser MYSQL_PASSWORD=mypassword
-
Run with Docker Compose:
docker-compose up -d --build
-
Access the application: Open your browser and navigate to
http://localhost.
controller/: Contains the business logic, AJAX request handlers, and utility classes (Bcrypt, PHPMailer).model/: Data Access Objects (DAO) for database interactions (EscolaDAO,UsuarioDAO).view/: Frontend templates organized by role (home,user,admin).config/: Configuration files for database connections (bd/) and translations (lang/).db/: SQL initialization scripts (create.sql,insert.sql).media/: Storage for uploaded files.style/: CSS and styling assets.script/: Client-side JavaScript.
The database is automatically initialized using the scripts found in the db/ directory when the Docker containers start for the first time. The docker-compose.yml mounts the db/ folder to /docker-entrypoint-initdb.d in the MySQL container.