How luminousyinyang/cop4331-small-project works
Main Components
• API/Backend: Represented by the API directory containing create.php, delete.php, login.php, retrieve.php, signup.php, and update.php. These scripts form the backend endpoints that handle business logic for contact management and user sessions.
• Frontend Client: Shown in the public folder with home.html and index.html, along with associated JavaScript and CSS files. The public/js folder contains page-specific scripts (home.js, index.js, modal.js) that likely handle user interactions and Ajax requests.
• Additional JavaScript Libraries: The separate js directory (with code.js and md5.js) may house common functions or utilities (e.g., md5.js for password hashing before transmission) used across the frontend or API calls.
Relationships and Interactions
• The common JavaScript utilities (from the js folder) support the frontend operations and possibly pre-process data (e.g., using md5 to hash passwords before calling API/login.php). Show this as a separate module or library that supports the Frontend Client.
Architectural Patterns and Design Principles
• Even though not formally implemented, note the use of separation of concerns: the API (backend logic) is kept separate from the presentation layer (frontend HTML/CSS/JS).
• That the frontend is built to be dynamic (based on JavaScript interactions) and makes use of common libraries for utility functions.
Relevant Technologies, Frameworks, or Libraries
• Technologies:
• PHP is used for server-side processing in the API.
• HTML, CSS, and JavaScript for the frontend.
• md5.js is likely used for password hashing or data integrity checks.
• The Frontend Client (HTML pages and associated JavaScript/CSS)
• The API Server (listing out individual endpoints)
• Shared JavaScript Utilities (common libraries like md5.js)
• The Database (even if implicit, to represent persistent storage)
• Data flow from the Frontend to specific API endpoints
• Communication between API endpoints and the Database
• The support role of the utility scripts to the frontend operations
• Visual distinctions: