JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 41
  • Score
    100M100P100Q77207F
  • License MIT

Ultra-Fast, Secure & Stable Facebook Messenger API with Parallel Messaging.

Package Exports

  • atomic-fca
  • atomic-fca/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (atomic-fca) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ATOMIC FCA

ATOMIC FCA v1.0.0 ๐Ÿ’ฅ

High-Performance, Resilient Facebook Messenger API
Engineered for speed, stability, and adaptive safety


๐Ÿ”ฅ Version 1.0.0 Highlights

  • โšก Parallel Message Sending โ€” Up to 5 concurrent sends
  • ๐Ÿš€ Fast Send Mode โ€” Optional queue bypass for ultra-low latency
  • ๐Ÿ“Š Configurable Queue System โ€” Fine-tune throughput vs safety
  • ๐Ÿง  Smart Concurrency Defaults โ€” Balanced performance out of the box
  • ๐Ÿ›ก๏ธ Safety Systems Preserved โ€” Adaptive protections remain active
  • ๐Ÿ“ˆ Performance Optimized โ€” Designed for low-latency messaging workflows

โœ… Core Value

Pillar Description
โšก Performance Parallel sending, reduced latency, configurable throughput
๐Ÿ” Secure Login AppState + credential login with 2FA support
๐Ÿ” Session Resilience Token lifecycle management + adaptive refresh
๐ŸŒ Connection Stability MQTT recovery, backoff strategies, keepalive system
๐Ÿ“ฌ Delivery Reliability Multi-path fallback (MQTT โ†’ HTTP โ†’ direct)
๐Ÿง  Memory Control Queue limits, resend caps, TTL cleanup
๐Ÿ“Š Observability Health & memory metrics APIs
โœ๏ธ Edit Safety Pending edit tracking + ACK monitoring

โšก Speed vs Safety Configuration

// Maximum speed (higher risk)
api.setFastSend(true);

// Balanced (default)
api.setParallelSend(3);

// Higher throughput
api.setParallelSend(5);

// Maximum safety (sequential)
api.setParallelSend(1);
api.setFastSend(false);

โš ๏ธ Note: FastSend disables queue protections and may increase: Rate limiting risk Temporary delivery failures Account flagging probability


๐Ÿงฉ Architecture Overview

ATOMIC-fca operates across three core layers:

  1. Transport Layer MQTT (primary) HTTP fallback Direct send fallback
  2. Session Layer AppState reuse Token lifecycle management User-Agent continuity
  3. Control Layer Queue system Parallel send engine Safety limiter & backoff logic

๐Ÿš€ Quick Start

Option 1: AppState Login (Recommended)

const login = require('atomic-fca');

(async () => {
  const api = await login(
    { appState: require('./appstate.json') },
    {
      autoReconnect: true,
      randomUserAgent: true
    }
  );

  console.log('Logged in as', api.getCurrentUserID());

  api.listen((err, evt) => {
    if (err) return console.error(err);
    if (evt.body) {
      api.sendMessage('Echo: ' + evt.body, evt.threadID);
    }
  });
})();
Option 2: Email/Password Login
JavaScript
const login = require('atomic-fca');

(async () => {
  const api = await login(
    {
      email: 'your-email@example.com',
      password: 'your-password'
    },
    {
      autoReconnect: true,
      randomUserAgent: true,
      proxy: 'socks5://127.0.0.1:1080'
    }
  );

  console.log('โœ… Logged in');

  api.listen((err, msg) => {
    if (err) return console.error(err);
    if (msg.body === 'ping') {
      api.sendMessage('pong', msg.threadID);
    }
  });
})();

Option 3: Advanced Setup

const login = require('atomic-fca');

(async () => {
  const api = await login(
    { appState: require('./appstate.json') },
    {
      proxy: 'http://proxy.example.com:8080',
      randomUserAgent: true,
      autoMarkRead: true,
      emitReady: true,
      bypassRegion: 'PRN'
    }
  );

  api.on('ready', () => console.log('๐Ÿš€ Bot ready'));

  api.listen((err, msg) => {
    if (err) return console.error(err);
    if (msg.body) {
      api.sendMessage('Echo: ' + msg.body, msg.threadID);
    }
  });
})();

๐Ÿงช Runtime APIs

api.setEditOptions({ maxPendingEdits, editTTLms, ackTimeoutMs, maxResendAttempts });
api.setBackoffOptions({ base, factor, max, jitter });

api.enableLazyPreflight(true);

api.getHealthMetrics();
api.getMemoryMetrics();

๐Ÿ“Š Monitoring Example

setInterval(() => {
  const h = api.getHealthMetrics();
  const m = api.getMemoryMetrics();

  console.log('[HEALTH]', h?.status, 'acks', h?.ackCount);
  console.log('[DELIVERY]', {
    attempts: h?.deliveryAttempts,
    success: h?.deliverySuccess,
    failed: h?.deliveryFailed
  });
  console.log('[MEMORY]', m);
}, 60000);

โš™๏ธ Internal Systems ๐Ÿ›ฐ๏ธ MQTT System Smart reconnection with fresh sequence IDs Randomized reconnect intervals (26โ€“60 min) Keepalive system (55โ€“75 sec) Error classification + metrics tracking โœ‰๏ธ Delivery System Multi-path fallback: MQTT โ†’ HTTP โ†’ Direct Retry + timeout handling Adaptive suppression under unstable conditions ๐Ÿ›ก๏ธ Safety System Layer Mechanism Purpose UA Continuity Stable fingerprint Reduce session anomalies Adaptive Refresh Risk-based timing Extend session lifespan Lightweight Poke Silent token renewal Maintain activity Backoff Strategy Exponential + jitter Prevent burst failures Idle Detection Ghost socket detection Force recovery ๐Ÿ“Š Example Benchmark (Local Testing) Mode Avg Latency Throughput Sequential ~220ms ~4โ€“5 msg/s Parallel (3) ~90ms ~10โ€“12 msg/s FastSend ~40ms 20+ msg/s Results vary based on network and environment.

๐Ÿง  Best Practices

Use AppState instead of repeated logins Preserve persistent-device.json Avoid manual User-Agent rotation Let backoff system handle reconnects Monitor metrics before forcing resets

๐Ÿ”Œ Integration Example (GoatBot V2)

const login = require('atomic-fca');

(async () => {
  const api = await login({ appState: require('./appstate.json') });

  api.listen((err, event) => {
    if (err) return console.error(err);

    if (event.body === '!ping') {
      api.sendMessage('pong', event.threadID);
    }
  });
})();

๐Ÿ“š Documentation

Resource Location
Usage Guide USAGE-GUIDE.md
API Reference DOCS.md
Config Reference docs/configuration-reference.md
Safety Docs docs/account-safety.md
Examples examples/

โš ๏ธ Disclaimer

This project is not affiliated with Facebook.
Use responsibly and comply with platform terms and applicable laws.


๐Ÿค Contributing

PRs are welcome, especially for:

  • Stability improvements
  • Protocol updates
  • Performance tuning
  • Type definitions

๐Ÿ“œ License


โญ Support

If you find this project useful:

  • Star the repository โญ
  • Share with others
  • Contribute improvements