Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ audius-cmd stream

- **packages/web**: React web client with Vite, Redux Toolkit, Emotion CSS
- **packages/mobile**: React Native app for iOS/Android
- **packages/mobile/examples**: Runnable mobile examples (auth/sign-in, upload) with READMEs for AI and developer reference—see [packages/mobile/examples/README.md](packages/mobile/examples/README.md)
- **packages/common**: Shared code between web and mobile (state, models, utilities)
- **packages/sdk**: JavaScript SDK for interacting with Audius protocol
- **packages/harmony**: Design system components and tokens
Expand All @@ -88,6 +89,7 @@ audius-cmd stream
- SDK (@audius/sdk) handles all protocol interactions
- Services layer in packages/common/src/services
- API adapters for web3 and traditional HTTP endpoints
- **Mobile examples**: For auth (sign-in/OAuth-style), upload, etc., see `packages/mobile/examples/`; each example has a README with run instructions and source-of-truth file paths.

### Styling Approach

Expand Down
38,154 changes: 21,330 additions & 16,824 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"mobile": "npm run start -w @audius/mobile",
"mobile:clean": "npm run clean:auto -w @audius/mobile && npm run clean:modules",
"mobile:clear-cache": "watchman watch-del-all && npm run start -w @audius/mobile -- --reset-cache",
"mobile:example:trending": "cd packages/mobile/examples/trending && npx expo start",
"EMBED======================================": "",
"embed:prod": "npm run start:prod -w embed",
"embed:stage": "npm run start:stage -w embed",
Expand Down
36 changes: 36 additions & 0 deletions packages/mobile/examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Mobile Examples

Runnable examples for building Audius-style mobile features (React Native). Use these when implementing **authentication (sign-in / OAuth-style flows)** or similar capabilities so that AIs and developers can find reference implementations quickly.

## Quick start (run the app)

From the **repository root** (`apps/`):

```bash
npm install
npm run ios:dev # iOS simulator
# or
npm run android:dev # Android emulator
```

Environment: copy `packages/mobile/.env.dev` if needed; the app runs against staging by default.

## Available examples

| Example | Description | How to run in the app |
|--------|-------------|------------------------|
| [trending](./trending/) | **Expo app**: SDK setup + trending tracks (code example) | From repo root: `cd packages/mobile/examples/trending && npx expo start` or `npm run mobile:example:trending` |
| [auth-sign-in](./auth-sign-in/) | **Expo app**: OAuth + bearer token (SDK). Main app: Hedgehog email/password. | OAuth example: `cd packages/mobile/examples/auth-sign-in && npx expo start` or `npm run mobile:example:auth-sign-in`. Main app: open app → sign-in. |

## For AI / code search

- **SDK setup (mobile / Expo):** trending example, getSDK, sdk(appName), polyfills, Buffer process, trending tracks.
- **Authentication**: sign-in, login, OAuth, bearer token, Hedgehog, identity service, `authService`, `createAuthService`, `sdk({ bearerToken })`, `oauth.login`.

Implementation lives in `packages/mobile/src` and `packages/common`; each example folder links to the exact files and entry points.

## Adding new examples

1. Add a new directory under `packages/mobile/examples/<example-name>/`.
2. Add a `README.md` with: purpose, keywords for search, **How to run** (where to navigate in the app), and **Source of truth** (file paths in this repo).
3. Update this README's table and any run script if applicable.
13 changes: 13 additions & 0 deletions packages/mobile/examples/auth-sign-in/.expo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
> Why do I have a folder named ".expo" in my project?

The ".expo" folder is created when an Expo project is started using "expo start" command.

> What do the files contain?

- "devices.json": contains information about devices that have recently opened this project. This is used to populate the "Development sessions" list in your development builds.
- "settings.json": contains the server configuration that is used to serve the application manifest.

> Should I commit the ".expo" folder?

No, you should not share the ".expo" folder. It does not contain any information that is relevant for other developers working on the project, it is specific to your machine.
Upon project creation, the ".expo" folder is already added to your ".gitignore" file.
3 changes: 3 additions & 0 deletions packages/mobile/examples/auth-sign-in/.expo/devices.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"devices": []
}
7 changes: 7 additions & 0 deletions packages/mobile/examples/auth-sign-in/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.env
.env.local
*.jks
*.p8
*.p12
*.key
*.mobileprovision
Loading
Loading