pumaguard 21.post27__py3-none-any.whl → 21.post83__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. pumaguard/presets.py +1 -0
  2. pumaguard/pumaguard-ui/.last_build_id +1 -1
  3. pumaguard/pumaguard-ui/assets/NOTICES +621 -71
  4. pumaguard/pumaguard-ui/assets/fonts/MaterialIcons-Regular.otf +0 -0
  5. pumaguard/pumaguard-ui/flutter_bootstrap.js +1 -1
  6. pumaguard/pumaguard-ui/main.dart.js +28869 -28787
  7. pumaguard/web_routes/dhcp.py +311 -54
  8. pumaguard/web_routes/diagnostics.py +6 -0
  9. pumaguard/web_routes/settings.py +13 -0
  10. pumaguard/web_ui.py +29 -0
  11. {pumaguard-21.post27.dist-info → pumaguard-21.post83.dist-info}/METADATA +1 -1
  12. pumaguard-21.post83.dist-info/RECORD +254 -0
  13. pumaguard-ui/.gitignore +48 -0
  14. pumaguard-ui/.metadata +45 -0
  15. pumaguard-ui/API_REFERENCE.md +717 -0
  16. pumaguard-ui/LICENSE +201 -0
  17. pumaguard-ui/Makefile +36 -0
  18. pumaguard-ui/README.md +371 -0
  19. pumaguard-ui/UI_DEVELOPMENT_CONTEXT.md +427 -0
  20. pumaguard-ui/analysis_options.yaml +28 -0
  21. pumaguard-ui/android/.gitignore +14 -0
  22. pumaguard-ui/android/app/build.gradle.kts +44 -0
  23. pumaguard-ui/android/app/src/debug/AndroidManifest.xml +7 -0
  24. pumaguard-ui/android/app/src/main/AndroidManifest.xml +45 -0
  25. pumaguard-ui/android/app/src/main/kotlin/com/example/pumaguard_ui/MainActivity.kt +5 -0
  26. pumaguard-ui/android/app/src/main/res/drawable/launch_background.xml +12 -0
  27. pumaguard-ui/android/app/src/main/res/drawable-v21/launch_background.xml +12 -0
  28. pumaguard-ui/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  29. pumaguard-ui/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  30. pumaguard-ui/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  31. pumaguard-ui/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  32. pumaguard-ui/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  33. pumaguard-ui/android/app/src/main/res/values/styles.xml +18 -0
  34. pumaguard-ui/android/app/src/main/res/values-night/styles.xml +18 -0
  35. pumaguard-ui/android/app/src/profile/AndroidManifest.xml +7 -0
  36. pumaguard-ui/android/build.gradle.kts +24 -0
  37. pumaguard-ui/android/gradle/wrapper/gradle-wrapper.properties +5 -0
  38. pumaguard-ui/android/gradle.properties +2 -0
  39. pumaguard-ui/android/settings.gradle.kts +26 -0
  40. pumaguard-ui/fonts/README.md +38 -0
  41. pumaguard-ui/fonts/Roboto-Bold.ttf +0 -0
  42. pumaguard-ui/fonts/Roboto-Light.ttf +0 -0
  43. pumaguard-ui/fonts/Roboto-Medium.ttf +0 -0
  44. pumaguard-ui/fonts/Roboto-Regular.ttf +0 -0
  45. pumaguard-ui/fonts/RobotoMono-Bold.ttf +0 -0
  46. pumaguard-ui/fonts/RobotoMono-Medium.ttf +0 -0
  47. pumaguard-ui/fonts/RobotoMono-Regular.ttf +0 -0
  48. pumaguard-ui/fonts/download_fonts.sh +76 -0
  49. pumaguard-ui/ios/.gitignore +34 -0
  50. pumaguard-ui/ios/Flutter/AppFrameworkInfo.plist +26 -0
  51. pumaguard-ui/ios/Flutter/Debug.xcconfig +1 -0
  52. pumaguard-ui/ios/Flutter/Release.xcconfig +1 -0
  53. pumaguard-ui/ios/Runner/AppDelegate.swift +13 -0
  54. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +122 -0
  55. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png +0 -0
  56. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png +0 -0
  57. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png +0 -0
  58. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png +0 -0
  59. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png +0 -0
  60. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png +0 -0
  61. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png +0 -0
  62. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png +0 -0
  63. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png +0 -0
  64. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png +0 -0
  65. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png +0 -0
  66. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png +0 -0
  67. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png +0 -0
  68. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png +0 -0
  69. pumaguard-ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png +0 -0
  70. pumaguard-ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +23 -0
  71. pumaguard-ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png +0 -0
  72. pumaguard-ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png +0 -0
  73. pumaguard-ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png +0 -0
  74. pumaguard-ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +5 -0
  75. pumaguard-ui/ios/Runner/Base.lproj/LaunchScreen.storyboard +37 -0
  76. pumaguard-ui/ios/Runner/Base.lproj/Main.storyboard +26 -0
  77. pumaguard-ui/ios/Runner/Info.plist +49 -0
  78. pumaguard-ui/ios/Runner/Runner-Bridging-Header.h +1 -0
  79. pumaguard-ui/ios/Runner.xcodeproj/project.pbxproj +616 -0
  80. pumaguard-ui/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  81. pumaguard-ui/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  82. pumaguard-ui/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
  83. pumaguard-ui/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +101 -0
  84. pumaguard-ui/ios/Runner.xcworkspace/contents.xcworkspacedata +7 -0
  85. pumaguard-ui/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  86. pumaguard-ui/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
  87. pumaguard-ui/ios/RunnerTests/RunnerTests.swift +12 -0
  88. pumaguard-ui/lib/main.dart +56 -0
  89. pumaguard-ui/lib/models/camera.dart +45 -0
  90. pumaguard-ui/lib/models/plug.dart +45 -0
  91. pumaguard-ui/lib/models/settings.dart +112 -0
  92. pumaguard-ui/lib/models/status.dart +58 -0
  93. pumaguard-ui/lib/screens/directories_screen.dart +319 -0
  94. pumaguard-ui/lib/screens/home_screen.dart +545 -0
  95. pumaguard-ui/lib/screens/image_browser_screen.dart +1248 -0
  96. pumaguard-ui/lib/screens/server_discovery_screen.dart +390 -0
  97. pumaguard-ui/lib/screens/settings_screen.dart +1162 -0
  98. pumaguard-ui/lib/screens/wifi_settings_screen.dart +671 -0
  99. pumaguard-ui/lib/services/api_service.dart +717 -0
  100. pumaguard-ui/lib/services/camera_events_service.dart +195 -0
  101. pumaguard-ui/lib/services/mdns_service.dart +4 -0
  102. pumaguard-ui/lib/services/mdns_service_impl.dart +282 -0
  103. pumaguard-ui/lib/services/mdns_service_io.dart +1 -0
  104. pumaguard-ui/lib/services/mdns_service_web.dart +106 -0
  105. pumaguard-ui/lib/utils/download_helper.dart +2 -0
  106. pumaguard-ui/lib/utils/download_helper_stub.dart +6 -0
  107. pumaguard-ui/lib/utils/download_helper_web.dart +14 -0
  108. pumaguard-ui/lib/utils/platform_url.dart +10 -0
  109. pumaguard-ui/lib/utils/platform_url_stub.dart +11 -0
  110. pumaguard-ui/lib/utils/platform_url_web.dart +16 -0
  111. pumaguard-ui/linux/.gitignore +1 -0
  112. pumaguard-ui/linux/CMakeLists.txt +128 -0
  113. pumaguard-ui/linux/flutter/CMakeLists.txt +88 -0
  114. pumaguard-ui/linux/flutter/generated_plugin_registrant.cc +15 -0
  115. pumaguard-ui/linux/flutter/generated_plugin_registrant.h +15 -0
  116. pumaguard-ui/linux/flutter/generated_plugins.cmake +24 -0
  117. pumaguard-ui/linux/runner/CMakeLists.txt +26 -0
  118. pumaguard-ui/linux/runner/main.cc +6 -0
  119. pumaguard-ui/linux/runner/my_application.cc +148 -0
  120. pumaguard-ui/linux/runner/my_application.h +21 -0
  121. pumaguard-ui/macos/.gitignore +7 -0
  122. pumaguard-ui/macos/Flutter/Flutter-Debug.xcconfig +1 -0
  123. pumaguard-ui/macos/Flutter/Flutter-Release.xcconfig +1 -0
  124. pumaguard-ui/macos/Flutter/GeneratedPluginRegistrant.swift +16 -0
  125. pumaguard-ui/macos/Runner/AppDelegate.swift +13 -0
  126. pumaguard-ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +68 -0
  127. pumaguard-ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png +0 -0
  128. pumaguard-ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png +0 -0
  129. pumaguard-ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png +0 -0
  130. pumaguard-ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png +0 -0
  131. pumaguard-ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png +0 -0
  132. pumaguard-ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png +0 -0
  133. pumaguard-ui/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png +0 -0
  134. pumaguard-ui/macos/Runner/Base.lproj/MainMenu.xib +343 -0
  135. pumaguard-ui/macos/Runner/Configs/AppInfo.xcconfig +14 -0
  136. pumaguard-ui/macos/Runner/Configs/Debug.xcconfig +2 -0
  137. pumaguard-ui/macos/Runner/Configs/Release.xcconfig +2 -0
  138. pumaguard-ui/macos/Runner/Configs/Warnings.xcconfig +13 -0
  139. pumaguard-ui/macos/Runner/DebugProfile.entitlements +12 -0
  140. pumaguard-ui/macos/Runner/Info.plist +32 -0
  141. pumaguard-ui/macos/Runner/MainFlutterWindow.swift +15 -0
  142. pumaguard-ui/macos/Runner/Release.entitlements +8 -0
  143. pumaguard-ui/macos/Runner.xcodeproj/project.pbxproj +705 -0
  144. pumaguard-ui/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  145. pumaguard-ui/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +99 -0
  146. pumaguard-ui/macos/Runner.xcworkspace/contents.xcworkspacedata +7 -0
  147. pumaguard-ui/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  148. pumaguard-ui/macos/RunnerTests/RunnerTests.swift +12 -0
  149. pumaguard-ui/pubspec.lock +882 -0
  150. pumaguard-ui/pubspec.yaml +125 -0
  151. pumaguard-ui/test/models/camera_test.dart +515 -0
  152. pumaguard-ui/test/models/plug_test.dart +499 -0
  153. pumaguard-ui/test/models/settings_test.dart +903 -0
  154. pumaguard-ui/test/models/status_test.dart +707 -0
  155. pumaguard-ui/test/screens/image_browser_grouping_test.dart +555 -0
  156. pumaguard-ui/test/services/api_service_cameras_test.dart +580 -0
  157. pumaguard-ui/test/services/api_service_image_browser_test.dart +512 -0
  158. pumaguard-ui/test/widget_test.dart.skip +38 -0
  159. pumaguard-ui/web/favicon.png +0 -0
  160. pumaguard-ui/web/icons/Icon-192.png +0 -0
  161. pumaguard-ui/web/icons/Icon-512.png +0 -0
  162. pumaguard-ui/web/icons/Icon-maskable-192.png +0 -0
  163. pumaguard-ui/web/icons/Icon-maskable-512.png +0 -0
  164. pumaguard-ui/web/index.html +38 -0
  165. pumaguard-ui/web/manifest.json +35 -0
  166. pumaguard-ui/windows/.gitignore +17 -0
  167. pumaguard-ui/windows/CMakeLists.txt +108 -0
  168. pumaguard-ui/windows/flutter/CMakeLists.txt +109 -0
  169. pumaguard-ui/windows/flutter/generated_plugin_registrant.cc +14 -0
  170. pumaguard-ui/windows/flutter/generated_plugin_registrant.h +15 -0
  171. pumaguard-ui/windows/flutter/generated_plugins.cmake +24 -0
  172. pumaguard-ui/windows/runner/CMakeLists.txt +40 -0
  173. pumaguard-ui/windows/runner/Runner.rc +121 -0
  174. pumaguard-ui/windows/runner/flutter_window.cpp +71 -0
  175. pumaguard-ui/windows/runner/flutter_window.h +33 -0
  176. pumaguard-ui/windows/runner/main.cpp +43 -0
  177. pumaguard-ui/windows/runner/resource.h +16 -0
  178. pumaguard-ui/windows/runner/resources/app_icon.ico +0 -0
  179. pumaguard-ui/windows/runner/runner.exe.manifest +14 -0
  180. pumaguard-ui/windows/runner/utils.cpp +65 -0
  181. pumaguard-ui/windows/runner/utils.h +19 -0
  182. pumaguard-ui/windows/runner/win32_window.cpp +288 -0
  183. pumaguard-ui/windows/runner/win32_window.h +102 -0
  184. pumaguard-21.post27.dist-info/RECORD +0 -83
  185. {pumaguard-21.post27.dist-info → pumaguard-21.post83.dist-info}/WHEEL +0 -0
  186. {pumaguard-21.post27.dist-info → pumaguard-21.post83.dist-info}/entry_points.txt +0 -0
  187. {pumaguard-21.post27.dist-info → pumaguard-21.post83.dist-info}/licenses/LICENSE +0 -0
  188. {pumaguard-21.post27.dist-info → pumaguard-21.post83.dist-info}/top_level.txt +0 -0
