{"id":18318714,"url":"https://github.com/xdevplatform/account-activity-dashboard-enterprise","last_synced_at":"2025-07-06T13:03:26.065Z","repository":{"id":58700518,"uuid":"186722537","full_name":"xdevplatform/account-activity-dashboard-enterprise","owner":"xdevplatform","description":"Sample web app and helper scripts to get started with the enterprise Account Activity API","archived":false,"fork":false,"pushed_at":"2024-06-19T17:42:33.000Z","size":320,"stargazers_count":21,"open_issues_count":2,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-02T11:59:35.568Z","etag":null,"topics":["account-activity","dashboard","heroku","twitter"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xdevplatform.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-15T00:50:57.000Z","updated_at":"2025-03-22T02:46:11.000Z","dependencies_parsed_at":"2024-04-20T22:07:52.166Z","dependency_job_id":"87284236-a096-408e-bfa2-f82d13a7cfa7","html_url":"https://github.com/xdevplatform/account-activity-dashboard-enterprise","commit_stats":null,"previous_names":["xdevplatform/account-activity-dashboard-enterprise"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xdevplatform%2Faccount-activity-dashboard-enterprise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xdevplatform%2Faccount-activity-dashboard-enterprise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xdevplatform%2Faccount-activity-dashboard-enterprise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xdevplatform%2Faccount-activity-dashboard-enterprise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xdevplatform","download_url":"https://codeload.github.com/xdevplatform/account-activity-dashboard-enterprise/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247406076,"owners_count":20933803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["account-activity","dashboard","heroku","twitter"],"created_at":"2024-11-05T18:11:21.774Z","updated_at":"2025-07-06T13:03:26.036Z","avatar_url":"https://github.com/xdevplatform.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Account Activity API Dashboard (AAA Dashboard)\n\nA Bun.js web application to monitor and manage X (formerly Twitter) Account Activity API webhooks, subscriptions, and live events.\n\n## Features\n\n*   **Webhooks Management:**\n    *   List registered webhooks.\n    *   Add new webhooks.\n    *   Delete existing webhooks.\n    *   Validate webhooks (CRC check).\n    *   Replay events for a webhook within a specified date/time range.\n*   **Subscriptions Management:**\n    *   List user subscriptions for a selected webhook.\n    *   Add new subscriptions (for the user specified in `.env`).\n    *   Delete user subscriptions.\n*   **Live Events Viewer:**\n    *   Real-time stream of events via WebSockets.\n    *   Supports various event types: Tweet create/delete, Favorite, Follow/Unfollow, Mute/Unmute, Replay job status, Direct Messages (received, sent, typing indicator, read receipts).\n    *   Instructions panel for setting up ngrok to receive events locally.\n\n## Quick Start\n\nFollow these steps to get the application running locally:\n\n### 1. Prerequisites\n\n*   **Bun.js:** Ensure you have Bun.js installed. You can find installation instructions at [bun.sh](https://bun.sh).\n*   **X API Credentials:** You will need X API v2 credentials (Consumer Key, Consumer Secret, Access Token, Access Token Secret, Bearer Token) for an app with the Account Activity API enabled.\n\n### 2. Clone the Repository\n\n```bash\n# Replace with your repository's clone command if applicable\ngit clone https://github.com/xdevplatform/account-activity-dashboard-enterprise.git\n```\n\n```bash\ncd account-activity-dashboard-enterprise\n```\n\n### 3. Set Up Environment Variables\n\n*   Copy the environment template file:\n    ```bash\n    cp env.template .env\n    ```\n*   Edit the `.env` file and fill in your X API credentials:\n    ```\n    X_CONSUMER_KEY=\"YOUR_CONSUMER_KEY\"\n    X_CONSUMER_SECRET=\"YOUR_CONSUMER_SECRET\"\n    X_ACCESS_TOKEN=\"YOUR_ACCESS_TOKEN\"\n    X_ACCESS_TOKEN_SECRET=\"YOUR_ACCESS_TOKEN_SECRET\"\n    X_BEARER_TOKEN=\"YOUR_BEARER_TOKEN\"\n    ```\n\n### 4. Install Dependencies\n\nOpen your terminal in the project root directory and run:\n\n```bash\nbun install\n```\n\nThis command will install all necessary dependencies defined in `package.json`.\n\n### 5. Run the Application\n\nTo start the development server, run:\n\n```bash\nbun run index.ts\n```\n\nAlternatively, if you have a `dev` script in your `package.json` (e.g., `\"dev\": \"bun --watch index.ts\"`), you can run:\n\n```bash\nbun run dev\n```\n\nThe server will typically start on `http://localhost:3000`.\n\n### 6. Access the Application\n\nOpen your web browser and navigate to:\n\n[http://localhost:3000](http://localhost:3000)\n\nYou should now see the Account Activity Dashboard interface.\n\n### 7. Setting Up for Live Events (ngrok)\n\nTo receive live events from X in the dashboard when running locally, your server needs to be accessible from the public internet. `ngrok` is a recommended tool for this.\n\n1.  **Install ngrok:** If you don't have it, download and install ngrok from [ngrok.com](https://ngrok.com).\n2.  **Expose your local server:** Open a new terminal window and run ngrok to forward to your local Bun server's port (default 3000):\n    ```bash\n    ngrok http http://localhost:3000\n    ```\n    If your application is running on a different port, replace `3000` accordingly.\n3.  **Copy the ngrok URL:** ngrok will display a public HTTPS forwarding URL (e.g., `https://your-unique-id.ngrok-free.app`). Copy this HTTPS URL.\n4.  **Construct your Webhook URL:** Your full webhook URL for X will be the ngrok HTTPS URL followed by `/webhooks/twitter`.\n    *Example:* `https://your-unique-id.ngrok-free.app/webhooks/twitter`\n5.  **Add and Configure in Dashboard:**\n    *   Go to the \"Webhooks\" tab in this dashboard.\n    *   Add the full webhook URL you constructed above.\n    *   Once the webhook is added and validated by X (the dashboard backend handles the CRC check), go to the \"Subscriptions\" tab to subscribe the desired user to this webhook.\n    *   Navigate to the \"Live Events\" tab to view incoming events.\n\n## Development Notes\n\n*   The backend is built with Bun.js and its native HTTP server.\n*   Frontend assets (HTML, CSS, JavaScript) are served from the `public` directory.\n*   API routes are organized under `src/routes/`.\n*   Live events are pushed to the client via WebSockets.\n\n## Troubleshooting\n\n*   **Permissions:** Ensure your X app has the necessary permissions for the Account Activity API and the specific endpoints being used (e.g., Webhooks, Subscriptions, Direct Messages if applicable).\n*   **`.env` file:** Double-check that your `.env` file is correctly named, located in the project root, and contains the correct credentials.\n*   **ngrok for Live Events:** If you are testing live event ingestion locally, remember to set up ngrok (or a similar tunneling service) and register the ngrok URL with X as described in the \"Live Events\" tab instructions panel within the application.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxdevplatform%2Faccount-activity-dashboard-enterprise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxdevplatform%2Faccount-activity-dashboard-enterprise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxdevplatform%2Faccount-activity-dashboard-enterprise/lists"}