diff --git a/FAQ.md b/FAQ.md
index 72af5192..ace2e0d2 100644
--- a/FAQ.md
+++ b/FAQ.md
@@ -867,3 +867,20 @@ $ ./bin/console help
```
For more information, please refer to the [Dockerfile](/Dockerfile). On how we do things to get the tool running.
+
+---
+
+### How does the file integrity feature works?
+
+The feature first scan your entire history for reported media file paths. then we will do stat check on each point of the path starting from lowest to highest.
+
+For example lets say your media file is `/media/series/season 1/episode 1.mkv`
+
+We do the following. `/media` exists or not? if it does we move to the next path `/media/series` exists or not? if it does we move to the next path `/media/series/season 1` exists or not? if it does we move to the next path `/media/series/season 1/episode 1.mkv` exists or not? if it does we move to the next path.
+
+Using this approach allow us to cache calls and reduce unnecessary calls to the filesystem. If you have for example `/media/seriesX/` with thousands of files,
+and the root `/media/seriesX` doesn't exists we dont have to call stat for every file, instead using the cache we determine that the file doesn't exist.
+
+Of course, every stat call is cached, so if 1 or more backends are reporting the same file path, we only do the stat check once. This is to reduce the load on the filesystem.
+
+---
diff --git a/NEWS.md b/NEWS.md
index fe4083be..a5231118 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,43 @@
# Old Updates
+### 2024-07-06
+
+Recently we have introduced a new feature that allows you to use Jellyfin and Emby OAuth access tokens for syncing
+your play state. This is especially handy if you're not the server owner and can't create API keys. Please note, this
+feature is in its experimental phase, so you might encounter some issues as we yet to explorer the full depth of the
+implementation. We're actively working on making it better, If you have any feedback or suggestions, please let us know.
+
+Getting your OAuth token is easy. When prompted, simply enter your `username:password` in place of the API key through
+the `WebUI` or the `config:add/manage` command. `WatchState` will automatically contact the backend and generate the
+token for you, as this step is required to get more information like your `User ID` which is sadly inaccessible without
+us generating the token. Both Emby & Jellyfin doesn't provide an API endpoint to inquiry about the current user.
+
+We have also added new `config:test` command to run functional tests on your backends, this will not alter your state,
+And it's quite useful to know if the tool is able to communicate with your backends. without problems, It will report
+the following, `OK` which mean the indicated test has passed, `FA` which mean the indicated test has failed. And `SK`
+which mean the indicated test has been skipped or not yet implemented.
+
+### 2024-06-23
+
+WE are happy to announce that the `WebUI` is ready for wider usage and we are planning to release it in the next few
+months.
+We are actively working on it to improve it. If you have any feedback or suggestions, please let us know. We feel it's
+almost future complete
+for the things that we want.
+
+On another related news, we have added new environment variable `WS_API_AUTO` "disabled by default" which can be used
+to automatically expose your **API KEY/TOKEN**. This is useful for users who are using the `WebUI` from many different
+browsers
+and want to automate the configuration process.
+
+While the `WebUI` is included in the main project, it's a standalone feature and requires the API settings to be
+configured before it
+can be used. This environment variable can be enabled by setting `WS_API_AUTO=true` in `${WS_DATA_PATH}/config/.env`.
+
+> [!IMPORTANT]
+> This environment variable is **GREAT SECURITY RISK**, and we strongly recommend not to use it if `WatchState` is
+> exposed to the internet.
+
### 2024-05-14
We are happy to announce the beta testing of the `WebUI`. To get started on using it you just need to visit the url `http://localhost:8080` We are supposed to
diff --git a/README.md b/README.md
index 3580a107..096c5da8 100644
--- a/README.md
+++ b/README.md
@@ -9,43 +9,20 @@ out of the box, this tool support `Jellyfin`, `Plex` and `Emby` media servers.
## Updates
-### 2024-07-06
+### 2024-07-22
-Recently we have introduced a new feature that allows you to use Jellyfin and Emby OAuth access tokens for syncing
-your play state. This is especially handy if you're not the server owner and can't create API keys. Please note, this
-feature is in its experimental phase, so you might encounter some issues as we yet to explorer the full depth of the
-implementation. We're actively working on making it better, If you have any feedback or suggestions, please let us know.
+We have recently added a new WebUI feature, `File integrity`, this feature will help you to check if your media backends
+are reporting files that are not available on the disk. This feature is still in alpha, and we are working on improving
+it.
-Getting your OAuth token is easy. When prompted, simply enter your `username:password` in place of the API key through
-the `WebUI` or the `config:add/manage` command. `WatchState` will automatically contact the backend and generate the
-token for you, as this step is required to get more information like your `User ID` which is sadly inaccessible without
-us generating the token. Both Emby & Jellyfin doesn't provide an API endpoint to inquiry about the current user.
+This feature `REQUIRES` that you mount your media directories to the `WatchState` container preferably as readonly. There is plans to add
+a path replacement feature to allow you change the pathing, but it's not implemented yet.
-We have also added new `config:test` command to run functional tests on your backends, this will not alter your state,
-And it's quite useful to know if the tool is able to communicate with your backends. without problems, It will report
-the following, `OK` which mean the indicated test has passed, `FA` which mean the indicated test has failed. And `SK`
-which mean the indicated test has been skipped or not yet implemented.
+This feature will work on both local and remote cloud storages provided they are mounted into the container. We also may recommend not to
+use this feature depending on how your cloud storage provider treats file stat calls. As it might lead to unnecessary money spending. and of course
+it will be slower.
-### 2024-06-23
-
-WE are happy to announce that the `WebUI` is ready for wider usage and we are planning to release it in the next few
-months.
-We are actively working on it to improve it. If you have any feedback or suggestions, please let us know. We feel it's
-almost future complete
-for the things that we want.
-
-On another related news, we have added new environment variable `WS_API_AUTO` "disabled by default" which can be used
-to automatically expose your **API KEY/TOKEN**. This is useful for users who are using the `WebUI` from many different
-browsers
-and want to automate the configuration process.
-
-While the `WebUI` is included in the main project, it's a standalone feature and requires the API settings to be
-configured before it
-can be used. This environment variable can be enabled by setting `WS_API_AUTO=true` in `${WS_DATA_PATH}/config/.env`.
-
-> [!IMPORTANT]
-> This environment variable is **GREAT SECURITY RISK**, and we strongly recommend not to use it if `WatchState` is
-> exposed to the internet.
+For more information about how we cache the stat calls, please refer to the [FAQ](FAQ.md#How-does-the-file-integrity-feature-works).
Refer to [NEWS](NEWS.md) for old updates.
diff --git a/frontend/layouts/default.vue b/frontend/layouts/default.vue
index 3b69cd7d..dd0891a6 100644
--- a/frontend/layouts/default.vue
+++ b/frontend/layouts/default.vue
@@ -68,6 +68,11 @@
Data Parity
+
+
+
+ Files Integrity
+
diff --git a/frontend/pages/integrity.vue b/frontend/pages/integrity.vue
new file mode 100644
index 00000000..f8be44dd
--- /dev/null
+++ b/frontend/pages/integrity.vue
@@ -0,0 +1,386 @@
+
+
+
+
+
+
+ Files Integrity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This page will show records with files that no longer exist on the system.
+
+
+
+
+
+
+
+ The filter {{ filter }} did not match any records.
+
+
+ WatchState did not find any file references that are no longer on the system.
+
+
+
+
+
+
+
+
+
Request File integrity check.
+
+
+
+
+
+ Please be aware, this process will take time. You will see the spinner while WatchState
+ is analyzing the entire history records. Do not reload the page.
+
+
This check REQUIRES that the file contents be accessible to
+ WatchState. You should mount your library in compose.yml file as readonly.
+ If you do not mount your library. every record will fail the check.
+
+
There are no path replacement support at the moment. The pathing must match what your media servers
+ are reporting. There are plans to add this feature in the future.
+
+
This process will do two checks, One will do dir stat on the file directory, and file stat on the
+ file itself if the directory exists. If you are using cloud storage, we
+ recommend to not use this check. as it will be slow. and probably will cost you a lot of
+ money.
+
+
The process caches the file and dir stat, as such we only run stat once per file or directory no
+ matter how many backends reports the same path or file.
+
+
The results are cached server side for one hour from the request.