doc: add Readme and information in package.json

This commit is contained in:
Samuel 2025-01-23 21:36:23 +01:00
parent 7d5a5d99ef
commit 468cb2154e
2 changed files with 49 additions and 37 deletions

View file

@ -1,36 +1,51 @@
## Usage # Signalstats
Those templates dependencies are maintained via [pnpm](https://pnpm.io) via `pnpm up -Lri`. This project lets you see all the statistics of your [Signal](https://signal.org) chats.
This is the reason you see a `pnpm-lock.yaml`. That being said, any package manager will work. This file can be safely be removed once you clone a template. - Get insights on your chats: How many messages have you written? At what daytime? Which words do you use the most?
- Privacy friendly: no data is sent to a server, everything happens on your device
```bash You can try the hosted version on [signalstats.duskflower.dev](https://signalstats.duskflower.dev) or run the code on your own machine.
$ npm install # or pnpm install or yarn install This project was created as an alternative to [WhatsAnalyze](https://whatsanalyze.com/) for the Signal messenger.
## How it works
Since Signal doesn't let you export chats as unencrypted text or zip files like WhatsApp, the only way to get Signal chat data is to use the backup function. Sadly, local backups are to my knowledge currently only available on Android devices.
A backup contains the database (the database statements needed to create the database) with all the messages, recipients, groups and much more, and also attachments, stickers and avatars.
Since that is quite a big amount of _encrypted_ data (easily multiple GBs), I chose to implement the decryption in [WebAssembly](https://developer.mozilla.org/en-US/docs/WebAssembly) using Rust and tried to optimize the code for performance. The code for the decryption can be found at [signal-decrypt-backup-wasm](https://git.duskflower.dev/duskflower/signal-decrypt-backup-wasm) and is based on [signal_for_android_decryption](https://github.com/mossblaser/signal_for_android_decryption).
After the decryption, all the database statements are executed on a WebAssembly database using [@sqlite.org/sqlite-wasm](https://github.com/sqlite/sqlite-wasm) and after that it is possible to execute queries on the database to obtain the data needed for statistics.
## Encountered an issue
Please report bugs in the [Github issues](https://github.com/apollo79/signalstats/issues).
## Developing and running the code locally
This project is built as an Single-page application using [SolidJS](https://solidjs.com).
```shell
# clone the repository
git clone https://git.duskflower.dev/duskflower/signalstats.git
# go to the project directory
cd signalstats
# install the dependencies
pnpm install # or npm install or yarn install
# to run the development version
pnpm dev
# or
pnpm start
# to build the project
pnpm build
# you can preview the build by running
pnpm serve
``` ```
### Learn more on the [Solid Website](https://solidjs.com) and come chat with us on our [Discord](https://discord.com/invite/solidjs) `pnpm build` will create the `dist` folder which you can serve as a static site.
## Available Scripts
In the project directory, you can run:
### `npm run dev` or `npm start`
Runs the app in the development mode.<br>
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
The page will reload if you make edits.<br>
### `npm run build`
Builds the app for production to the `dist` folder.<br>
It correctly bundles Solid in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.<br>
Your app is ready to be deployed!
## Deployment
You can deploy the `dist` folder to any static host provider (netlify, surge, now, etc.)
## This project was created with the [Solid CLI](https://solid-cli.netlify.app)

View file

@ -1,7 +1,7 @@
{ {
"name": "vite-template-solid", "name": "signalstats",
"version": "0.0.0", "version": "0.0.0",
"description": "", "description": "Watch your signal messenger statistics",
"type": "module", "type": "module",
"scripts": { "scripts": {
"start": "vite", "start": "vite",
@ -57,9 +57,6 @@
"zen-mitt": "^3.0.0" "zen-mitt": "^3.0.0"
}, },
"lint-staged": { "lint-staged": {
"*.{ts,tsx}": [ "*.{ts,tsx}": ["biome lint", "biome format"]
"biome lint",
"biome format"
]
} }
} }