# Documentation

<figure><img src="https://4200666982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAJTYpi6vsWQV0BYdOWD2%2Fuploads%2FnhlFBuPFi4GQTCmrwURZ%2FDocumentation.jpg?alt=media&#x26;token=e7a9f81b-7a02-4948-b9d1-41013c2d8340" alt=""><figcaption></figcaption></figure>

## Overview

FourYourSafety (FYS) is a comprehensive crypto-Twitter intelligence browser extension designed to track, monitor, and analyze activities on Twitter/X related to cryptocurrency. The extension provides real-time intelligence on deleted tweets, token addresses, follower changes, and profile modifications.  Enabling traders and researchers to make better decisions.

## How to Install

* In the github, click on the green button "Code" in the top right of the repo
* Download ZIP

<div align="left"><figure><img src="https://4200666982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAJTYpi6vsWQV0BYdOWD2%2Fuploads%2Fl1FuxmtIQrsTNkYasvuw%2Fimage.png?alt=media&#x26;token=6d9af922-4fdd-47da-a492-3ee32673f241" alt="" width="301"><figcaption></figcaption></figure></div>

* Extract the folder called "FYS Extension" from the zip file
* Go to [chrome://extensions](chrome://extensions/)
* Enable developer mode in the top right
* Drag the folder you just extracted and drop it in this screen
* Ensure that the slider is turned on and the extension is active
* Alternatively: click on "Load Unpacked" in the top left and select the folder to import it that way

If done correctly, you should see the screen below. You've succesfully installed FYS!

<div align="left"><figure><img src="https://4200666982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAJTYpi6vsWQV0BYdOWD2%2Fuploads%2Fz2WcdJqbmK1TW6LBZul4%2Fimage.png?alt=media&#x26;token=320b9209-f095-4bc0-8e95-2eb19b24a9ba" alt=""><figcaption></figcaption></figure></div>

### How to Use

* Visit any X page, let's take [x.com/yeguybsc](https://x.com/yeguybsc) as example
* Click on the newly-appeared FYS icon bubble next to the Follow button
* From here, you can navigate to which data you want to access

<div align="left"><figure><img src="https://4200666982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAJTYpi6vsWQV0BYdOWD2%2Fuploads%2FFzAW9CWpB7GjfZLkRiAV%2Fimage.png?alt=media&#x26;token=7936f3d7-255a-4df3-b08c-d3f6b5e2b0f9" alt="" width="452"><figcaption></figcaption></figure></div>

* We are now greeted with a plethora of features within this pop up
* If we want to see their CA's, just click on "Contracts" and wait for it to fetch all their (deleted) tweets
* You will see the CA, coin metrics, original tweet and it's contents. Even if deleted
* The same works for the other functions, straightforward and do exactly what they're called

<div align="left"><figure><img src="https://4200666982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAJTYpi6vsWQV0BYdOWD2%2Fuploads%2FhcucKQzbiGFeeJkbyo1I%2Fimage.png?alt=media&#x26;token=d77a7863-e504-4fa8-99ec-b298bbdbc05f" alt="" width="563"><figcaption></figcaption></figure></div>

### Deleted Tweets Tracking

* Archives deleted tweets from crypto influencers
* Prevents loss of key information that gets removed
* Real-time monitoring and archival system

### Contract Address (CA) Tracking

* Monitors deleted token addresses and contract changes
* Identifies rug pulls and suspicious activities
* Detects when profiles/projects/influencers remove token promotion tweets

### First Followers Analysis

* Identifies the first followers of new accounts
* Reveals early supporters and potential insider connections

### Profile Changes Monitoring

* Tracks bio and username changes over time
* Detects rebranding attempts and identity shifts

### Key Followers Analysis

* Analyzes follower networks
* Identifies key influencers and connection patterns

### Real-time Alerts (Coming Soon)

{% hint style="info" %}
Instant notifications for suspicious activities, including deleted tweets and profile changes (feature planned).
{% endhint %}

## Technical Architecture

<figure><img src="https://4200666982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAJTYpi6vsWQV0BYdOWD2%2Fuploads%2FKNfl3hlOnFGlNWwpZCyG%2Ftechstack.png?alt=media&#x26;token=0d617ab6-26c6-460c-8eaa-fd9949dec94a" alt=""><figcaption></figcaption></figure>

### Extension Stack

* Language: JavaScript (core extension)
* Frontend (website companion): Next.js 14+, TypeScript, TailwindCSS, shadcn/ui
* Utilities: Custom JS modules for Twitter data processing

### Extension Structure (Simplified)

{% code title="project-structure" %}

```plaintext
/extension
  /scripts
    - apiService (code that handles the data processing)
    - background.js
    - content.js
    - popup.js
  /utils
    - apiClient.js
    - tweetUtils.js
  /assets
    - icons/
    - css/
  manifest.json
```

{% endcode %}

## API Integration

<figure><img src="https://4200666982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAJTYpi6vsWQV0BYdOWD2%2Fuploads%2FDXjELfzKQYparT9H5OtP%2Fapi%20integration.png?alt=media&#x26;token=074ab4e3-e103-4208-8859-7df0b473c6f8" alt=""><figcaption></figcaption></figure>

### Key Endpoints

* `getFirstFollowers(user, how, page)` → First followers of an account
* `getBioHistory(user, how, page)` → Historical bio changes
* `getPastUsernames(user, how, page)` → Username history
* `getDeletedTweets(user, how, page)` → Deleted tweets
* `getLatestTweets(user, how, page)` → Most recent tweets
* `getScoredFollowers(user, how, page)` → Follower quality & influence

### Features

* API key authentication
* JSON request/response handling
* Credit system filtering
* Error handling & retry logic

### Tweet Processing Utilities

* `filterTweetsWithAddresses(tweets)` → Extract BSC-related addresses
* `combineTweets(deleted, latest)` → Merge & deduplicate lists
* `processTweets(deletedResult, latestResult)` → End-to-end pipeline

## Design Principles

* Utility-first design for readability and speed
* Minimal UI overlay on Twitter/X
* Privacy-conscious: data stored locally unless explicitly queried
* Performance-oriented: fast background scripts, non-intrusive DOM interaction

## Extension Features

* Real-time monitoring of Twitter data
* Lightweight popup dashboard for quick access
* Background scripts handle data fetching and storage
* Configurable options for alerts & filters

## Token Utility ($FYS)

* Access Pass: Free access for token holders
* No Subscriptions: Token replaces monthly fees
* Governance: DAO decides thresholds and feature access
* Benefits:
  * Early access to new features
  * Voting rights on roadmap
  * Exclusive channels & premium tools

## Use Cases

### Traders

* Detect pump & dump "rugpull" schemes
* Monitor deleted token promotions
* Track influencer sentiment changes
* Find alpha

### Researchers

* Archive deleted crypto content
* Study influence networks and insider behavior
* Analyze narrative evolution across Twitter/X

##
