Skip to content
Open
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
27 changes: 16 additions & 11 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,25 @@ Only run these commands in the directories related to the changes being made. Do
# Install dependencies and setup development environment
npm install

# Run the protocol stack locally (requires Docker)
npm run protocol
# Run web application against production (the typical default)
npm run web

# Connect client to local protocol
audius-compose connect
# Run mobile applications against production
npm run ios
npm run android

# Special: run against a locally-running protocol stack (requires Docker + `npm run protocol`)
# Only use these when you have explicitly started the full stack locally — they are NOT the default.
# The `:local` suffix means "against my local stack", NOT "dev mode" — do not run these by default.
npm run web:local
npm run ios:local
npm run android:local

# Run web application
npm run web:dev # Against local services
npm run web:stage # Against staging
npm run web:prod # Against production
# Run the protocol stack locally (only needed for the *:local variants above)
npm run protocol
audius-compose connect

# Run mobile applications
npm run ios:dev # iOS local development
npm run android:dev # Android local development
# NOTE: There is no longer a staging environment. Do not look for or run *:stage or *:dev scripts at the root.

# Testing
npm run test # Run all tests via Turbo
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@ This will do the following:

### Running the Apps

Environments:
The bare app name (e.g. `web`, `ios`, `android`, `embed`, `dashboard`) runs against production — this is what you typically want:

- `\*:dev` runs against local services
- `\*:stage` runs against the staging testnet
- `\*:prod` runs against production infrastructure
```bash
npm run web
```

For example:
The `*:local` variants are a special option that runs the app against a locally-running protocol stack (see [Running the protocol locally](./dev-tools/README.md)). Use these only when you have the full stack running on your machine.

```bash
npm run web:prod
npm run web:local
```

