Commit Graph

3010 Commits

Author SHA1 Message Date
KernelDeimos
055ba7d9df dev: move recommended apps to service with cache invalidation
Adds an event for app invalidation.

Moves iconify_apps to AppIconService and adds RecommenededAppsService,
which holds some logic that used to be in get-launch-apps. The event for
app invalidation is then used by RecommenededAppsService to determine
when to clear the recommended apps cache.
2024-12-30 12:38:51 -05:00
KernelDeimos
c1961dd54e dev: move app services to apps module
Moves AppIconService, OldAppNameService, and ProtectedAppService to the
new apps module to keep things organized, and updates imports. There
were no interesting init errors. Services creating a database at init
were tested for failures but this wasn't an issue. It turns out
initializing with a database accessor before the db service inits is
okay, but using that database accessor at init is not.
2024-12-30 11:03:27 -05:00
KernelDeimos
2de442be92 dev: add apps module, migrate AppInformationService
There are now several services related to apps, and
RecommendedAppsService is about to be added, making this a good time to
create a separate module for these services and migrate the legacy
service AppInformationService.

During migration it was realized that most of the initialization needed
to occur at boot.consolidation rather than boot.init because the
database needs to be initialized first.
2024-12-30 10:19:02 -05:00
jelveh
3ffb3cbc74 Remove credentialless from Dev Center advanced section 2024-12-29 22:13:11 -08:00
jelveh
a105192882 Update dev-center.js 2024-12-29 21:53:43 -08:00
jelveh
3b60e9913e Update dev-center.js 2024-12-29 19:25:13 -08:00
jelveh
cc0abf9f3b Update style.css 2024-12-29 18:47:32 -08:00
jelveh
0d0f429bd8 Add icons to dev center sub tabs 2024-12-29 18:44:06 -08:00
jelveh
c9fe08cea5 Update style.css 2024-12-29 18:00:12 -08:00
jelveh
5da8872315 Update dev-center.js 2024-12-29 17:20:59 -08:00
jelveh
be24f2acec Update dev-center.js 2024-12-29 16:53:09 -08:00
jelveh
bc0e7e12b5 Add better grouping and chart labeling for dev center analytics 2024-12-29 16:42:31 -08:00
jelveh
4f88ee37de Analytics for apps 😎 2024-12-29 14:55:59 -08:00
Nariman Jelveh
3b7a051d79
Add Ritesh Sahu to SECURITY-ACKNOWLEDGEMENTS.md 2024-12-29 10:24:33 -08:00
jelveh
2bdaac6177 Update fuzz.js 2024-12-28 16:49:26 -08:00
jelveh
14cb77d544 Update fuzz.js 2024-12-28 15:42:40 -08:00
jelveh
c58788805d Update dev-center.js 2024-12-28 14:48:01 -08:00
jelveh
3eff05d97d add a little STYLE to analytics 2024-12-27 22:05:15 -08:00
jelveh
116c3d358a add simple analytics tab for Dev Center 2024-12-27 21:52:17 -08:00
jelveh
ac8068a139 No need for params when passing params to Apps driver 2024-12-27 18:24:09 -08:00
jelveh
d7aa08b345 Revert "if clichouse exists hit it in _refresh_app_stats"
This reverts commit 9867d26432.
2024-12-27 17:53:43 -08:00
jelveh
9867d26432 if clichouse exists hit it in _refresh_app_stats 2024-12-27 17:47:19 -08:00
jelveh
7252d2ef4f Check cache first when returning stats for the all period in the AppInformationService 2024-12-27 17:21:17 -08:00
jelveh
027f52d0fd Update AppInformationService.js 2024-12-27 16:55:31 -08:00
jelveh
9f5a138047 add analytics to the Apps driver 2024-12-27 14:39:51 -08:00
KernelDeimos
c3fb0bca41 doc: document how to create a driver 2024-12-27 17:23:30 -05:00
KernelDeimos
396498f88a dev: try a different approach for trigger_download 2024-12-27 15:27:03 -05:00
KernelDeimos
5e844205b3 dev: update/cleanup PerformanceMonitor 2024-12-27 13:15:55 -05:00
KernelDeimos
33d094322f dev: change cache score for fs 2024-12-27 10:58:53 -05:00
jelveh
8daf1a5469 Update keyboard.js 2024-12-26 20:57:40 -08:00
jelveh
c58c0facda Update get-launch-apps.js 2024-12-26 20:30:20 -08:00
jelveh
93aa83bdf7 change apps in taskbar and launcher 2024-12-26 20:21:46 -08:00
jelveh
5f5eeb2a06 Use alerts to show error message when signing up temp user 2024-12-26 17:28:46 -08:00
jelveh
e74aa13187 Send puter.signup event before signup process starts 2024-12-26 17:14:11 -08:00
jelveh
76654e65de Fix the issue with contextmenu going completely nuts when opened near the right edge of the screen 2024-12-26 13:43:34 -08:00
jelveh
68fb7e8291 Update AppInformationService.js 2024-12-25 18:26:20 -08:00
jelveh
e263c2be95 Update AppInformationService.js 2024-12-25 18:21:36 -08:00
jelveh
89eb6a80e1 AppInformationService can now use clickhouse to pull metrics 2024-12-25 17:57:22 -08:00
jelveh
3d32f4123b Send more infor in the puter.app_open event 2024-12-24 22:52:07 -08:00
KernelDeimos
efd4730f75 fix: prefix peer addresses with protocol 2024-12-24 16:49:22 -05:00
KernelDeimos
d386096467 feat: hash-based distributed cache inval 2024-12-24 16:19:58 -05:00
KernelDeimos
eb7494ce55 dev: measure cache rate and fix an edge-case 2024-12-24 14:04:22 -05:00
KernelDeimos
7c29d7c16d dev: smaller readdir app icons 2024-12-24 13:11:39 -05:00
KernelDeimos
498d6ed3d8 clean: remove unnecessary additional method 2024-12-23 15:49:15 -05:00
KernelDeimos
728ecbfb03 fix: clone message object 2024-12-23 15:27:25 -05:00
KernelDeimos
35cc83a560 dev: filter topic ARNs (and tweaks) 2024-12-23 14:58:39 -05:00
KernelDeimos
5ed2f39ec7 dev: add Amazon SNS integration
There were a few things which made this rather difficult:
- AWS SDK doesn't appear to have a utility to validate message
  signatures.
