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 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:
- Transport Layer MQTT (primary) HTTP fallback Direct send fallback
- Session Layer AppState reuse Token lifecycle management User-Agent continuity
- 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
- MIT ยฉ 2026 Cid Kageno.
- This project is based on ws3-fca and uses Nexus-fca configuration
โญ Support
If you find this project useful:
- Star the repository โญ
- Share with others
- Contribute improvements