How andriirwanzahri/fuzzy-c-means works
Main Components
• Frontend/UI Layer:
• Pages such as index.php, home.php, homeuser.php, login.php, registrasi.php, and various data display and management pages (e.g., datadiri.php, datamasyarakat.php, info.php).
• Assets like CSS (css/ folder and SCSS files for styling), JavaScript (js/ folder including demo charts and index.js), and images (img/ directory).
• Reusable templates/components like header.php, headerAdmin.php, footer.php.
• Backend/Business Logic Layer:
• PHP scripts implementing core functionalities such as cetaklaporan.php (printed reports), codesimpan.php (data saving), perhitungan.php (likely carrying out the Fuzzy C Means computation).
• The fuzyycmeans.php file indicates that the Fuzzy C Means algorithm is directly implemented here.
• Other PHP files that manage specific features (kelolaakun.php, subkriteria.php, uploadmasyarakat.php).
• Data Access/Database Layer:
• k_means.sql script suggesting schema definitions or seed data.
• koneksi.php file for database connection.
• External Libraries & Vendor Code:
• There is a vendor/ directory which might encapsulate third-party libraries or packages.
• The excel_reader folder indicates that the application can import data from Excel files.
• Data Files:
• The pages directory contains several Excel datasets (e.g., dataset.xls, dataset Baru.xls) used in the classification process.
Relationships and Interactions
• The user interacts with the frontend pages (login, registration, viewing reports) that are styled with CSS/SCSS and enhanced with JavaScript.
• The frontend makes requests (via forms or API-like calls) to the PHP backend for processing user inputs, triggering the Fuzzy C Means calculations, saving data, and fetching results.
• The backend connects to a database (using koneksi.php) to read/write data (user data, inputs for clustering, results) and executes the Fuzzy C Means algorithm (fuzyycmeans.php and possibly perhitungan.php).
• There are additional integration points, such as the Excel reader, which imports data that can be processed further by the application.
Architectural Patterns and Design Principles
• MVC (or at least a separation of concerns) is loosely followed through clear separation of view elements (PHP pages with header/footer templates), business logic (PHP files for algorithms like Fuzzy C Means and data manipulation), and data access (koneksi.php, SQL script).
• Modular design: Each feature (e.g., user management, data import, classification, report generation) is in its own file.
• Reusability: Shared UI components (headers, footers) and style sheets suggest reuse and consistency in design.
Relevant Technologies and Frameworks
• PHP as the server-side programming language.
• HTML/CSS/JavaScript for the frontend; SCSS files indicate that a preprocessor is in use for styling.
• External libraries: The use of a vendor/ folder and Excel reader implies that third-party libraries are integrated.
• Possibly Bootstrap or a similar framework (indicated by file names such as sb-admin-2.css and sb-admin-2.scss), providing a responsive admin dashboard.