An open API service indexing awesome lists of open source software.

https://github.com/rollecode/mastodon-user-analytics

🐘 Privacy-first analytics for your Mastodon account.
https://github.com/rollecode/mastodon-user-analytics

analytics mastodon mastodon-analytics mastodon-api parcel privacy-first

Last synced: 29 days ago
JSON representation

🐘 Privacy-first analytics for your Mastodon account.

Awesome Lists containing this project

README

          

# Mastodon user analytics

![JavaScript](https://img.shields.io/badge/JavaScript-f7df1e?style=for-the-badge&logo=javascript&logoColor=black)
![Mastodon](https://img.shields.io/badge/Mastodon-6364ff?style=for-the-badge&logo=mastodon&logoColor=white)

> [!NOTE]
> **WIP Notice:** This tool is currently in early testing version.

Privacy-first analytics for your Mastodon account. **No data stored on servers** - all processing happens locally in your browser.

## Features

- OAuth authentication with **read-only permissions** only
- Instance autocomplete powered by Mastodon's peer search API
- Dashboard with follower/following/post counts
- Most boosted and most favorited posts
- Posting activity over time
- Engagement charts (boosts and favorites)
- Posts by day of week and hour of day
- Post types breakdown (original, replies, with media)
- Follower count change tracking with percentage
- Time range filtering (7 days to all time)
- FAQ section explaining privacy and permissions

## Privacy

This app is designed with privacy as the top priority:

- **Read-only access** - We only request `read:accounts` and `read:statuses` scopes
- **No backend server** - Everything runs in your browser
- **No data collection** - Your data never leaves your device
- **No tracking** - No analytics, no cookies, no fingerprinting
- **Open source** - Verify the code yourself

Your access token is stored only in your browser's localStorage and is never transmitted anywhere except directly to your Mastodon instance.

## Development

### Requirements

- Node.js 18+
- npm

### Setup

```bash
git clone https://github.com/ronilaukkarinen/mastodon-user-analytics.git
cd mastodon-user-analytics
npm install
```

### Commands

```bash
npm run dev # Start development server
npm run build # Build for production
npm run clean # Clean build artifacts
```

### Tech stack

| Package | Purpose |
|---------|---------|
| Parcel | Build tool and dev server |
| SCSS | Styling with variables |
| ApexCharts | Charts and visualizations |

## How it works

1. Enter your Mastodon instance (e.g., `mastodon.social` or `user@instance.tld`)
2. Authorize read-only access via OAuth
3. The app fetches your posts directly from your instance's API
4. All statistics are calculated in your browser
5. Nothing is sent anywhere except API requests to your own instance

## Revoking access

To revoke this app's access to your account:

1. Go to your Mastodon instance's settings
2. Navigate to **Account** > **Authorized apps**
3. Find "Mastodon user analytics" and click **Revoke**

You can also click "Logout" in the app to clear your local session.