How ottomated/crewlink works
Purpose and Runtime
CrewLink is a desktop Electron client providing proximity voice chat for Among Us. It reads live game state from the local Among Us process, sends/receives voice through a separate CrewLink server, and renders an in-game-style overlay plus settings UI. Packaging targets a Windows installer via electron-builder.yml.
Process Entry Points
The Electron main process starts at src/main/index.ts; it owns native process access, game-state polling, and IPC registration. The renderer starts at src/renderer/index.ts and mounts the React UI rooted at src/renderer/App.tsx. Shared cross-process contracts live in src/common/ipc-messages.ts and src/common/AmongUsState.ts.
Game Hook and State Acquisition
src/main/hook.ts attaches to the Among Us process, while src/main/GameReader.ts interprets process memory into player/game information. src/main/offsetStore.ts centralizes version-sensitive memory offsets. This is the critical native boundary: failure or incompatibility is surfaced through shared errors in src/common/Errors.ts, rather than renderer-side memory access.
Main-to-Renderer Control Boundary
src/main/ipc-handlers.ts exposes main-process operations and state updates to the UI using Electron IPC. src/common/ipc-messages.ts defines message names/contracts, and src/common/ISettings.d.ts defines persisted or exchanged settings shape. Renderer components should request privileged actions through IPC; native hooks and game memory remain isolated in src/main/.
Voice and Proximity Pipeline
The renderer contains the real-time voice-facing UI/logic, centered on src/renderer/Voice.tsx and src/renderer/vad.ts. Live game positions from the main process drive proximity/spatial-audio decisions for remote participants. Voice connectivity depends on the externally deployed CrewLink server repository; the README recommends a private server for development. Audio assets include static/chime.mp3 and static/reverb.ogx.
User Interface and Overlay
src/renderer/App.tsx composes the primary client experience. src/renderer/Overlay.tsx presents game-adjacent player/voice state, while src/renderer/Menu.tsx and src/renderer/settings/Settings.tsx provide configuration and controls. Shared renderer state is provided through src/renderer/contexts.tsx; visual behavior is split between src/renderer/css/index.css and src/renderer/css/overlay.css.
Identity and Cosmetics
Player representation is rendered through src/renderer/Avatar.tsx and mapped from game cosmetics in src/renderer/cosmetics.ts. Static cosmetic resources are bundled under static/hats, static/skins, and static/players, allowing the overlay to mirror Among Us player appearance without querying an external asset service.
Infrastructure and Constraints
The app is TypeScript/React in Electron, with native memory integration represented by src/main/memoryjs.d.ts and binary-structure typing in src/main/structron.d.ts. It requires Node.js/Yarn for development and Python as a listed prerequisite. CI is AppVeyor (appveyor.yml); release packaging is configured in electron-builder.yml.
Main entry points: App.tsx App shell · Voice.tsx Voice client · hook.ts Game hook · GameReader.ts Game reader
Components 21
Electron Main
Privileged native runtime and game-state bridge.
- Main entry
src/main/index.ts - Game hook
src/main/hook.ts - Game reader · Interprets game memory as player and game state.
src/main/GameReader.ts - Offset store · Version-sensitive Among Us memory offsets.
src/main/offsetStore.ts - IPC handlers · Exposes privileged operations and state updates.
src/main/ipc-handlers.ts - Native type declarations
src/main/memoryjs.d.ts
Shared Contracts
Cross-process message, state, settings, and error types.
- IPC messages
src/common/ipc-messages.ts - Among Us state
src/common/AmongUsState.ts - Settings contract
src/common/ISettings.d.ts - Shared errors · Reports hook and compatibility failures to the UI.
src/common/Errors.ts
Electron Renderer
React UI, overlay, and real-time voice experience.
- Renderer entry
src/renderer/index.ts - App shell · Composes the primary client experience.
src/renderer/App.tsx - Voice client · Applies proximity and spatial-audio behavior for participants.
src/renderer/Voice.tsx - Voice activity detection
src/renderer/vad.ts - Game overlay · Shows game-adjacent player and voice state.
src/renderer/Overlay.tsx - Menu and settings
src/renderer/settings/Settings.tsx - Renderer contexts
src/renderer/contexts.tsx - Avatar cosmetics · Maps game cosmetics to bundled player visuals.
src/renderer/Avatar.tsx
Other components
- Among Us process · Local process providing live game state.
- CrewLink server · Separately deployed voice connectivity backend.
- Audio assets
static/chime.mp3
Connections 23
- Main entry → Game hook: starts
- Main entry → IPC handlers: registers
- Game hook → Among Us process: attaches to
- Game hook → Game reader: enables reads
- Game reader → Offset store: uses
- Game reader → Native type declarations: uses native bindings
- Game reader → Among Us state: produces
- Game hook → Shared errors: reports failures
- IPC handlers → IPC messages: implements
- IPC handlers → Among Us state: publishes
- IPC handlers → Settings contract: exchanges
- Renderer entry → App shell: mounts
- App shell → Renderer contexts: provides
- App shell → Game overlay: renders
- App shell → Menu and settings: renders
- App shell → Voice client: hosts
- Renderer contexts → IPC messages: uses IPC
- Renderer contexts → Among Us state: consumes
- Voice client → Voice activity detection: uses
- Voice client → CrewLink server: connects to
- Voice client → Audio assets: plays
- Game overlay → Avatar cosmetics: renders players with
- Voice client → Among Us state: uses positions