Appearance
account-store
FreshSource: BIBLE.md (Phase 6 Account Store section)
The DAM card schema is the single source of truth for accounts. Campaigns, warmup, CTR, and health all wire through this store.
Module
core/account-store.mjs plus core/account-import.mjs.
DAM card schema
yaml
account:
id: abc123def
identity:
email: someone@gmail.com
name: Full Name
persona_data: { ... }
assignment:
client_id: journey-junk
army_id: dallas-army-01
proxy:
married_to: 1.2.3.4:8080
credentials: AES-256-GCM encrypted
fingerprint:
encrypted_config: { ... }
lifecycle:
phase: 0-3
status: active | warming | suspended | quarantined | dead
warmup_day: 0-90
activity:
last_action_at: 2026-05-20T12:00:00Z
counters: { post: 12, comment: 5, like: 30, follow: 2 }
platforms:
reddit: { status, last_login, karma }
linkedin: { ... }
lock:
locked_by_campaign: campaign-id-or-null
locked_at: 2026-05-20T12:00:00Z
quarantine:
reason: null
quarantined_at: null
paths:
profile_dir: data/mini-engine-v2/profiles/{id}
cookie_jar: data/mini-engine/cookies/{id}.json
metadata: { created_at, updated_at, source }Encryption
- Passwords: AES-256-GCM encrypted
- Proxy credentials: AES-256-GCM encrypted
- Cookies: AES-256-GCM encrypted (in cookie-manager)
- Encryption key: machine-derived by default, override with
MINI_ENGINE_KEY
Phase thresholds
| Phase | warmupDay | health | Description |
|---|---|---|---|
| 0 | 0 | 0 | Cold, just imported |
| 1 | 3 | 30 | Warming |
| 2 | 10 | 50 | Warm |
| 3 | 30 | 70 | Hot, production-ready |
Health adjustment
| Event | Delta |
|---|---|
| Success action | +1 |
| Failure | -5 |
| 5 consecutive failures | Quarantine |
API routes (16)
| Method | Route | What |
|---|---|---|
| GET | /accounts | List with filters (status, clientId, phase, minHealth, limit) |
| GET | /accounts/army-status | Aggregate counts |
| GET | /accounts/ready | Warm + active + unlocked + above health threshold |
| GET | /accounts/by-client/:clientId | Filter by client |
| GET | /accounts/by-status/:status | Filter by status |
| GET | /accounts/:id | Single account (no passwords) |
| POST | /accounts | Create |
| PUT | /accounts/:id | Partial update |
| DELETE | /accounts/:id | Remove |
| POST | /accounts/:id/lock | Lock for campaign |
| POST | /accounts/:id/unlock | Release |
| POST | /accounts/:id/quarantine | Quarantine with reason |
| POST | /accounts/:id/unquarantine | Restore |
| POST | /accounts/:id/mark-action | Increment counters |
| POST | /accounts/:id/advance-phase | Graduate if criteria met |
| POST | /accounts/import | Bulk import from registry.json |
Example payloads
Create account
bash
curl -X POST http://localhost:4700/accounts \
-H "Content-Type: application/json" \
-H "x-api-key: ghost-engine-key" \
-d '{
"email": "newperson@gmail.com",
"name": "New Person",
"client_id": "journey-junk",
"proxy": {"host":"1.2.3.4","port":8080,"username":"u","password":"p"}
}'Mark action result
bash
curl -X POST http://localhost:4700/accounts/abc123/mark-action \
-H "Content-Type: application/json" \
-d '{"type":"ctr","result":"success","position":7}'Bulk import
bash
curl -X POST http://localhost:4700/accounts/import \
-H "Content-Type: application/json" \
-d '{
"registryPath": "./data/account-identity/registry.json",
"dryRun": false,
"overwrite": false,
"clientFilter": "journey-junk"
}'How campaigns use the store
plugins/campaign-manager/index.mjs uses accountSource: 'store' mode:
- Pull accounts from store by filter
- Lock during run
markActionon success/failure- Unlock after
Backward compatible with email-array mode (accounts: ["a@gmail.com", ...]).
Persistence
JSON files at data/ghost-engine/accounts/{id}.json. Not a real database, flat files with field-level AES-256-GCM encryption for sensitive fields.
Related
- Account Lifecycle: phases and state machine
- account-warmup plugin: execution
- account-health plugin: browser-based checks
- account-factory plugin: create new accounts