Skip to content

mucadoo/chatters

Repository files navigation

Chatters

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.

Features

  • 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.

Tech Stack

  • 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)

Getting Started

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/chatters.git
    cd chatters
  2. Environment Setup: The project uses a .env file for Docker and a config/bd/geral.ini for PHP. Ensure they match.

    Example .env:

    MYSQL_ROOT_PASSWORD=root_password
    MYSQL_DATABASE=chatters
    MYSQL_USER=myuser
    MYSQL_PASSWORD=mypassword
  3. Run with Docker Compose:

    docker-compose up -d --build
  4. Access the application: Open your browser and navigate to http://localhost.

Project Structure

  • 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.

Database Initialization

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors