Full lesson
crisis-companion
Voice-activated emergency response app for Solana Mobile - built for remote areas with offline functionality
What it does
From the project README:
Imagine freezing in panic as a loved one collapses—now imagine a reliable companion that hears your voice, analyzes symptoms using proven medical protocols, and guides you through exact steps to save their life, all while alerting help. Solana SOS isn't just an app; it's your always-on guardian, blending world-class voice recognition with Solana's secure blockchain to make emergency response intuitive, multilingual (99+ languages), and rewarding. From urban streets to remote trails, it turns bystanders into lifesavers with zero technical barriers.
- Original
- paragoner1/crisis-companion
- SuperStack fork
- Blockchains/crisis-companion @
f531935 - Stars
- 4
- Last push (original)
- 2026-10-08
- Languages
- Rust
- Detected stack
- Anchor
- Categories
- Other
- Licence
- Apache-2.0
Architecture
21 source files. By extension: .rs ×21.
| Top-level directory | Source files |
|---|---|
src | 13 |
tests | 4 |
examples | 3 |
(root) | 1 |
Dapp: devnet deploy pending
⏳ Devnet deploy pending — goes live when the devnet wallet is topped up. This fork's own dapp is not deployed yet, so there is no program address or transaction to show. It is queued in dapp-queue.txt; once devnet SOL is available it is deployed, exercised with real devnet transactions, and this section switches to the live dapp at /dapps/crisis-companion/. Until then, the lesson and step-by-step guide below are complete, and you can run it locally with the commands below.
Key code, explained
Excerpts chosen automatically where the code uses the most Solana concepts, pinned to the fork's commit.
src/onchain/emergency_rewards.rs L13–35 @ f531935 · Apache-2.0 · original require!(amount <= 1000, ErrorCode::InvalidAmount); token::transfer( CpiContext::new( ctx.accounts.token_program.to_account_info(), Transfer { from: ctx.accounts.payer_token_account.to_account_info(), to: ctx.accounts.recipient_token_account.to_account_info(), authority: ctx.accounts.payer.to_account_info(), }, ), amount, )?; emit!(RewardAwarded { recipient: ctx.accounts.recipient_token_account.owner, amount, emergency_type, }); Ok(()) }}- Line 13
require!(amount <= 1000, ErrorCode::InvalidAmount);: An explicit validation that aborts the instruction with an error. - Line 15
token::transfer(: An SPL token transfer through the Token Program. - Line 16
CpiContext::new(: Makes a cross-program invocation into another program. - Line 27
emit!(RewardAwarded {: Emits an Anchor event that clients can parse from the logs.
How to run, build and test
These commands come from the repo's own manifests (package.json scripts, Anchor.toml, Cargo, go.mod, Makefile). Check the README for prerequisites and environment variables.
| Directory | Command | Runs |
|---|---|---|
. | cargo build | Rust workspace build |
. | cargo test | Rust tests |
What you could build from it
- Fork the SuperStack copy and extend it within the Other gaps listed on the idea page.
- Learn the pattern first: Program Derived Addresses (PDAs)
- Learn the pattern first: Cross-Program Invocations (CPIs)