How s4nchzz/nozama-express works
Project Overview & Purpose
• Nozama is a small and simple product sales program that focuses on user management (account creation, login, password changes), an administrative panel (to manage users, products, tickets/incidences), and user interaction elements (chat, profile management, etc.).
• It is built in Java and leverages JavaFX for the front-end (using FXML for UI layouts) while incorporating a server-side component (e.g., “NozamaServerSocket.java”) to manage unique connections and interactions.
• It also integrates with a database (MariaDB via Connector/J, as stated in the README) and uses third-party jar libraries (e.g., “charm-glisten”) for additional UI or functional enhancements.
Main Components
a. Front-End / UI Layer:
• Login and account creation: Located in the "nozama/f00_Login" package with functionalities for login, account creation (nested under accountCreation), and password changing.
• Main application window and front page: "NozamaWindowApp.java" and the "nozama/f01_FrontPage" package include the front page, admin panel, ticket panel, product store display, and user profile management.
• Ticket and chat functionalities: The "ticketChat" sub-package handles the virtual chat interface and message handling.
• FXML files and CSS resources: Found under src/main/resources (for login screens, admin panels, support panels, and chat interfaces) which represent the UI structure and styling.
b. Server / Back-End Component:
• Server Socket handling: “NozamaServerSocket.java” and supporting classes like "ServerSocketData.java" provide the networking layer.
• Database Management: Packages within "nozama_database" (credentials, sendRequest, setttingUp) encapsulate database interactions, such as connecting to the MariaDB database, handling credentials, and setting up database requests.
c. External Libraries & Dependencies:
• The project uses Maven (pom.xml) for dependency management.
• Third-party libraries (e.g., “charm-glisten-6.0.2.jar” found in the lib folder) provide additional UI functionality.
• Requirements highlight dependencies like JDK-22, JavaFX-22, MariaDB Connector/J, and tools such as XAMPP and HeidiSQL.
Relationship and Interaction Between Components
• UI components (login, front page, admin panel, chat) interact with the server socket and database management layers to handle data flow.
• The login module processes user authentication that communicates with the database module (credentials verification via SHA256 encrypted passwords).
• Admin functionalities (such as managing tickets, users, and products) interact with both the UI and database, and may also trigger notifications or communications (handled by the server socket and ticket/chat subsystems).
• Each module’s responsibilities are separated into distinct packages (i.e., “f00_Login” for authentication, “f01_FrontPage” for general UI and admin interactions, “nozama_database” for back-end database operations).
Architectural Patterns & Design Principles
• The project appears modularized following a separation-of-concerns approach: distinct packages for login flows, front page, admin functionalities, and database operations.
• The use of FXML alongside JavaFX suggests an MVC-inspired approach for the UI—where FXML defines the view, and corresponding controller classes (like controllers for chat or admin panels) manage business logic.
• Network communication (via server sockets) is encapsulated in dedicated classes, showing an emphasis on clear boundaries between networking, UI, and data layers.