pumaguard-ui/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
pumaguard-ui/Makefile ADDED
@@ -0,0 +1,36 @@
1
+ .PHONY: pre-commit
2
+ pre-commit: version analyze format build
3
+
4
+ .PHONY: analyze
5
+ analyze: version
6
+ flutter analyze
7
+
8
+ .PHONY: format
9
+ format:
10
+ dart format lib
11
+
12
+ .PHONY: version
13
+ version:
14
+ @echo "Checking for git repository..."
15
+ @if git rev-parse --git-dir > /dev/null 2>&1; then \
16
+ echo "Generating version from git tags..."; \
17
+ VERSION=$$(git describe --tags --always --dirty 2>/dev/null || echo "v0.0.0-unknown"); \
18
+ echo "// This file is auto-generated. Do not edit manually." > lib/version.dart; \
19
+ echo "// Generated by: make version" >> lib/version.dart; \
20
+ echo "const String appVersion = '$$VERSION';" >> lib/version.dart; \
21
+ echo "Generated version: $$VERSION"; \
22
+ else \
23
+ echo "Not in a git repository - preserving existing version.dart"; \
24
+ if [ ! -f lib/version.dart ]; then \
25
+ echo "No version.dart found, creating with default version..."; \
26
+ echo "// This file is auto-generated. Do not edit manually." > lib/version.dart; \
27
+ echo "// Generated by: make version" >> lib/version.dart; \
28
+ echo "const String appVersion = 'v0.0.0-unknown';" >> lib/version.dart; \
29
+ else \
30
+ echo "Using existing version.dart"; \
31
+ fi; \
32
+ fi
33
+
34
+ .PHONY: build
35
+ build: version
36
+ flutter build web --wasm
pumaguard-ui/README.md ADDED
@@ -0,0 +1,371 @@
1
+ # PumaGuard Web UI
2
+
3
+ A modern Flutter web interface for monitoring and configuring the PumaGuard wildlife detection system.
4
+
5
+ ## Features
6
+
7
+ - **Real-time Status Display**: View system status and monitoring information
8
+ - **Settings Management**: Configure YOLO detection and EfficientNet classifier parameters
9
+ - **Directory Management**: Add and remove image directories to monitor
10
+ - **Responsive Design**: Works on desktop and mobile browsers
11
+ - **Material Design 3**: Modern, clean UI with light/dark theme support
12
+
13
+ ## Screenshots
14
+
15
+ ### Home Screen
16
+
17
+ - System status indicator
18
+ - Quick access to settings and directories
19
+ - System information display
20
+
21
+ ### Settings Screen
22
+
23
+ - YOLO detection parameters (min size, confidence threshold, max detections)
24
+ - Classifier model configuration
25
+ - Sound deterrent settings
26
+ - System behavior options
27
+
28
+ ### Directories Screen
29
+
30
+ - List of monitored directories
31
+ - Add/remove directories with confirmation
32
+ - Empty state with helpful guidance
33
+
34
+ ## Prerequisites
35
+
36
+ - Flutter SDK (3.10.0 or later)
37
+ - Dart SDK (included with Flutter)
38
+ - PumaGuard backend server running
39
+
40
+ ## Installation
41
+
42
+ 1. Install Flutter dependencies:
43
+
44
+ ```bash
45
+ cd web-ui-flutter
46
+ flutter pub get
47
+ ```
48
+
49
+ 2. Run code generation (if needed):
50
+ ```bash
51
+ flutter pub run build_runner build --delete-conflicting-outputs
52
+ ```
53
+
54
+ ## Development
55
+
56
+ ### Version Management
57
+
58
+ The UI version is automatically generated from git tags. The version file `lib/version.dart` is auto-generated and should not be edited manually.
59
+
60
+ To generate/update the version:
61
+
62
+ ```bash
63
+ make version
64
+ ```
65
+
66
+ This will read the current git tag (from `git describe --tags`) and update `lib/version.dart`.
67
+
68
+ ### Run in Development Mode
69
+
70
+ Start the Flutter development server:
71
+
72
+ ```bash
73
+ make version # Generate version first
74
+ flutter run -d chrome
75
+ ```
76
+
77
+ Or for web server mode:
78
+
79
+ ```bash
80
+ flutter run -d web-server --web-hostname=0.0.0.0 --web-port=8080
81
+ ```
82
+
83
+ ### Hot Reload
84
+
85
+ When running in development mode, press `r` to hot reload or `R` to hot restart.
86
+
87
+ ## Building for Production
88
+
89
+ ### Build Web App
90
+
91
+ The build process automatically generates the version from git tags:
92
+
93
+ ```bash
94
+ make build # This runs 'make version' then 'flutter build web --wasm'
95
+ ```
96
+
97
+ Or manually:
98
+
99
+ ```bash
100
+ flutter build web --release
101
+ ```
102
+
103
+ The built files will be in `build/web/` directory.
104
+
105
+ ### Build Options
106
+
107
+ For optimized builds:
108
+
109
+ ```bash
110
+ # Build with web renderer
111
+ flutter build web --web-renderer canvaskit
112
+
113
+ # Build with HTML renderer (smaller size)
114
+ flutter build web --web-renderer html
115
+
116
+ # Build with auto-selection
117
+ flutter build web --web-renderer auto
118
+ ```
119
+
120
+ ### Makefile Targets
121
+
122
+ The project includes a Makefile for common development tasks:
123
+
124
+ ```bash
125
+ make version # Generate version.dart from git tags
126
+ make analyze # Run Flutter analyzer
127
+ make format # Format Dart code
128
+ make build # Build for production (includes version generation)
129
+ make pre-commit # Run all checks (analyze, format, build)
130
+ ```
131
+
132
+ ## Configuration
133
+
134
+ ### API Endpoint
135
+
136
+ By default, the app connects to `http://localhost:5000`. To change this, modify the `ApiService` constructor in `lib/services/api_service.dart`:
137
+
138
+ ```dart
139
+ ApiService({this.baseUrl = 'http://your-server:5000'});
140
+ ```
141
+
142
+ Or set it at runtime when creating the provider in `lib/main.dart`:
143
+
144
+ ```dart
145
+ Provider<ApiService>(
146
+ create: (_) => ApiService(baseUrl: 'http://your-server:5000'),
147
+ // ...
148
+ )
149
+ ```
150
+
151
+ ## Project Structure
152
+
153
+ ```
154
+ lib/
155
+ ├── main.dart # App entry point
156
+ ├── models/ # Data models
157
+ │ ├── status.dart # System status model
158
+ │ └── settings.dart # Settings model
159
+ ├── screens/ # UI screens
160
+ │ ├── home_screen.dart # Main dashboard
161
+ │ ├── settings_screen.dart # Settings configuration
162
+ │ └── directories_screen.dart # Directory management
163
+ ├── services/ # API services
164
+ │ └── api_service.dart # Backend API client
165
+ └── widgets/ # Reusable widgets
166
+ ```
167
+
168
+ ## API Integration
169
+
170
+ The Flutter app communicates with the PumaGuard backend via REST API:
171
+
172
+ - `GET /api/status` - Get system status
173
+ - `GET /api/settings` - Get current settings
174
+ - `PUT /api/settings` - Update settings
175
+ - `POST /api/settings/save` - Save settings to file
176
+ - `POST /api/settings/load` - Load settings from file
177
+ - `GET /api/directories` - Get monitored directories
178
+ - `POST /api/directories` - Add directory
179
+ - `DELETE /api/directories/:index` - Remove directory
180
+
181
+ ## Starting the Backend
182
+
183
+ Before using the web UI, start the PumaGuard backend server:
184
+
185
+ ```bash
186
+ # From the project root
187
+ python -m pumaguard.web_ui --host 0.0.0.0 --port 5000
188
+ ```
189
+
190
+ With settings and image directories:
191
+
192
+ ```bash
193
+ python -m pumaguard.web_ui \
194
+ --host 0.0.0.0 \
195
+ --port 5000 \
196
+ --settings settings.yaml \
197
+ --image-dir /path/to/images1 \
198
+ --image-dir /path/to/images2
199
+ ```
200
+
201
+ ## Deployment
202
+
203
+ ### Option 1: Serve with Backend
204
+
205
+ The PumaGuard backend automatically serves the built Flutter web app from `web-ui-flutter/build/web/`.
206
+
207
+ 1. Build the Flutter app:
208
+
209
+ ```bash
210
+ cd web-ui-flutter
211
+ flutter build web --release
212
+ ```
213
+
214
+ 2. Start the backend server:
215
+
216
+ ```bash
217
+ cd ..
218
+ python -m pumaguard.web_ui --host 0.0.0.0 --port 5000
219
+ ```
220
+
221
+ 3. Access the UI at `http://localhost:5000`
222
+
223
+ ### Option 2: Serve Separately
224
+
225
+ Deploy the `build/web/` directory to any web server (nginx, Apache, etc.) and configure CORS on the backend.
226
+
227
+ Example nginx configuration:
228
+
229
+ ```nginx
230
+ server {
231
+ listen 80;
232
+ server_name pumaguard.local;
233
+
234
+ root /path/to/web-ui-flutter/build/web;
235
+ index index.html;
236
+
237
+ location / {
238
+ try_files $uri $uri/ /index.html;
239
+ }
240
+
241
+ location /api/ {
242
+ proxy_pass http://localhost:5000/api/;
243
+ proxy_http_version 1.1;
244
+ proxy_set_header Upgrade $http_upgrade;
245
+ proxy_set_header Connection 'upgrade';
246
+ proxy_set_header Host $host;
247
+ proxy_cache_bypass $http_upgrade;
248
+ }
249
+ }
250
+ ```
251
+
252
+ ## Troubleshooting
253
+
254
+ ### Cannot Connect to Backend
255
+
256
+ **Error**: `Failed to connect to PumaGuard server`
257
+
258
+ **Solutions**:
259
+
260
+ 1. Ensure the backend server is running
261
+ 2. Check the backend URL in `api_service.dart`
262
+ 3. Verify CORS is enabled on the backend (it should be by default)
263
+ 4. Check firewall settings
264
+
265
+ ### Flutter Build Issues
266
+
267
+ **Error**: `Packages are not up to date`
268
+
269
+ **Solution**:
270
+
271
+ ```bash
272
+ flutter pub get
273
+ ```
274
+
275
+ **Error**: `Cannot find module 'canvaskit'`
276
+
277
+ **Solution**:
278
+
279
+ ```bash
280
+ flutter clean
281
+ flutter pub get
282
+ flutter build web
283
+ ```
284
+
285
+ ### Settings Not Saving
286
+
287
+ **Symptoms**: Settings appear to save but don't persist
288
+
289
+ **Solutions**:
290
+
291
+ 1. Check backend logs for errors
292
+ 2. Verify write permissions on settings file
293
+ 3. Ensure settings file path is correctly configured in backend
294
+
295
+ ## Development Tips
296
+
297
+ ### Adding New Settings
298
+
299
+ 1. Add field to `Settings` model in `lib/models/settings.dart`
300
+ 2. Update `fromJson` and `toJson` methods
301
+ 3. Add UI control in `lib/screens/settings_screen.dart`
302
+ 4. Update backend to handle new setting
303
+
304
+ ### Customizing Theme
305
+
306
+ Edit the `ThemeData` in `lib/main.dart`:
307
+
308
+ ```dart
309
+ colorScheme: ColorScheme.fromSeed(
310
+ seedColor: const Color(0xFF8B4513), // Change this color
311
+ brightness: Brightness.light,
312
+ ),
313
+ ```
314
+
315
+ ### Adding New Screens
316
+
317
+ 1. Create screen file in `lib/screens/`
318
+ 2. Add navigation in `home_screen.dart` or app bar
319
+ 3. Update routing if using named routes
320
+
321
+ ## Testing
322
+
323
+ Run tests:
324
+
325
+ ```bash
326
+ flutter test
327
+ ```
328
+
329
+ Run integration tests:
330
+
331
+ ```bash
332
+ flutter test integration_test/
333
+ ```
334
+
335
+ ## Dependencies
336
+
337
+ Main dependencies:
338
+
339
+ - `flutter` - Flutter SDK
340
+ - `http` ^1.1.0 - HTTP requests
341
+ - `provider` ^6.1.0 - State management
342
+ - `intl` ^0.19.0 - Internationalization
343
+
344
+ Dev dependencies:
345
+
346
+ - `flutter_test` - Testing framework
347
+ - `flutter_lints` ^6.0.0 - Linting rules
348
+ - `build_runner` ^2.4.0 - Code generation
349
+ - `json_serializable` ^6.7.0 - JSON serialization
350
+
351
+ ## Contributing
352
+
353
+ 1. Follow Flutter style guidelines
354
+ 2. Run `flutter analyze` before committing
355
+ 3. Format code with `flutter format lib/`
356
+ 4. Add tests for new features
357
+
358
+ ## License
359
+
360
+ Same as PumaGuard project.
361
+
362
+ ## Support
363
+
364
+ For issues, see the main PumaGuard documentation or file an issue on the project repository.
365
+
366
+ ## Related Documentation
367
+
368
+ - [PumaGuard Main README](../README.md)
369
+ - [Backend API Documentation](../docs/api.md)
370
+ - [Flutter Documentation](https://flutter.dev/docs)
371
+ - [Material Design 3](https://m3.material.io/)