010326
Github Commit 1
-
Added IDE Configuration & Python 3.13 Setup: Configured PyCharm/IntelliJ project files (
.idea/) and established Python 3.13 as the active project interpreter. -
Refactored Static File Routes: Standardized static directory mounts in
main.pyusing dynamicos.pathjoins, fixing a broken path string and adding a dedicated/topsecretstatic route. -
Enhanced User Experience & Defaults: Added browser compatibility notifications alerting users to autoplay and tracking protection settings across Chrome, Firefox, Opera, and LibreWolf, while setting dark mode to enabled by default (
ui.dark_mode(value=True)).
Github Commit 2
-
Cleaned Up Module Execution: Commented out raw, unhandled execution statements and orphaned
bcryptchecks inmain2.pyto clean up module imports and prevent runtime errors. -
Added Utility Stubs & Security Credential Updates: Introduced a
browsercheck.pyscript for environment detection routines and updated hashed credential strings intopsecret/admin.txt.
Stumbling Blocks
-
Static Path Formatting Errors: Encountered path resolution issues during static file mounting where hardcoded string fragments (like
staticF:\coding\...) got mixed intoos.path.join(), causing invalid directory routes. Fixed by using cleanbase_pathvariables. -
Browser Autoplay & Tracking Restrictions: Discovered that background media assets were blocked on certain browsers (Firefox, LibreWolf, Chrome) due to strict tracking protection and autoplay policies, requiring front-end warning notifications for users.
-
Module Import Executions: Running logic directly inside
main2.pycaused automatic execution upon importing intomain.py, triggering file-not-found exceptions and scope errors. Solved by commenting out raw script execution until wrapped in proper function structures.
Reflective Comments
Overall, I was able to address file-routing bugs and clean up module imports to keep the codebase structured. Moving forward, properly scoping functions rather than leaving raw test logic in secondary modules will prevent import side-effects. Additionally, accounting for browser-level security policies early on will make asset delivery and media playback much smoother.
Resources and Code Used
-
NiceGUI: Used to implement static file mounting (
app.mount), dark mode configurations, notifications, and front-end bindings. -
Python Standard Libraries: Utilized
osfor cross-platform path handling,datetimefor timestamp management, andresourcefor monitoring memory usage (ru_maxrss). -
PyCharm / JetBrains IDE: Configured project structures, VCS mappings, and Python 3.13 virtual environment settings (
.idea/).