# How To



How-tos are goal-oriented recipes. Each one assumes you already know roughly what you're doing and just need the steps for a particular task—[porting an existing Node.js app](/bare/how-to/migrate-a-nodejs-app-to-bare), or [embedding Bare in a React Native app](/bare/how-to/run-on-native/embed-bare-in-react-native).

If you want to look up an API or a module, that's **[Reference](/bare/reference)**. For the conceptual "why," see **[About Bare](/bare/explanation/use-bare-standalone)**.

Everything here is about Bare itself and what it talks to on the device—its module system, its lifecycle, embedding it in a native host, on-device AI, and nearby devices over Bluetooth. For the peer-to-peer building blocks that run on top of Bare (connecting peers, replicating data, streaming media), see the how-to guides on the [P2P tab](/p2p/how-to). If you're building or shipping a Pear app instead—staging, seeding, provisioning, updating—those guides are on the [Pear tab](/pear/how-to).

<Callout type="info">
  **Pear is the platform on top.** Install the `pear` CLI when you want peer-to-peer app distribution, over-the-air updates, and one command to stage and release—the core you write here moves across unchanged. Start on the [Pear tab](/), or read [How the stack fits together](/p2p/explanation/how-the-stack-fits-together).
</Callout>

<Callout type="info">
  **P2P is the peer-to-peer building blocks.** Hypercore, Hyperswarm, Autobase, Hyperbee, Hyperdrive, HyperDHT, and Corestore—independent JavaScript modules for storage, discovery, and replication, with their own docs on the [P2P tab](/p2p). [How the stack fits together](/p2p/explanation/how-the-stack-fits-together) maps the layers.
</Callout>

## In this section [#in-this-section]

* [Migrate a Node.js app to Bare](/bare/how-to/migrate-a-nodejs-app-to-bare)—port an existing Node.js app to run on Bare.
* [Troubleshoot common issues](/bare/how-to/troubleshooting)—fixes for common Bare development issues.

### Run on mobile & native [#run-on-mobile--native]

* [Embed Bare in a React Native app](/bare/how-to/run-on-native/embed-bare-in-react-native)
* [Type a native RPC bridge](/bare/how-to/run-on-native/type-a-native-rpc-bridge)
* [Bundle a Bare app](/bare/how-to/run-on-native/bundle-a-bare-app)
* [Handle app suspension](/bare/how-to/run-on-native/handle-app-suspension)

### Add on-device AI [#add-on-device-ai]

* [Build a local AI chat TUI with QVAC](/bare/how-to/add-on-device-ai/build-a-local-ai-chat-tui-with-qvac)

### Connect over Bluetooth [#connect-over-bluetooth]

* [Build a Bluetooth chat for iOS and Android](/bare/how-to/connect-over-bluetooth/build-a-bluetooth-chat-for-ios-and-android)
* [Set up Bluetooth in a mobile app](/bare/how-to/connect-over-bluetooth/set-up-bluetooth-in-a-mobile-app)
* [Exchange data over L2CAP](/bare/how-to/connect-over-bluetooth/exchange-data-over-l2cap)
* [Read, write and subscribe with GATT](/bare/how-to/connect-over-bluetooth/read-write-and-subscribe-with-gatt)
* [Use platform-specific Bluetooth features](/bare/how-to/connect-over-bluetooth/use-platform-specific-bluetooth-features)
