# kaifcodec/freefire-like-and-guest-api architecture

> Architecture diagram of the GitHub repository kaifcodec/freefire-like-and-guest-api, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kaifcodec/freefire-like-and-guest-api
- Repository: https://github.com/kaifcodec/freefire-like-and-guest-api

## Overview

This repository combines Frida-based guest-account capture and conversion with a Python client workflow for guest authentication, target lookup, and encrypted like requests. The main path is documented in the README and visible in send_like.py; capture hooks and restart behavior are described in the README. Source coverage here is limited: guest conversion internals and the Frida scripts were not excerpted, so those relationships are documented rather than inferred from unseen calls.

Main entry points: [`send_like.py`](https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/send_like.py) (Like sender), [`get_jwt.py`](https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/get_jwt.py) (Guest JWT authentication), [`dev/frida_injections/capture_and_save_guest.js`](https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/dev/frida_injections/capture_and_save_guest.js) (Capture guest credentials), [`count_likes.py`](https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/count_likes.py) (Target account lookup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Guest capture"]
  node_capture_hook["Capture guest credentials"]
  node_restart["Registration restart"]
  node_frida_helpers["Frida helpers<br/>[index.js]"]
  node_manager["Frida session manager<br/>[frida_manager.py]"]
end

subgraph group_client["Like client"]
  node_sender["Like sender<br/>[send_like.py]"]
  node_target_lookup["Target account lookup<br/>[count_likes.py]"]
  node_jwt["Guest JWT authentication<br/>[get_jwt.py]"]
  node_usage[("Per-target usage history")]
end

subgraph group_protocol["Protocol and crypto"]
  node_like_payload["Like payload encryption"]
  node_protobuf["Protocol messages<br/>[send_like_pb2.py]"]
  node_login_proto["Login messages<br/>[freefire_pb2.py]"]
end

subgraph group_guestdata["Guest management"]
  node_guest_convert["Guest conversion<br/>[save_guest.py]"]
  node_guest_dedupe["Guest deduplication<br/>[rm_duplicates.py]"]
  node_guest_store["Converted guest records"]
  node_guest_count["Guest count<br/>[count_guest.py]"]
end

node_android(("Free Fire app"))
node_frida(("Frida runtime"))
node_oauth["Guest token service"]
node_game_api["Free Fire API"]

node_android -->|"provides credentials"| node_capture_hook
node_manager -->|"manages session"| node_frida
node_manager -->|"loads scripts"| node_capture_hook
node_capture_hook -->|"uses helpers"| node_frida_helpers
node_capture_hook -.->|"writes captures for"| node_guest_convert
node_restart -->|"restarts after registration"| node_android
node_guest_convert -.->|"deduplicates guests"| node_guest_dedupe
node_guest_convert -->|"produces records"| node_guest_store
node_sender -->|"loads guests"| node_guest_store
node_sender -->|"counts guests"| node_guest_count
node_sender -->|"reads and saves usage"| node_usage
node_sender -->|"fetches target info"| node_target_lookup
node_sender -->|"authenticates guests"| node_jwt
node_jwt -->|"requests access token"| node_oauth
node_jwt -->|"serializes login"| node_login_proto
node_jwt -->|"requests JWT"| node_game_api
node_sender -->|"builds request payload"| node_like_payload
node_like_payload -->|"serializes message"| node_protobuf
node_sender -->|"posts likes"| node_game_api
node_target_lookup -->|"uses login messages"| node_login_proto
node_target_lookup -->|"requests account info"| node_game_api

click node_capture_hook "https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/dev/frida_injections/capture_and_save_guest.js"
click node_restart "https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/dev/frida_injections/restart_after_register.js"
click node_frida_helpers "https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/dev/frida_injections/index.js"
click node_manager "https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/dev/frida_injections/frida_manager.py"
click node_guest_convert "https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/guests_manager/save_guest.py"
click node_guest_dedupe "https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/guests_manager/rm_duplicates.py"
click node_guest_store "https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/guests_manager/guests_converted.json"
click node_guest_count "https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/guests_manager/count_guest.py"
click node_sender "https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/send_like.py"
click node_target_lookup "https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/count_likes.py"
click node_jwt "https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/get_jwt.py"
click node_like_payload "https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/encrypt_like_body.py"
click node_protobuf "https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/ff_proto/send_like_pb2.py"
click node_login_proto "https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/ff_proto/freefire_pb2.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_capture_hook,node_restart,node_frida_helpers,node_manager toneBlue
class node_sender,node_target_lookup,node_jwt,node_usage toneAmber
class node_like_payload,node_protobuf,node_login_proto,node_game_api toneMint
class node_guest_convert,node_guest_dedupe,node_guest_store,node_guest_count toneRose
class node_android,node_frida,node_oauth toneIndigo
```

## Components

### Guest capture

- [Capture guest credentials](https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/dev/frida_injections/capture_and_save_guest.js): `dev/frida_injections/capture_and_save_guest.js`
- [Registration restart](https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/dev/frida_injections/restart_after_register.js): `dev/frida_injections/restart_after_register.js`
- [Frida helpers](https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/dev/frida_injections/index.js): `dev/frida_injections/index.js`
- [Frida session manager](https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/dev/frida_injections/frida_manager.py): `dev/frida_injections/frida_manager.py`

### Like client

- [Like sender](https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/send_like.py): `send_like.py`
- [Target account lookup](https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/count_likes.py): `count_likes.py`
- [Guest JWT authentication](https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/get_jwt.py): `get_jwt.py`
- **Per-target usage history**

### Protocol and crypto

- [Like payload encryption](https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/encrypt_like_body.py): `encrypt_like_body.py`
- [Protocol messages](https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/ff_proto/send_like_pb2.py): `ff_proto/send_like_pb2.py`
- [Login messages](https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/ff_proto/freefire_pb2.py): `ff_proto/freefire_pb2.py`

### Guest management

- [Guest conversion](https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/guests_manager/save_guest.py): `guests_manager/save_guest.py`
- [Guest deduplication](https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/guests_manager/rm_duplicates.py): `guests_manager/rm_duplicates.py`
- [Converted guest records](https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/guests_manager/guests_converted.json): `guests_manager/guests_converted.json`
- [Guest count](https://github.com/kaifcodec/freefire-like-and-guest-api/blob/main/guests_manager/count_guest.py): `guests_manager/count_guest.py`

### Other components

- **Free Fire app**
- **Frida runtime**
- **Guest token service**
- **Free Fire API**

## Connections

- Free Fire app → Capture guest credentials: provides credentials (evidence: `README.md`)
- Frida session manager → Frida runtime: manages session (evidence: `README.md`)
- Frida session manager → Capture guest credentials: loads scripts (evidence: `README.md`)
- Capture guest credentials → Frida helpers: uses helpers (evidence: `README.md`)
- Capture guest credentials → Guest conversion: writes captures for
- Registration restart → Free Fire app: restarts after registration (evidence: `README.md`)
- Guest conversion → Guest deduplication: deduplicates guests
- Guest conversion → Converted guest records: produces records (evidence: `README.md`)
- Like sender → Converted guest records: loads guests (evidence: `send_like.py`)
- Like sender → Guest count: counts guests (evidence: `send_like.py`)
- Like sender → Per-target usage history: reads and saves usage (evidence: `send_like.py`)
- Like sender → Target account lookup: fetches target info (evidence: `send_like.py`)
- Like sender → Guest JWT authentication: authenticates guests (evidence: `send_like.py`)
- Guest JWT authentication → Guest token service: requests access token (evidence: `get_jwt.py`)
- Guest JWT authentication → Login messages: serializes login (evidence: `get_jwt.py`)
- Guest JWT authentication → Free Fire API: requests JWT (evidence: `get_jwt.py`)
- Like sender → Like payload encryption: builds request payload (evidence: `send_like.py`)
- Like payload encryption → Protocol messages: serializes message (evidence: `encrypt_like_body.py`)
- Like sender → Free Fire API: posts likes (evidence: `send_like.py`)
- Target account lookup → Login messages: uses login messages (evidence: `count_likes.py`)
- Target account lookup → Free Fire API: requests account info (evidence: `count_likes.py`)
