How hoangminhfcb/idcard works
Project Type & Purpose
• This is a front-end project meant to display an electronic business card.
• The README indicates that the project has evolved through multiple versions and focuses on mobile usability, with functionalities such as photo enlarging and toast messages replacing alerts. It also mentions NFC sharing in earlier versions.
• There is no separate backend layer: all the logic and presentation are handled in the client’s browser.
File Structure
• At the top level, you have configuration files (.gitignore, Dockerfile, README.md) and key entry files (index.html, serviceWorker.js).
• The assets directory is broken down into subdirectories:
• CSS: Contains styles (notification.css, style.css) that control the presentation.
• JS: Contains the JavaScript modules (Notification.js, app.js, effect.js, symbol.js) which handle user interactions, notifications, effects, and possibly symbolic functions.
• IMG: Holds the images used in the site.
• VCF: Contains a vCard file (vcf.vcf) for sharing contact information.
• The Dockerfile suggests that there’s potential containerization for deployment, though the project itself is static.
Key Components & Relationships to Capture
• “Frontend/Mobile Browser” (Client):
• Represents the user’s device accessing the site.
• “index.html” (Main Entry & Layout File):
• This file serves as the entry point for the web application and ties all assets together.
• “assets” Folder:
• “css” Subfolder: Provides styling (e.g., using style.css for overall layout and notification.css for toast messages).
• “js” Subfolder: Provides the interactive functionalities and effects (Notification.js for toast messages, app.js for core functionality, effect.js for interactive effects, and symbol.js for any symbolic/graphical utilities).
• “img” Subfolder: Contains images relevant to the business card.
• “vcf” Subfolder: Holds the contact file for NFC or sharing purposes.
• “serviceWorker.js”:
• Illustrates Progressive Web App (PWA) behavior such as caching and offline support.
• “Dockerfile”:
• Indicates how the application can be containerized, though it primarily targets a static deployment environment.
• Optional External Components:
• Hosting environment such as GitHub Pages and the mobile demo mode referenced in the README.