create-disposabl-app 0.4.2 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/README.md +18 -0
  2. package/dist/disposabl.js +541 -0
  3. package/dist/index.js +154 -61
  4. package/dist/templates/default/.github/scripts/android-build.sh +18 -0
  5. package/dist/templates/default/.github/scripts/disposabl.mjs +95 -0
  6. package/dist/templates/default/.github/scripts/expo-channel.sh +10 -0
  7. package/dist/templates/default/.github/scripts/expo-env.sh +17 -0
  8. package/dist/templates/default/.github/scripts/expo-fingerprint.sh +19 -0
  9. package/dist/templates/default/.github/scripts/expo-update.sh +11 -0
  10. package/dist/templates/default/.github/scripts/package-release.sh +23 -0
  11. package/dist/templates/default/.github/scripts/platforms.sh +37 -0
  12. package/dist/templates/default/.github/scripts/release-publish.sh +28 -0
  13. package/dist/templates/default/.github/scripts/release-source.sh +14 -0
  14. package/dist/templates/default/.github/scripts/verify-artifacts.sh +13 -0
  15. package/dist/templates/default/.github/scripts/web-deploy.sh +10 -0
  16. package/dist/templates/default/.github/workflows/pipeline.yml +299 -0
  17. package/dist/templates/default/apps/docs/README.md +37 -0
  18. package/dist/templates/default/apps/docs/content/guides/writing.mdx +15 -0
  19. package/dist/templates/default/apps/docs/content/index.mdx +10 -0
  20. package/dist/templates/default/apps/docs/package.json +29 -1
  21. package/dist/templates/default/apps/docs/press.config.ts +20 -0
  22. package/dist/templates/default/apps/docs/src/app.css +4 -0
  23. package/dist/templates/default/apps/docs/tsconfig.json +14 -0
  24. package/dist/templates/default/apps/docs/vite.config.ts +8 -0
  25. package/dist/templates/default/apps/mobile/.env.example +2 -0
  26. package/dist/templates/default/apps/mobile/AGENTS.md +2 -2
  27. package/dist/templates/default/apps/mobile/README.md +64 -4
  28. package/dist/templates/default/apps/mobile/app.json +5 -4
  29. package/dist/templates/default/apps/mobile/assets/images/android-icon-foreground.png +0 -0
  30. package/dist/templates/default/apps/mobile/assets/images/android-icon-monochrome.png +0 -0
  31. package/dist/templates/default/apps/mobile/assets/images/icon.png +0 -0
  32. package/dist/templates/default/apps/mobile/assets/images/splash-icon.png +0 -0
  33. package/dist/templates/default/apps/mobile/eas.json +5 -0
  34. package/dist/templates/default/apps/mobile/package.json +18 -4
  35. package/dist/templates/default/apps/mobile/src/app/(auth)/_layout.tsx +1 -0
  36. package/dist/templates/default/apps/mobile/src/app/(auth)/login.tsx +1 -0
  37. package/dist/templates/default/apps/mobile/src/app/(auth)/signup.tsx +1 -0
  38. package/dist/templates/default/apps/mobile/src/app/(authenticated)/_layout.tsx +1 -0
  39. package/dist/templates/default/apps/mobile/src/app/(authenticated)/account.tsx +1 -0
  40. package/dist/templates/default/apps/mobile/src/app/_layout.tsx +1 -5
  41. package/dist/templates/default/apps/mobile/src/app/index.tsx +1 -17
  42. package/dist/templates/default/apps/mobile/tsconfig.json +8 -1
  43. package/dist/templates/default/apps/web/package.json +3 -2
  44. package/dist/templates/default/apps/web/src/routeTree.gen.ts +0 -44
  45. package/dist/templates/default/apps/web/src/router/__root.tsx +1 -1
  46. package/dist/templates/default/apps/web/src/router/_authenticated/dashboard.api-keys.tsx +1 -1
  47. package/dist/templates/default/apps/web/src/router/_authenticated/dashboard.tsx +2 -1
  48. package/dist/templates/default/apps/web/src/router/index.tsx +11 -3
  49. package/dist/templates/default/apps/web/tests/auth-branches.test.tsx +44 -0
  50. package/dist/templates/default/apps/web/vite.config.ts +15 -0
  51. package/dist/templates/default/bun.lock +583 -23
  52. package/dist/templates/default/bunfig.toml +0 -2
  53. package/dist/templates/default/disposabl.json +2 -13
  54. package/dist/templates/default/package.json +3 -3
  55. package/dist/templates/default/packages/backend/AGENTS.md +15 -13
  56. package/dist/templates/default/packages/backend/README.md +6 -28
  57. package/dist/templates/default/packages/backend/convex/_generated/ai/ai-files.state.json +1 -1
  58. package/dist/templates/default/packages/backend/convex/_generated/api.d.ts +32 -6
  59. package/dist/templates/default/packages/backend/convex/_generated/server.d.ts +8 -0
  60. package/dist/templates/default/packages/backend/convex/apps/actions/create.ts +19 -0
  61. package/dist/templates/default/packages/backend/convex/apps/internal.ts +197 -0
  62. package/dist/templates/default/packages/backend/convex/auth.ts +1 -1
  63. package/dist/templates/default/packages/backend/convex/convex.config.ts +8 -0
  64. package/dist/templates/default/packages/backend/convex/github/actions/http.ts +40 -0
  65. package/dist/templates/default/packages/backend/convex/github/actions/internal.ts +189 -0
  66. package/dist/templates/default/packages/backend/convex/github/actions/oidc.ts +75 -0
  67. package/dist/templates/default/packages/backend/convex/github/actions/provision.ts +80 -0
  68. package/dist/templates/default/packages/backend/convex/github/actions/tokens.ts +66 -0
  69. package/dist/templates/default/packages/backend/convex/github/internal.ts +34 -0
  70. package/dist/templates/default/packages/backend/convex/http.ts +3 -0
  71. package/dist/templates/default/packages/backend/convex/previews/internal.ts +270 -0
  72. package/dist/templates/default/packages/backend/convex/previews/token/actions/create.ts +69 -0
  73. package/dist/templates/default/packages/backend/convex/previews/token/actions/management.ts +133 -0
  74. package/dist/templates/default/packages/backend/convex/previews/token/internal.ts +1 -0
  75. package/dist/templates/default/packages/backend/convex/releases/internal.ts +28 -0
  76. package/dist/templates/default/packages/backend/convex/schema.ts +34 -4
  77. package/dist/templates/default/packages/backend/convex/users/index.ts +21 -0
  78. package/dist/templates/default/packages/backend/convex/users/internal.ts +44 -0
  79. package/dist/templates/default/packages/backend/convex/validator.ts +87 -0
  80. package/dist/templates/default/packages/backend/generate.ts +6 -1
  81. package/dist/templates/default/packages/backend/generated/openapi.json +961 -43
  82. package/dist/templates/default/packages/backend/generated/pages.json +0 -8
  83. package/dist/templates/default/packages/backend/generated/platforms.ts +14 -2
  84. package/dist/templates/default/packages/backend/package.json +1 -1
  85. package/dist/templates/default/packages/cli/README.md +15 -9
  86. package/dist/templates/default/packages/cli/auth.ts +11 -3
  87. package/dist/templates/default/packages/cli/commands.ts +236 -0
  88. package/dist/templates/default/packages/cli/index.ts +2 -142
  89. package/dist/templates/default/packages/cli/preview.ts +157 -0
  90. package/dist/templates/default/packages/disposabl-kit/client/components/ui/log-out.tsx +16 -0
  91. package/dist/templates/default/packages/disposabl-kit/client/lib/prerender.ts +6 -3
  92. package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/login.tsx +1 -1
  93. package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/signUp.tsx +1 -1
  94. package/dist/templates/default/packages/disposabl-kit/client/routes/_authenticated/route.tsx +25 -16
  95. package/dist/templates/default/packages/disposabl-kit/client/routes/consent.tsx +3 -2
  96. package/dist/templates/default/packages/disposabl-kit/client/routes/route.tsx +57 -2
  97. package/dist/templates/default/packages/disposabl-kit/client/vite.config.ts +20 -9
  98. package/dist/templates/default/packages/disposabl-kit/eslint.config.js +1 -1
  99. package/dist/templates/default/packages/disposabl-kit/features.ts +4 -0
  100. package/dist/templates/default/packages/disposabl-kit/mobile/components/auth-form.tsx +125 -0
  101. package/dist/templates/default/packages/disposabl-kit/mobile/components/auth-ui.tsx +107 -0
  102. package/dist/templates/default/packages/disposabl-kit/mobile/expo-plugin.cjs +26 -0
  103. package/dist/templates/default/packages/disposabl-kit/mobile/index.ts +10 -0
  104. package/dist/templates/default/packages/disposabl-kit/mobile/layout.tsx +101 -0
  105. package/dist/templates/default/packages/disposabl-kit/mobile/lib/auth-errors.ts +40 -0
  106. package/dist/templates/default/packages/disposabl-kit/mobile/lib/auth-storage.ts +9 -0
  107. package/dist/templates/default/packages/disposabl-kit/mobile/lib/convex.ts +1 -0
  108. package/dist/templates/default/packages/disposabl-kit/mobile/lib/logo.png +0 -0
  109. package/dist/templates/default/packages/disposabl-kit/mobile/screens/account.tsx +67 -0
  110. package/dist/templates/default/packages/disposabl-kit/mobile/screens/home.tsx +65 -0
  111. package/dist/templates/default/packages/disposabl-kit/mobile/screens/login.tsx +5 -0
  112. package/dist/templates/default/packages/disposabl-kit/mobile/screens/signup.tsx +5 -0
  113. package/dist/templates/default/packages/disposabl-kit/package.json +24 -1
  114. package/dist/templates/default/packages/disposabl-kit/platforms.ts +1 -27
  115. package/dist/templates/default/packages/disposabl-kit/server/http.ts +6 -0
  116. package/dist/templates/default/packages/disposabl-kit/server/lib/docs.test.ts +111 -0
  117. package/dist/templates/default/packages/disposabl-kit/server/lib/docs.ts +62 -0
  118. package/dist/templates/default/packages/disposabl-kit/tsconfig.json +1 -1
  119. package/dist/templates/default/packages/sdk/README.md +8 -4
  120. package/dist/templates/default/packages/sdk/src/config.ts +14 -7
  121. package/dist/templates/default/packages/sdk/src/generated/index.ts +48 -13
  122. package/dist/templates/default/packages/sdk/src/generated/sdk.gen.ts +139 -27
  123. package/dist/templates/default/packages/sdk/src/generated/types.gen.ts +440 -37
  124. package/dist/templates/default/turbo.json +7 -0
  125. package/package.json +6 -3
  126. package/dist/templates/default/.github/README.md +0 -99
  127. package/dist/templates/default/.github/actionlint.yaml +0 -6
  128. package/dist/templates/default/.github/workflows/pipeline.yml.example +0 -546
  129. package/dist/templates/default/apps/blog/package.json +0 -1
  130. package/dist/templates/default/apps/changelog/package.json +0 -1
  131. package/dist/templates/default/apps/desktop/.oxfmtrc.json +0 -5
  132. package/dist/templates/default/apps/desktop/.oxlintrc.json +0 -6
  133. package/dist/templates/default/apps/desktop/README.md +0 -88
  134. package/dist/templates/default/apps/desktop/build-ci.mjs +0 -56
  135. package/dist/templates/default/apps/desktop/forge.config.mts +0 -109
  136. package/dist/templates/default/apps/desktop/index.html +0 -12
  137. package/dist/templates/default/apps/desktop/package.json +0 -55
  138. package/dist/templates/default/apps/desktop/src/declarations.d.ts +0 -2
  139. package/dist/templates/default/apps/desktop/src/index.css +0 -8
  140. package/dist/templates/default/apps/desktop/src/main.ts +0 -58
  141. package/dist/templates/default/apps/desktop/src/preload.ts +0 -3
  142. package/dist/templates/default/apps/desktop/src/renderer.ts +0 -19
  143. package/dist/templates/default/apps/desktop/tsconfig.json +0 -14
  144. package/dist/templates/default/apps/desktop/vite.main.config.mts +0 -4
  145. package/dist/templates/default/apps/desktop/vite.preload.config.mts +0 -4
  146. package/dist/templates/default/apps/desktop/vite.renderer.config.mts +0 -4
  147. package/dist/templates/default/apps/web/src/router/_authenticated/todos/$id.tsx +0 -27
  148. package/dist/templates/default/apps/web/src/router/_authenticated/todos/index.tsx +0 -33
  149. package/dist/templates/default/packages/backend/convex/todos/index.ts +0 -26
  150. package/dist/templates/default/packages/backend/convex/todos/internal.ts +0 -43
  151. package/dist/templates/default/packages/backend/convex/users.ts +0 -20
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ check_source() { test "$(gh api "repos/$GH_REPO/$SOURCE_PATH" --jq 'if has("head") then (if .state == "open" then .head.sha else "closed" end) else .object.sha end')" = "$SOURCE"; }
4
+ check_source
5
+ for file in dist/release/*; do test -f "$file"; test -s "$file"; done
6
+ case "$PLATFORM" in
7
+ android) test -s dist/release/android.apk; test -s dist/release/android.json ;;
8
+ ios) test -s dist/release/ios.ipa; test -s dist/release/ios.json ;;
9
+ linux) compgen -G 'dist/release/*.deb' > /dev/null; compgen -G 'dist/release/*.rpm' > /dev/null ;;
10
+ windows) compgen -G 'dist/release/*.exe' > /dev/null; compgen -G 'dist/release/*.nupkg' > /dev/null; test -s dist/release/RELEASES ;;
11
+ macos) compgen -G 'dist/release/*.dmg' > /dev/null ;;
12
+ *) exit 1 ;;
13
+ esac
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ if [[ "$TRUSTED" != true ]]; then VITE_CONVEX_URL=https://ci.invalid VITE_CONVEX_SITE_URL=https://ci.invalid bun run build --filter=@disposabl/web; exit; fi
4
+ : "${CONVEX_DEPLOY_KEY:?Configure the Convex deployment secret for this repository}"
5
+ cd packages/backend
6
+ export AUTH_TARGET=--prod
7
+ target=()
8
+ if [[ "$CHANNEL" != production ]]; then export AUTH_TARGET="--preview-name $CHANNEL"; target=(--preview-name "$CHANNEL"); fi
9
+ bun x --no-install convex deploy --yes "${target[@]}" --cmd-url-env-var-name CONVEX_URL --cmd 'for name in CONVEX_URL CONVEX_SITE_URL; do value=$(printenv "$name"); test -n "$value" || exit 1; for prefix in "" VITE_ EXPO_PUBLIC_; do export "$prefix$name=$value"; printf "%s=%s\n" "$prefix$name" "$value" | tee -a "$GITHUB_ENV" >> "$GITHUB_OUTPUT"; done; done; bun x --no-install --package @convex-dev/auth auth --keys-only $AUTH_TARGET && bun run --cwd ../.. build --filter=@disposabl/web'
10
+ bun x --no-install static-hosting upload $AUTH_TARGET --no-spa --dist ../../apps/web/dist/client
@@ -0,0 +1,299 @@
1
+ name: Pipeline
2
+ on:
3
+ pull_request:
4
+ branches: [main]
5
+ push:
6
+ branches: [main]
7
+ permissions:
8
+ contents: read
9
+ pull-requests: read
10
+ concurrency:
11
+ group: preview-${{ github.head_ref || github.ref_name }}
12
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
13
+ env:
14
+ CHANNEL: &channel ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || 'production' }}
15
+ DISPOSABL_MOBILE_CHANNEL: *channel
16
+ EAS_ENVIRONMENT: ${{ github.event_name == 'push' && 'production' || 'preview' }}
17
+ EAS_CLI: eas-cli@27.2.0
18
+ BUN_VERSION: &bun-version "1.4.4"
19
+ NODE_VERSION: &node-version "24"
20
+ LINUX_RUNNER: &linux-runner blacksmith-4vcpu-ubuntu-2404
21
+ WEB_RUNNER: &web-runner blacksmith-2vcpu-ubuntu-2404
22
+ WINDOWS_RUNNER: blacksmith-2vcpu-windows-2025
23
+ RELEASE_PREFIX: app
24
+ DISPOSABL_ANDROID_VERSION_CODE: ${{ github.run_number }}
25
+ GH_TOKEN: ${{ github.token }}
26
+ GH_REPO: ${{ github.repository }}
27
+ SOURCE: ${{ github.event.pull_request.head.sha || github.sha }}
28
+ SOURCE_PATH: ${{ github.event_name == 'pull_request' && format('pulls/{0}', github.event.number) || 'git/ref/heads/main' }}
29
+ DISPOSABL_RELEASE_VERSION: 1.0.${{ github.run_number }}
30
+ jobs:
31
+ web:
32
+ name: Web
33
+ # Fork code must not run in a job with deployment credentials.
34
+ if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
35
+ permissions: &release-permissions
36
+ contents: read
37
+ pull-requests: read
38
+ id-token: write
39
+ timeout-minutes: 45
40
+ runs-on: *web-runner
41
+ outputs:
42
+ desktop: ${{ steps.platforms.outputs.desktop }}
43
+ android_build: ${{ steps.fingerprint.outputs.build }}
44
+ android_runtime: ${{ steps.fingerprint.outputs.runtime }}
45
+ android_manifest: ${{ steps.fingerprint.outputs.manifest }}
46
+ convex_url: ${{ steps.deploy.outputs.CONVEX_URL }}
47
+ convex_site_url: ${{ steps.deploy.outputs.CONVEX_SITE_URL }}
48
+ env:
49
+ PLATFORM: android
50
+ EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
51
+ EXPO_PROJECT_ID: ${{ vars.EXPO_PROJECT_ID }}
52
+ EXPO_OWNER: ${{ vars.EXPO_OWNER }}
53
+ EXPO_SLUG: ${{ vars.EXPO_SLUG }}
54
+ EXPO_NO_DOTENV: "1"
55
+ steps:
56
+ - &checkout
57
+ uses: actions/checkout@v6
58
+ with: { ref: "${{ env.SOURCE }}", persist-credentials: false }
59
+ - &platforms
60
+ name: Platforms
61
+ shell: bash
62
+ id: platforms
63
+ env:
64
+ BEFORE: ${{ github.event.before }}
65
+ PR: ${{ github.event.number }}
66
+ TRUSTED: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}
67
+ run: bash "$GITHUB_WORKSPACE/.github/scripts/platforms.sh"
68
+ - &node
69
+ uses: actions/setup-node@v6
70
+ with: { node-version: *node-version, package-manager-cache: false }
71
+ - &app-token
72
+ name: Disposabl GitHub App token
73
+ run: node .github/scripts/disposabl.mjs token
74
+ - &bun
75
+ uses: oven-sh/setup-bun@v2
76
+ with: { bun-version: *bun-version }
77
+ - &cache
78
+ uses: actions/cache@v4
79
+ with:
80
+ path: ~/.bun/install/cache
81
+ key: bun-${{ github.job == 'desktop' && 'desktop-' || '' }}${{ runner.os }}-${{ runner.arch }}-${{ env.BUN_VERSION }}-${{ hashFiles('bun.lock') }}
82
+ restore-keys: bun-${{ github.job == 'desktop' && 'desktop-' || '' }}${{ runner.os }}-${{ runner.arch }}-${{ env.BUN_VERSION }}-
83
+ - &install
84
+ run: bun install --frozen-lockfile ${{ github.job == 'desktop' && '--filter desktop' || (github.job == 'android') && '--filter @disposabl/mobile' || '' }}
85
+ - name: Report build start
86
+ run: |
87
+ node .github/scripts/disposabl.mjs report web,api,mcp building
88
+ if [[ -z "$EXPO_TOKEN" ]]; then node .github/scripts/disposabl.mjs report android blocked 'Connect Expo before building Android.'; fi
89
+ node .github/scripts/disposabl.mjs report ios,macos blocked 'Apple builds are temporarily disabled.'
90
+ if [[ '${{ github.event_name }}' == pull_request ]]; then node .github/scripts/disposabl.mjs report cli,typescript-sdk blocked 'Packages publish after merge to main.'; fi
91
+ - name: Check
92
+ run: bun run check
93
+ - name: Build selected clients
94
+ run: |
95
+ for package in cli sdk; do
96
+ if test -f "packages/$package/package.json"; then bun run --cwd "packages/$package" build; fi
97
+ done
98
+ - name: Deploy
99
+ id: deploy
100
+ env:
101
+ TRUSTED: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}
102
+ CONVEX_DEPLOY_KEY: ${{ secrets[github.event_name == 'push' && 'CONVEX_DEPLOY_KEY' || 'CONVEX_DEPLOY_KEY_PREVIEW'] }}
103
+ run: bash "$GITHUB_WORKSPACE/.github/scripts/web-deploy.sh"
104
+ - name: Report web result
105
+ if: always()
106
+ run: node .github/scripts/disposabl.mjs report web,api,mcp ${{ steps.deploy.outcome == 'success' && 'ready' || 'failed' }}
107
+ - &expo
108
+ name: Expo
109
+ if: github.job == 'android' || steps.platforms.outputs.android == 'true'
110
+ working-directory: apps/mobile
111
+ run: bash "$GITHUB_WORKSPACE/.github/scripts/expo-env.sh"
112
+ - name: Channel
113
+ if: steps.platforms.outputs.android == 'true'
114
+ working-directory: apps/mobile
115
+ run: bash "$GITHUB_WORKSPACE/.github/scripts/expo-channel.sh"
116
+ - name: Fingerprint
117
+ id: fingerprint
118
+ if: steps.platforms.outputs.android == 'true'
119
+ working-directory: apps/mobile
120
+ run: bash "$GITHUB_WORKSPACE/.github/scripts/expo-fingerprint.sh"
121
+ - name: Update
122
+ if: steps.fingerprint.outputs.build == 'false'
123
+ env:
124
+ TAG: ${{ steps.fingerprint.outputs.tag }}
125
+ SHA: ${{ steps.fingerprint.outputs.sha }}
126
+ RUNTIME: ${{ steps.fingerprint.outputs.runtime }}
127
+ MANIFEST: ${{ steps.fingerprint.outputs.manifest }}
128
+ run: bash "$GITHUB_WORKSPACE/.github/scripts/expo-update.sh"
129
+ - &publish
130
+ name: Publish
131
+ if: github.job == 'android' || (github.job == 'web' && hashFiles('dist/release/android.json') != '') || github.job == 'desktop'
132
+ shell: bash
133
+ run: bash "$GITHUB_WORKSPACE/.github/scripts/verify-artifacts.sh"
134
+ - &artifacts
135
+ name: Upload release artifacts
136
+ if: hashFiles('dist/release/*') != ''
137
+ uses: actions/upload-artifact@v4
138
+ with:
139
+ name: release-${{ env.PLATFORM }}
140
+ path: dist/release/
141
+ retention-days: 3
142
+ if-no-files-found: error
143
+ android:
144
+ name: Android
145
+ needs: web
146
+ if: needs.web.outputs.android_build == 'true'
147
+ permissions: *release-permissions
148
+ runs-on: *linux-runner
149
+ timeout-minutes: 60
150
+ env:
151
+ PLATFORM: android
152
+ EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
153
+ EXPO_PROJECT_ID: ${{ vars.EXPO_PROJECT_ID }}
154
+ EXPO_OWNER: ${{ vars.EXPO_OWNER }}
155
+ EXPO_SLUG: ${{ vars.EXPO_SLUG }}
156
+ EXPO_NO_DOTENV: "1"
157
+ CONVEX_URL: ${{ needs.web.outputs.convex_url }}
158
+ CONVEX_SITE_URL: ${{ needs.web.outputs.convex_site_url }}
159
+ EXPO_PUBLIC_CONVEX_URL: ${{ needs.web.outputs.convex_url }}
160
+ EXPO_PUBLIC_CONVEX_SITE_URL: ${{ needs.web.outputs.convex_site_url }}
161
+ steps:
162
+ - *checkout
163
+ - *platforms
164
+ - *node
165
+ - *app-token
166
+ - *bun
167
+ - *cache
168
+ - *install
169
+ - name: Report mobile build
170
+ run: node .github/scripts/disposabl.mjs report "$PLATFORM" building
171
+ - *expo
172
+ - name: Java
173
+ uses: actions/setup-java@v5
174
+ with: { distribution: temurin, java-version: "17" }
175
+ - name: SDK
176
+ uses: android-actions/setup-android@v3
177
+ with: { packages: platform-tools }
178
+ - name: Gradle
179
+ uses: gradle/actions/setup-gradle@v4
180
+ with: { cache-read-only: false }
181
+ - name: Build
182
+ working-directory: apps/mobile
183
+ env:
184
+ RUNTIME: ${{ needs.web.outputs.android_runtime }}
185
+ DISPOSABL_ANDROID_CHANNEL: *channel
186
+ MANIFEST: ${{ needs.web.outputs.android_manifest }}
187
+ ANDROID_KEYSTORE_BASE64: ${{ github.event_name == 'push' && secrets.ANDROID_KEYSTORE_BASE64 || '' }}
188
+ ANDROID_KEYSTORE_PASSWORD: ${{ github.event_name == 'push' && secrets.ANDROID_KEYSTORE_PASSWORD || '' }}
189
+ ANDROID_KEY_ALIAS: ${{ github.event_name == 'push' && secrets.ANDROID_KEY_ALIAS || '' }}
190
+ ANDROID_KEY_PASSWORD: ${{ github.event_name == 'push' && secrets.ANDROID_KEY_PASSWORD || '' }}
191
+ run: bash "$GITHUB_WORKSPACE/.github/scripts/android-build.sh"
192
+ - *publish
193
+ - *artifacts
194
+ - name: Report Android failure
195
+ if: failure() || cancelled()
196
+ run: node .github/scripts/disposabl.mjs report android failed
197
+ # iOS and macOS builds remain disabled to avoid paid Apple runners.
198
+ desktop:
199
+ needs: web
200
+ permissions: *release-permissions
201
+ name: ${{ matrix.platform }}
202
+ if: needs.web.outputs.desktop != '[]' && needs.web.outputs.desktop != ''
203
+ strategy:
204
+ fail-fast: false
205
+ matrix:
206
+ include: ${{ fromJSON(needs.web.outputs.desktop) }}
207
+ runs-on: ${{ matrix.runner }}
208
+ timeout-minutes: 30
209
+ env:
210
+ PLATFORM: ${{ matrix.platform }}
211
+ DISPOSABL_DESKTOP_PLATFORM: ${{ matrix.platform }}
212
+ CONVEX_SITE_URL: ${{ needs.web.outputs.convex_site_url }}
213
+ electron_config_cache: ${{ github.workspace }}/.cache/electron
214
+ steps:
215
+ - *checkout
216
+ - *node
217
+ - *app-token
218
+ - *bun
219
+ - *cache
220
+ - *install
221
+ - name: Report desktop build
222
+ run: node .github/scripts/disposabl.mjs report "$PLATFORM" building
223
+ - name: Electron
224
+ uses: actions/cache@v4
225
+ with:
226
+ path: .cache/electron
227
+ key: electron-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('bun.lock') }}
228
+ - name: Packages
229
+ if: matrix.platform == 'linux'
230
+ run: command -v fakeroot && command -v rpmbuild && command -v dpkg-deb || { sudo apt-get update && sudo apt-get install -y fakeroot dpkg rpm; }
231
+ - name: Build
232
+ run: bun run --cwd apps/desktop preview
233
+ - *publish
234
+ - *artifacts
235
+ - name: Report desktop failure
236
+ if: failure() || cancelled()
237
+ run: node .github/scripts/disposabl.mjs report "$PLATFORM" failed
238
+ packages:
239
+ name: Package / ${{ matrix.package }}
240
+ needs: web
241
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
242
+ runs-on: ubuntu-latest
243
+ permissions:
244
+ contents: write
245
+ id-token: write
246
+ concurrency:
247
+ group: npm-${{ matrix.package }}
248
+ cancel-in-progress: false
249
+ queue: max
250
+ strategy:
251
+ fail-fast: false
252
+ matrix:
253
+ package: [cli, sdk]
254
+ env:
255
+ PACKAGE: ${{ matrix.package }}
256
+ steps:
257
+ - uses: actions/checkout@v6
258
+ with: { fetch-depth: 0, persist-credentials: false }
259
+ - *node
260
+ - *bun
261
+ - *cache
262
+ - *install
263
+ - *app-token
264
+ - name: Publish package if configured
265
+ run: bash .github/scripts/package-release.sh
266
+
267
+ # The publisher executes scripts from main only; the authorizer verifies workflow_sha.
268
+ publish:
269
+ needs: [web, android, desktop]
270
+ if: always() && !cancelled() && !contains(needs.*.result, 'failure') && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
271
+ environment: publishing
272
+ runs-on: ubuntu-latest
273
+ timeout-minutes: 15
274
+ permissions:
275
+ contents: write
276
+ actions: read
277
+ id-token: write
278
+ steps:
279
+ - uses: actions/checkout@v6
280
+ with:
281
+ ref: main
282
+ persist-credentials: false
283
+ - uses: actions/setup-node@v6
284
+ with:
285
+ node-version: "24"
286
+ package-manager-cache: false
287
+ - name: Disposabl installation token
288
+ run: node .github/scripts/disposabl.mjs token
289
+ - name: Select release source
290
+ id: source
291
+ run: bash .github/scripts/release-source.sh
292
+ - uses: actions/download-artifact@v4
293
+ if: steps.source.outputs.current == 'true'
294
+ with:
295
+ pattern: release-*
296
+ path: artifacts
297
+ - name: Publish verified build artifacts
298
+ if: steps.source.outputs.current == 'true'
299
+ run: bash .github/scripts/release-publish.sh
@@ -0,0 +1,37 @@
1
+ # Documentation
2
+
3
+ Choose `--features docs` when creating an app. The generator includes Fumapress,
4
+ the web build dependency and copy step, and the `/docs` HTTP routes. Without
5
+ docs, it removes this workspace and all of those hooks.
6
+
7
+ Add Markdown or MDX files in `apps/docs/content` and commit them with your PR.
8
+ `content/index.mdx` is the docs home. `content/guides/writing.mdx` becomes
9
+ `/docs/guides/writing`. Fumapress builds the sidebar and static search index from
10
+ these files. Use `/guides/writing` for internal docs links; Fumapress adds `/docs`.
11
+ Use an ordinary `<a href="/docs/">` link from the web app to enter docs.
12
+
13
+ Run `bun run build`, or `bun run build --filter=@disposabl/web` for the website
14
+ and its dependencies. Turbo builds docs first, then web copies the rendered site
15
+ into its output. Both build tasks run without caching so deleted pages cannot
16
+ survive a cache restore:
17
+
18
+ ```text
19
+ apps/web/dist/client/
20
+ index.html
21
+ assets/
22
+ docs/
23
+ index.html
24
+ guides/writing/index.html
25
+ assets/
26
+ RSC/
27
+ api/search
28
+ ```
29
+
30
+ The PR and production pipeline template uses that same web build command and
31
+ uploads `apps/web/dist/client` once to Convex static hosting. Docs changes ship
32
+ with the web app. There is no docs dev server or runtime build process.
33
+
34
+ Run `bun run --cwd apps/docs build` to build only the documentation. Local web
35
+ development does not serve docs; rendered docs are included in the combined
36
+ build and deployment. Adding docs to an app generated without them requires
37
+ restoring the workspace and build hooks, not just changing `disposabl.json`.
@@ -0,0 +1,15 @@
1
+ ---
2
+ title: Writing docs
3
+ description: Add pages with Markdown and MDX.
4
+ ---
5
+
6
+ ## Add a page
7
+
8
+ Create a Markdown or MDX file in `apps/docs/content` with a `title` in its frontmatter.
9
+ For example, `content/guides/setup.mdx` becomes `/docs/guides/setup`.
10
+
11
+ ## Navigation
12
+
13
+ Fumapress builds the sidebar from the content directory. Add a `meta.json` file to control the page order.
14
+
15
+ [Back to documentation](/)
@@ -0,0 +1,10 @@
1
+ ---
2
+ title: Documentation
3
+ description: Guides for your application.
4
+ ---
5
+
6
+ ## Get started
7
+
8
+ Write your documentation in `apps/docs/content`.
9
+
10
+ [Learn how to add a page](/guides/writing)
@@ -1 +1,29 @@
1
- {}
1
+ {
2
+ "name": "@disposabl/docs",
3
+ "private": true,
4
+ "type": "module",
5
+ "scripts": {
6
+ "build": "fumapress build",
7
+ "typecheck": "tsc --noEmit"
8
+ },
9
+ "dependencies": {
10
+ "@base-ui/react": "^1.9.0",
11
+ "fumadocs-core": "^16.16.2",
12
+ "fumadocs-mdx": "^15.4.6",
13
+ "fumadocs-ui": "npm:@fumadocs/base-ui@^16.16.2",
14
+ "fumapress": "1.6.2",
15
+ "react": "catalog:",
16
+ "react-dom": "catalog:",
17
+ "waku": "1.0.0-rc.1"
18
+ },
19
+ "devDependencies": {
20
+ "@tailwindcss/vite": "^4",
21
+ "@types/mdx": "^2",
22
+ "@types/node": "^22",
23
+ "@types/react": "^19",
24
+ "@types/react-dom": "^19",
25
+ "tailwindcss": "^4",
26
+ "typescript": "^6.0.2",
27
+ "vite": "^8"
28
+ }
29
+ }
@@ -0,0 +1,20 @@
1
+ import { flexsearchPlugin } from "fumapress/plugins/flexsearch";
2
+ import { defineConfig } from "fumapress";
3
+ import { fumadocsMdx } from "fumapress/adapters/mdx";
4
+ import { metaSchema, pageSchema } from "fumapress/adapters/mdx/schema";
5
+ import { defineDocs } from "fumadocs-mdx/macro";
6
+
7
+ const docs = defineDocs({
8
+ dir: "content",
9
+ docs: { async: true, schema: pageSchema },
10
+ meta: { schema: metaSchema },
11
+ });
12
+
13
+ export default defineConfig({
14
+ mode: "static",
15
+ preset: false,
16
+ content: docs.toFumadocsSource(),
17
+ site: { name: "Documentation" },
18
+ })
19
+ .adapters(fumadocsMdx())
20
+ .plugins(flexsearchPlugin());
@@ -0,0 +1,4 @@
1
+ @import "tailwindcss";
2
+ @import "fumadocs-ui/css/neutral.css";
3
+ @import "fumadocs-ui/css/preset.css";
4
+ @import "fumapress/css/preset.css";
@@ -0,0 +1,14 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
5
+ "module": "ESNext",
6
+ "moduleResolution": "bundler",
7
+ "jsx": "react-jsx",
8
+ "strict": true,
9
+ "noEmit": true,
10
+ "skipLibCheck": true,
11
+ "types": ["vite/client"]
12
+ },
13
+ "include": ["*.ts", "src"]
14
+ }
@@ -0,0 +1,8 @@
1
+ import { defineConfig } from "vite";
2
+ import tailwindcss from "@tailwindcss/vite";
3
+ import press from "fumapress/vite";
4
+ import { fumadocsMdx } from "fumadocs-mdx/vite";
5
+
6
+ export default defineConfig({
7
+ plugins: [press({ basePath: "/docs/" }), fumadocsMdx(), tailwindcss()],
8
+ });
@@ -0,0 +1,2 @@
1
+ EXPO_PUBLIC_CONVEX_URL=https://your-deployment.convex.cloud
2
+ EXPO_PUBLIC_CONVEX_SITE_URL=https://your-deployment.convex.site
@@ -14,7 +14,7 @@ Use `bunx` instead of `npx` if the project uses bun (`bun.lock` present).
14
14
 
15
15
  ```bash
16
16
  npx expo install <package> # ALWAYS use instead of npm/yarn/pnpm/bun add — resolves SDK-compatible versions
17
- npx expo start # start the dev server
17
+ npx expo start --dev-client # start the development-build server
18
18
  npx expo lint # lint
19
19
  npx tsc --noEmit # typecheck
20
20
  npx expo-doctor # diagnose dependency and config issues
@@ -37,5 +37,5 @@ Docs: https://docs.expo.dev/eas/index.md
37
37
  ## Rules
38
38
 
39
39
  - If `ios/` and `android/` directories do not exist, they are generated (Continuous Native Generation). Never create or edit them by hand — configure native behavior in `app.json` and config plugins.
40
- - Expo Go only includes its bundled native modules. After adding a library with native code, the app needs a development build: `npx expo run:ios|android` locally, or `eas build --profile development`.
40
+ - Never use Expo Go. After adding a library with native code, rebuild the development client: `npx expo run:ios|android` locally, or `eas build --profile development`.
41
41
  - Prefer recommended Expo modules over third-party libraries, and check your available skills before adding dependencies. Docs: https://docs.expo.dev/versions/latest/index.md
@@ -1,5 +1,65 @@
1
1
  # Mobile previews and updates
2
2
 
3
+ ## Local development and authentication
4
+
5
+ Mobile uses the same Convex Auth v2 username/password accounts as the website.
6
+ `@disposabl/disposabl-kit/mobile` owns the provider, signup/login forms, session
7
+ storage, route guards, and account screen. Files in `src/app/` only re-export
8
+ these reusable screens and layouts. Add custom app screens alongside them.
9
+
10
+ Routes outside `(authenticated)` are public. Put screens that require login
11
+ under `src/app/(authenticated)/`; its shared layout guards every descendant,
12
+ including direct links. The `(auth)` group contains login and signup. Successful
13
+ login opens the account screen, where `users.index.current` returns the caller's
14
+ username and user ID from Convex. Logout clears the session and returns home.
15
+ Expo SecureStore persists tokens per deployment across app restarts.
16
+
17
+ Include `"authentication"` in root `disposabl.json` features to enable frontend
18
+ auth. The generator omits login, signup, consent, and auth-dependent sample
19
+ screens when this feature is not selected. Missing routes return not found;
20
+ they do not redirect home. Mobile gets a public home and route-group layout.
21
+ The root provider selects Convex with or without auth; individual screens do
22
+ not check the feature flag. Backend authentication and its access checks remain
23
+ installed and enforced. Removing auth from an existing app also means deleting
24
+ its auth routes and replacing any auth-dependent UI, as the generator does for
25
+ new apps. Rebuild preview/release apps after changing routes or features.
26
+
27
+ Expo autolinking deduplicates React, Convex, and Convex Auth between the app and
28
+ kit so native screens use the app's React version and a single auth context.
29
+ The kit's Expo config plugin adds workspace sources, the feature list, and public
30
+ backend URL inputs to Android release bundling, so Gradle rebuilds the embedded
31
+ JavaScript after shared kit or configuration changes.
32
+
33
+ For a new worktree, install dependencies with `bun install`, then select an
34
+ isolated Convex dev deployment. Substitute your own team, project, and branch:
35
+
36
+ ```sh
37
+ cd packages/backend
38
+ bunx convex deployment create YOUR_TEAM:YOUR_PROJECT:dev/YOUR_BRANCH --type dev --select
39
+ bun run predev
40
+ bunx convex dev --once
41
+ ```
42
+
43
+ Copy the generated `CONVEX_URL` and `CONVEX_SITE_URL` from
44
+ `packages/backend/.env.local` into `apps/mobile/.env.local` as
45
+ `EXPO_PUBLIC_CONVEX_URL` and `EXPO_PUBLIC_CONVEX_SITE_URL`. Use the same pair in
46
+ `apps/web/.env.local` as `VITE_CONVEX_URL` and `VITE_CONVEX_SITE_URL`.
47
+ These files are ignored by Git. Run `bun run dev` from the repository root to
48
+ start the backend, website, and Metro. Restart Metro after changing these URLs.
49
+ The cloud URL connects the mobile client; the site URL is available for HTTP
50
+ endpoints and is not needed for the native password flow.
51
+
52
+ Use a development build containing `expo-dev-client` and `expo-secure-store`.
53
+ Run `bun run android` or `bun run ios` once to install it, then use `bun run dev`.
54
+ Expo Go is not supported. No browser redirect or custom token exchange is needed
55
+ for username/password login. OAuth would require a separate browser flow.
56
+
57
+ Checked npm and the Convex Auth `reboot` branch on 2026-11-02. The latest v2 beta
58
+ is still `2.0.0-beta.0`. Its React provider already supports async SecureStore
59
+ storage. The relevant upstream provider and session code at
60
+ `db15c82e6f568d7717563783447010f9a5534359` adds no native password requirement,
61
+ so this integration uses the published package without another auth patch.
62
+
3
63
  Mobile previews are release builds with embedded JavaScript, not development
4
64
  clients. Android uses `assembleRelease`; iOS internal profiles explicitly disable
5
65
  `developmentClient`. They run without Metro or Expo Go and use EAS Update for
@@ -95,10 +155,10 @@ The job has `contents: write`; fork PRs never deploy or publish. There is no
95
155
  intermediate Actions artifact. This workflow does not submit to Google Play or
96
156
  the App Store.
97
157
 
98
- The mobile UI is still the starter screen. Backend URLs are available to mobile
99
- code through `process.env.EXPO_PUBLIC_CONVEX_URL` and
100
- `process.env.EXPO_PUBLIC_CONVEX_SITE_URL`; mobile authentication is not added by
101
- the distribution workflow.
158
+ Backend URLs are available to mobile code through
159
+ `process.env.EXPO_PUBLIC_CONVEX_URL` and
160
+ `process.env.EXPO_PUBLIC_CONVEX_SITE_URL`. The distribution workflow supplies
161
+ them to the same native authentication flow used during development.
102
162
 
103
163
  ## iOS
104
164
 
@@ -8,23 +8,24 @@
8
8
  "scheme": "mobile",
9
9
  "userInterfaceStyle": "automatic",
10
10
  "ios": {
11
- "icon": "./assets/expo.icon"
11
+ "icon": "./assets/images/icon.png"
12
12
  },
13
13
  "android": {
14
14
  "adaptiveIcon": {
15
- "backgroundColor": "#E6F4FE",
15
+ "backgroundColor": "#FFFFFF",
16
16
  "foregroundImage": "./assets/images/android-icon-foreground.png",
17
- "backgroundImage": "./assets/images/android-icon-background.png",
18
17
  "monochromeImage": "./assets/images/android-icon-monochrome.png"
19
18
  },
20
19
  "predictiveBackGestureEnabled": false
21
20
  },
22
21
  "plugins": [
23
22
  "expo-router",
23
+ "expo-secure-store",
24
+ "@disposabl/disposabl-kit/mobile/expo-plugin",
24
25
  [
25
26
  "expo-splash-screen",
26
27
  {
27
- "backgroundColor": "#208AEF",
28
+ "backgroundColor": "#FFFFFF",
28
29
  "image": "./assets/images/splash-icon.png",
29
30
  "imageWidth": 76
30
31
  }
@@ -17,6 +17,11 @@
17
17
  "environment": "production",
18
18
  "credentialsSource": "remote",
19
19
  "channel": "production"
20
+ },
21
+ "development": {
22
+ "developmentClient": true,
23
+ "distribution": "internal",
24
+ "environment": "development"
20
25
  }
21
26
  }
22
27
  }