How ncsugroup17/slash works
• Frontend & User Interface: Although most UI is likely served through Flask, include components for static HTML/CSS pages (located under src/modules/static and assets) and any client-side JavaScript.
• Backend – Web Server: This is primarily the Flask application (src/modules/app.py) that handles incoming HTTP requests, renders pages, and routes to different functionalities.
• Application Modules:
• Scraper Module (src/modules/scraper.py) – handles the logic for scraping different e-commerce websites.
• CSV Writer (src/modules/csv_writer.py) – likely used for exporting or logging data.
• Formatter and Full Version Modules (src/modules/formatter.py and src/modules/full_version.py) – responsible for processing and formatting the scraped data.
• Database Manager (src/modules/DatabaseManager.py) – handles connections and operations with the underlying database.
• Features (src/modules/features.py) – possibly includes business logic specific to the user’s requests or deal filtering.
• Configuration (src/modules/config.py) – handles environment and application configuration.
• Additional user-related logic (src/users/) – for managing user authentication or profile data if applicable.
• Database: Although details on the specific database aren’t explicit, the README mentions database usage (e.g., wishlist storage and testing). Represent a database component that interacts with the DatabaseManager.
• External Services: These include connections to various e-commerce APIs or scraping endpoints (Target, Walmart, Amazon, etc.) that the scraper module interacts with.
Relationships and Interactions
• Flask app interfacing with the application modules (e.g., routing to the scraper, CSV writer, and features modules).
• Data flow from the scraper module to the Database Manager (storing or retrieving deal data) and back to the Flask app for presentation.
• Interactions between the CSV writer/formatter modules and the main app for report generation or data export.
• If authentication or user management is involved, indicate the flow between the users module and the backend.
Architectural Patterns and Design Principles
• Separation of Concerns: Clearly distinguish between the web server/route handling (Flask app), business logic (modules like scraper, formatter, features), and data management (DatabaseManager).
• Modular Design: Reflect how each module (scraper, CSV writer, configuration, etc.) is encapsulated and integrated into the main app.
• External Integration: Show the external dependencies (scraping targets, potential OAuth flows if user login is needed) as distinct elements that interface with the central scraping logic.
Relevant Technologies
• Python & Flask are the core frameworks.
• The use of static assets (HTML, CSS, and JavaScript) indicates that the web server also serves the frontend.
• Testing frameworks (unit tests in the tests directory) and CI/CD workflows (GitHub Actions and Travis CI) signal robust development practices.
• Documentation is supported through Sphinx (as indicated by the docs directory).
• A segment for “User Actions” showing the steps from entering a URL (or using a command) to trigger scraping.
• Asynchronous/sequential nature (if any) of scraping operations.
• Optionally, note testing (tests directory) as a supporting pillar that ensures the integrity of the components.