For all available commands please see the [package.json scripts](https://github.com/AudiusProject/apps/blob/f850434ddca7d697f78a58d971f9bba1aba7f24d/package.json#L10) and the relevant package READMEs.
For all available commands please see the [package.json scripts](https://github.com/AudiusProject/apps/blob/main/package.json) and the relevant package READMEs.

## Contributing

Expand Down
30 changes: 12 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,22 @@
"buf:generate": "buf generate buf.build/audiusd/audiusd:as/rm-old-protos --include-imports && npm run buf:generate:postinstall",
"buf:generate:postinstall": "cd packages/discovery-provider/src/tasks/core && ./fix-proto-imports.sh",
"WEB========================================": "",
"web:dev": "npm run start:dev -w @audius/web",
"web:prod": "npm run start:prod -w @audius/web",
"web:stage": "npm run start:stage -w @audius/web",
"web": "npm run start:prod -w @audius/web",
"web:local": "npm run start:dev -w @audius/web",
"web:e2e": "npm run test:e2e -w @audius/web",
"web:test": "turbo run test --filter=@audius/web",
"web:example:trending": "cd packages/web/examples/trending && npm run dev",
"web:example:update-profile": "cd packages/web/examples/update-profile && npm run dev",
"web:example:upload": "cd packages/web/examples/upload && npm run dev",
"web:example:gated-upload": "cd packages/web/examples/gated-upload && npm run dev",
"DESKTOP====================================": "",
"desktop:dev": "concurrently -k 'BROWSER=none npm run start:dev -w @audius/web' 'wait-on http://0.0.0.0:3000 && npm run electron:localhost -w @audius/web -- 3000'",
"desktop:prod": "concurrently -k 'BROWSER=none npm run start:prod -w @audius/web' 'wait-on http://0.0.0.0:3002 && npm run electron:localhost -w @audius/web -- 3002'",
"desktop:stage": "concurrently -k 'BROWSER=none npm run start:stage -w @audius/web' 'wait-on http://0.0.0.0:3001 && npm run electron:localhost -w @audius/web -- 3001'",
"desktop": "concurrently -k 'BROWSER=none npm run start:prod -w @audius/web' 'wait-on http://0.0.0.0:3002 && npm run electron:localhost -w @audius/web -- 3002'",
"desktop:local": "concurrently -k 'BROWSER=none npm run start:dev -w @audius/web' 'wait-on http://0.0.0.0:3000 && npm run electron:localhost -w @audius/web -- 3000'",
"MOBILE=====================================": "",
"android:dev": "npm run android:dev -w @audius/mobile",
"android:prod": "npm run android:prod -w @audius/mobile",
"android:stage": "npm run android:stage -w @audius/mobile",
"ios:dev": "npm run ios:dev -w @audius/mobile",
"ios:prod": "npm run ios:prod -w @audius/mobile",
"ios:stage": "npm run ios:stage -w @audius/mobile",
"android": "npm run android:prod -w @audius/mobile",
"android:local": "npm run android:dev -w @audius/mobile",
"ios": "npm run ios:prod -w @audius/mobile",
"ios:local": "npm run ios:dev -w @audius/mobile",
"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",
Expand All @@ -57,9 +53,8 @@
"mobile:example:like-repost": "cd packages/mobile/examples/like-repost && npx expo start",
"mobile:example:upload": "cd packages/mobile/examples/upload && npx expo start",
"EMBED======================================": "",
"embed:prod": "npm run start:prod -w embed",
"embed:stage": "npm run start:stage -w embed",
"embed:dev": "npm run start:dev -w embed",
"embed": "npm run start:prod -w embed",
"embed:local": "npm run start:dev -w embed",
"HARMONY====================================": "",
"harmony": "turbo run start --filter=@audius/harmony",
"harmony:dev": "npm run start -w @audius/harmony",
Expand All @@ -69,9 +64,8 @@
"PROTOCOL======================================": "",
"protocol": "turbo run start --filter=@audius/compose --",
"PROTOCOL DASHBOARD==============================": "",
"dashboard:dev": "npm run start:dev -w @audius/protocol-dashboard",
"dashboard:stage": "npm run start:stage -w @audius/protocol-dashboard",
"dashboard:prod": "npm run start:prod -w @audius/protocol-dashboard",
"dashboard": "npm run start:prod -w @audius/protocol-dashboard",
"dashboard:local": "npm run start:dev -w @audius/protocol-dashboard",
"DOCS===========================================": "",
"docs": "npm run dev -w docs-audius-org",
"docs:deploy": "npm run pages:deploy -w docs-audius-org",
Expand Down
10 changes: 0 additions & 10 deletions packages/embed/.env.stage

This file was deleted.

17 changes: 11 additions & 6 deletions packages/embed/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@ Like you've seen on [twitter](https://twitter.com/audius/status/1293624808459010


## Running
```
# Run against production Audius services
npm run start:prod

## Deploying
From the repo root, the typical default runs the embed against production services:

Deployed via CI
```
npm run embed
```

To run against a locally-running protocol stack:

```
npx wrangler publish --env staging
npm run embed:local
```

## Deploying

Deployed via CI
2 changes: 0 additions & 2 deletions packages/mobile/.env.stage

This file was deleted.

4 changes: 2 additions & 2 deletions packages/mobile/REACTOTRON_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The configuration is already set up in `ReactotronConfig.js` with the following
### For iOS Simulator

1. Start the Reactotron desktop app
2. Run the mobile app with `npm run ios:dev`
2. Run the mobile app with `npm run ios` (or `npm run ios:local` if running against a local protocol stack)
3. Reactotron should automatically connect

### For Android Emulator/Device
Expand All @@ -37,7 +37,7 @@ The configuration is already set up in `ReactotronConfig.js` with the following
adb reverse tcp:9090 tcp:9090
```
2. Start the Reactotron desktop app
3. Run the mobile app with `npm run android:dev`
3. Run the mobile app with `npm run android` (or `npm run android:local` if running against a local protocol stack)
4. Reactotron should connect

### For Physical iOS Device
Expand Down
18 changes: 7 additions & 11 deletions packages/mobile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@ npm run bundle:ios
# Start the react-native server
npm run mobile

# Run a simulator using a prod configuration
# Run a simulator against production (typical default)
npm run ios
# Run a simulator using a stage configuration
npm run ios:stage
# Run a simulator using a dev configuration
npm run ios:dev
# Run a simulator against a locally-running protocol stack (special option)
npm run ios:local

# Run the app on a device
npm run ios:device "Raymond's iPhone"
Expand All @@ -46,12 +44,10 @@ xcrun xctrace list devices
# Start the react-native server
npm run mobile

# Run a simulator using a prod configuration
# Run a simulator against production (typical default)
npm run android
# Run a simulator using a stage configuration
npm run android:stage
# Run a simulator using a dev configuration
npm run android:dev
# Run a simulator against a locally-running protocol stack (special option)
npm run android:local

# Look at android devices
adb devices
Expand Down Expand Up @@ -115,5 +111,5 @@ npm start -- --reset-cache
# first manually close all running instances of metro
watchman watch-del-all
npm start -- --reset-cache
npm run ios:dev
npm run ios
```
8 changes: 5 additions & 3 deletions packages/mobile/examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@ From the **repository root** (`apps/`):

```bash
npm install
npm run ios:dev # iOS simulator
npm run ios # iOS simulator (against production)
# or
npm run android:dev # Android emulator
npm run android # Android emulator (against production)
```

Use `npm run ios:local` / `npm run android:local` instead if you want to run against a locally-running protocol stack.

Note: each example includes its own `.npmrc` with `legacy-peer-deps=true`,
so `npm install` works without manually passing that flag.

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

## Available examples

Expand Down
4 changes: 2 additions & 2 deletions packages/mobile/examples/auth-sign-in/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ Authentication, sign-in, login, sign-on, OAuth, authenticated gets, Hedgehog, id

## How to run (main app)

1. From repo root: `npm install` then `npm run ios:dev` or `npm run android:dev`.
1. From repo root: `npm install` then `npm run ios` or `npm run android` (use `:local` variants to run against a local protocol stack).
2. Open the app; the first screen is the **sign-on** flow (sign in or create account).
3. To test sign-out: sign in, then use **Settings** (or profile) → Sign out.

No extra setup; the app uses staging identity by default (see `packages/mobile/.env.dev`).
No extra setup; the app uses production identity by default.

## Source of truth (implementation)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const FeatureFlagsNavItem = () => {
FeatureFlags.FEATURE_FLAG_ACCESS
)

// Debug builds (e.g. `npm run ios:prod` on simulator) use production env/Optimizely
// Debug builds (e.g. `npm run ios` on simulator) use production env/Optimizely
// defaults where `feature_flag_access` is off — still expose overrides for local dev.
const showFeatureFlags = isFeatureFlagAccessEnabled || __DEV__

Expand Down
29 changes: 0 additions & 29 deletions packages/protocol-dashboard/.env.stage

This file was deleted.

16 changes: 13 additions & 3 deletions packages/protocol-dashboard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,22 @@ view their registered services & which ones are out date, and explore all audius

## Running the Application
The application requires ethereum contracts.
You can run `npm run start:stage` which will use the contracts that are on the staging environment.
If you want to have contracts running locally, you'll also need to run this [setup script](https://github.com/AudiusProject/apps/blob/master/service-commands/scripts/setup.js) e.g. `node setup.js run eth-contracts up`

From the repo root, the typical default runs the dashboard against production contracts:

```
npm run dashboard
```

To run against locally-running contracts, you'll also need to run this [setup script](https://github.com/AudiusProject/apps/blob/master/service-commands/scripts/setup.js) e.g. `node setup.js run eth-contracts up`, then:

```
npm run dashboard:local
```

To start:
1. Install Dependencies `npm install`
2. Run the Application `npm run start:<environment>`
2. Run the Application `npm run dashboard` (or `npm run dashboard:local` for local)

To Deploy:
Make sure the DASHBOARD_BASE_URL env var is unset on the machine you are deploying on. Build the application using `npm run build:prod` and serve the static `dist` folder as a simple page app via `npm run serve`
Expand Down
2 changes: 0 additions & 2 deletions packages/web/env/.env.stage

This file was deleted.

Loading