- The only available node.js module that does this is known to be
  unreliable.
- SNS sends 'text/plain' MIME type even though the data is in JSON
  format, so a middleware had to be added to account for this.
- We don't accept POST requests with no Origin header. Since SNS doesn't
  send the Origin header, an exception had to be made for this.
- The endpoint needs to be public and SNS doesn't seem to have a
  proxying utility for developers such as what Stripe has.
- Because of the above point, debugging time was affected by deployment
  time to the staging server.
2024-12-23 14:53:18 -05:00
KernelDeimos
2dc6c4737b fix: timing for PrefixLogger call to /whoami
This commit fixes the timing of the /whoami call used for the
PrefixLogger (a logger for puter.js that displays app names) to ensure
the API origin and token are available. This is done by waiting for a
service called 'api-access' to be initialized first.

This was discovered while testing changes for /whoami responses that
display icons, because the current behavior breaks the call for
non-puter.com instances.
2024-12-23 11:50:30 -05:00
KernelDeimos
cb2653b84d dev: no icons form /whoami calls without icon_size
Calls to `/whoami` generally don't require app icons. Fetching icons of
the smallest size still incurs round-trip latency from the database and
S3, as well as additional delay for any retries due to failed icon
generation.

Although this is technically a regression in `/whoami`, the impact is
localized to Puter's desktop only because apps are not allowed to
receive taskbar icons.
2024-12-23 11:26:44 -05:00
KernelDeimos
d1bec45df6 dev: fallback icon read 2024-12-23 10:45:04 -05:00