@www.hyperlinks.space/program-kit 1.2.3 → 1.2.181818
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.
- package/README.md +8 -8
- package/app/_layout.tsx +5 -6
- package/app/index.tsx +1 -1
- package/assets/images/PreviewImage.png +0 -0
- package/database/start.ts +1 -3
- package/docs/build_and_install.md +6 -6
- package/docs/npm-release.md +46 -0
- package/docs/releases.md +5 -5
- package/docs/releases_github_actions.md +5 -5
- package/docs/security_plan_raw.md +4 -4
- package/docs/security_raw.md +2 -2
- package/docs/timing_raw.md +7 -7
- package/docs/update.md +11 -11
- package/docs/wallet_telegram_standalone_multichain_proposal.md +192 -0
- package/docs/wallets_hosting_architecture.md +1 -1
- package/fullREADME.md +101 -81
- package/npmReadMe.md +8 -8
- package/package.json +2 -2
- package/scripts/load-env.ts +1 -3
- package/scripts/test-api-base.ts +1 -1
- package/tsconfig.json +1 -1
- package/windows/build.cjs +1 -1
- package/windows/cleanup-legacy-appdata-installs.ps1 +1 -1
- package/windows/product-brand.cjs +1 -1
- package/app/components/GlobalBottomBar.tsx +0 -447
- package/app/components/GlobalBottomBarWeb.tsx +0 -362
- package/app/components/GlobalLogoBar.tsx +0 -108
- package/app/components/GlobalLogoBarFallback.tsx +0 -66
- package/app/components/GlobalLogoBarWithFallback.tsx +0 -24
- package/app/components/HyperlinksSpaceLogo.tsx +0 -29
- package/app/components/Telegram.tsx +0 -648
- package/app/components/telegramWebApp.ts +0 -359
- package/app/fonts.ts +0 -12
- package/app/theme.ts +0 -117
- package/docs/backlogs/medium_term_backlog.md +0 -26
- package/docs/backlogs/short_term_backlog.md +0 -39
- package/eslint.config.js +0 -10
package/README.md
CHANGED
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
# Program Kit
|
|
2
2
|
|
|
3
|
-
Program Kit is a production-ready cross-platform starter published from
|
|
3
|
+
Program Kit is a production-ready cross-platform starter published from repository root.
|
|
4
4
|
It is built around React Native + Expo and is designed to be quickly tested, scaled,
|
|
5
5
|
and deployed across popular platforms.
|
|
6
6
|
|
|
7
7
|
## What You Get
|
|
8
8
|
|
|
9
9
|
- Expo + React Native app foundation
|
|
10
|
-
- Telegram bot support (webhook + local bot scripts)
|
|
10
|
+
- Telegram bot support (webhook + local bot scripts) with AI functionality
|
|
11
11
|
- Telegram Mini App-ready client structure
|
|
12
|
-
- Android and iOS
|
|
12
|
+
- Android and iOS clients
|
|
13
13
|
- Windows desktop packaging (`.exe`) with Electron Builder
|
|
14
14
|
- CI-oriented release workflow and deployment helpers
|
|
15
|
+
- OpenAI functionality and Swap.Coffee for blockchain data retrievement
|
|
15
16
|
|
|
16
17
|
## Install
|
|
17
18
|
|
|
18
19
|
### npmjs (public)
|
|
19
20
|
|
|
20
21
|
```bash
|
|
21
|
-
npx @www.hyperlinks.space/program-kit ./
|
|
22
|
+
npx @www.hyperlinks.space/program-kit ./new-program
|
|
22
23
|
```
|
|
23
24
|
|
|
24
25
|
### GitHub Packages
|
|
25
26
|
|
|
26
27
|
```bash
|
|
27
|
-
npx @hyperlinksspace/program-kit ./
|
|
28
|
+
npx @hyperlinksspace/program-kit ./new-program
|
|
28
29
|
```
|
|
29
30
|
|
|
30
31
|
If you install from GitHub Packages, configure `.npmrc` with the `@hyperlinksspace`
|
|
@@ -33,12 +34,12 @@ registry and token.
|
|
|
33
34
|
## After Scaffold
|
|
34
35
|
|
|
35
36
|
```bash
|
|
36
|
-
cd
|
|
37
|
+
cd new-program
|
|
37
38
|
npm install
|
|
38
39
|
npm run start
|
|
39
40
|
```
|
|
40
41
|
|
|
41
|
-
Then open the project
|
|
42
|
+
Then open the project **`fullREADME.md`** for details (env vars, bot setup, build
|
|
42
43
|
and release commands).
|
|
43
44
|
|
|
44
45
|
## Release Channels
|
|
@@ -50,4 +51,3 @@ and release commands).
|
|
|
50
51
|
|
|
51
52
|
- Published directly from the `app/` folder.
|
|
52
53
|
- Package tarball is filtered to include only required project files.
|
|
53
|
-
- **`fullREADME.md`** in the package is the full in-repo developer guide (Expo setup, scripts, and the rest of the project readme).
|
package/app/_layout.tsx
CHANGED
|
@@ -2,12 +2,11 @@ import "../global.css";
|
|
|
2
2
|
import { View, StyleSheet, Platform, KeyboardAvoidingView, AppState, Alert } from "react-native";
|
|
3
3
|
import { Stack } from "expo-router";
|
|
4
4
|
import * as Updates from "expo-updates";
|
|
5
|
-
import { TelegramProvider } from "
|
|
6
|
-
import { GlobalLogoBarWithFallback } from "
|
|
7
|
-
import { GlobalBottomBar } from "
|
|
8
|
-
import { GlobalBottomBarWeb } from "
|
|
9
|
-
import { useColors } from "
|
|
10
|
-
import { useTelegram } from "./components/Telegram";
|
|
5
|
+
import { TelegramProvider, useTelegram } from "../ui/components/Telegram";
|
|
6
|
+
import { GlobalLogoBarWithFallback } from "../ui/components/GlobalLogoBarWithFallback";
|
|
7
|
+
import { GlobalBottomBar } from "../ui/components/GlobalBottomBar";
|
|
8
|
+
import { GlobalBottomBarWeb } from "../ui/components/GlobalBottomBarWeb";
|
|
9
|
+
import { useColors } from "../ui/theme";
|
|
11
10
|
import { useEffect, useRef } from "react";
|
|
12
11
|
|
|
13
12
|
/**
|
package/app/index.tsx
CHANGED
|
Binary file
|
package/database/start.ts
CHANGED
|
@@ -5,9 +5,7 @@ import path from "path";
|
|
|
5
5
|
// In Vercel Lambdas these files don't exist, so these calls are harmless no-ops.
|
|
6
6
|
const cwd = process.cwd();
|
|
7
7
|
dotenv.config({ path: path.join(cwd, ".env") });
|
|
8
|
-
dotenv.config({ path: path.join(cwd, "app", ".env") });
|
|
9
8
|
dotenv.config({ path: path.join(cwd, ".env.local") });
|
|
10
|
-
dotenv.config({ path: path.join(cwd, "app", ".env.local") });
|
|
11
9
|
import { neon } from "@neondatabase/serverless";
|
|
12
10
|
|
|
13
11
|
const connectionString = process.env.DATABASE_URL;
|
|
@@ -15,7 +13,7 @@ const connectionString = process.env.DATABASE_URL;
|
|
|
15
13
|
if (!connectionString) {
|
|
16
14
|
// Fail fast on the server side so misconfiguration is obvious in logs.
|
|
17
15
|
throw new Error(
|
|
18
|
-
"DATABASE_URL is not set. Configure it in
|
|
16
|
+
"DATABASE_URL is not set. Configure it in ./.env for the current Neon branch.",
|
|
19
17
|
);
|
|
20
18
|
}
|
|
21
19
|
|
|
@@ -5,14 +5,14 @@ This doc describes the Windows Electron build and install flow and how to speed
|
|
|
5
5
|
Exe creating example:
|
|
6
6
|
|
|
7
7
|
```
|
|
8
|
-
cd /d C:\1\1\1\1\1\HyperlinksSpaceProgram
|
|
8
|
+
cd /d C:\1\1\1\1\1\HyperlinksSpaceProgram
|
|
9
9
|
npm run build:win:verbose
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
Exe bash run example:
|
|
13
13
|
|
|
14
14
|
```
|
|
15
|
-
powershell -NoProfile -Command "Start-Process -FilePath 'C:/1/1/1/1/1/HyperlinksSpaceBot/
|
|
15
|
+
powershell -NoProfile -Command "Start-Process -FilePath 'C:/1/1/1/1/1/HyperlinksSpaceBot/releases/builder/build_03252026_1449/HyperlinksSpaceProgramInstaller_03252026_1449.exe'"
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
---
|
|
@@ -33,7 +33,7 @@ powershell -NoProfile -Command "Start-Process -FilePath 'C:/1/1/1/1/1/Hyperlinks
|
|
|
33
33
|
|
|
34
34
|
| Goal | What to do |
|
|
35
35
|
|------|------------|
|
|
36
|
-
| **Skip Expo when only Electron changed** | Use `npm run pack:win` when `dist/` is already up to date (no
|
|
36
|
+
| **Skip Expo when only Electron changed** | Use `npm run pack:win` when `dist/` is already up to date (no Expo app changes). Saves the full Expo/Metro run (often 30–60+ s). |
|
|
37
37
|
| **Skip native rebuild** | In `package.json` → `build`, add `"npmRebuild": false`. The packaged app only runs the web bundle; native rebuild can often be skipped. Try it; if the app runs, keep it. Saves time every build. |
|
|
38
38
|
| **Avoid building the installer when iterating** | Use `npm run build:win:dir` when you only need the unpacked app (e.g. quick runs from `release/win-unpacked/app.exe`). Skips NSIS and clean; faster and no “file locked” risk. |
|
|
39
39
|
| **Keep caches** | Don’t clear Metro/Expo cache unless needed. Electron and electron-builder caches (e.g. under `%LOCALAPPDATA%\electron-builder\Cache`) are reused; leave them. |
|
|
@@ -43,7 +43,7 @@ powershell -NoProfile -Command "Start-Process -FilePath 'C:/1/1/1/1/1/Hyperlinks
|
|
|
43
43
|
### Rebuilding only what changed
|
|
44
44
|
|
|
45
45
|
- **Caches:** Expo/Metro and electron-builder already use caches. A full `build:win` reuses cached transforms and packed files where nothing changed, so rebuilds are partly incremental by default.
|
|
46
|
-
- **Skip the web build when only Electron changed:** If you only changed `windows/build.cjs` or other files in `windows/`, the icon, or `package.json` build config (not the React
|
|
46
|
+
- **Skip the web build when only Electron changed:** If you only changed `windows/build.cjs` or other files in `windows/`, the icon, or `package.json` build config (not the React app code), run **`npm run pack:win`** instead of `build:win`. That runs only electron-builder + clean and reuses the existing `dist/`. Ensure `dist/` is up to date (run `npm run build` once, or after any Expo app changes).
|
|
47
47
|
|
|
48
48
|
---
|
|
49
49
|
|
|
@@ -89,8 +89,8 @@ User runs **`HyperlinksSpaceProgramInstaller.exe`**. NSIS extracts the app (e.g.
|
|
|
89
89
|
|
|
90
90
|
## 5. File layout after build
|
|
91
91
|
|
|
92
|
-
- **After `build:win` or `pack:win`:** `
|
|
93
|
-
- **After `build:win:dir`:** `
|
|
92
|
+
- **After `build:win` or `pack:win`:** `releases/builder/build_MMDDYYYY_HHMM/HyperlinksSpaceProgramInstaller_<stamp>.exe` and `releases/builder/build_MMDDYYYY_HHMM/dev/` (portable zip, yml, win-unpacked, blockmap, builder-debug.yml, builder-effective-config.yaml).
|
|
93
|
+
- **After `build:win:dir`:** `release/win-unpacked/` (run `app.exe` from there).
|
|
94
94
|
- **Build inputs:** `dist/` (Expo export), `windows/` (build.cjs, app-shell.html, preload-log.cjs), `assets/icon.ico`, and files listed under `build.files` in `package.json`.
|
|
95
95
|
|
|
96
96
|
---
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Milestone snapshot package (npm)
|
|
2
|
+
|
|
3
|
+
This repository includes a publishable snapshot package for fast developer bootstrap:
|
|
4
|
+
|
|
5
|
+
- package source: repository root (published directly)
|
|
6
|
+
- **npmjs (public):** `@www.hyperlinks.space/program-kit` — manage org and tokens: [www.hyperlinks.space on npm](https://www.npmjs.com/settings/www.hyperlinks.space/packages)
|
|
7
|
+
- **GitHub Packages:** `@hyperlinksspace/program-kit` (same version; GitHub requires the package scope to match this repo's owner)
|
|
8
|
+
|
|
9
|
+
## Verify publish payload locally
|
|
10
|
+
|
|
11
|
+
The npm package page uses `README.md` from the published tarball, not `npmReadMe.md`. The published package also includes **`fullREADME.md`**, a copy of the developer readme (saved before the npm readme replaces `README.md`). Match CI before `npm pack`, then restore:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
cp README.md fullREADME.md
|
|
15
|
+
cp npmReadMe.md README.md
|
|
16
|
+
npm pack --dry-run
|
|
17
|
+
git checkout -- README.md
|
|
18
|
+
rm -f fullREADME.md
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Install snapshot as a developer
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx @www.hyperlinks.space/program-kit ./my-hsp-app
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The CLI materializes the bundled package payload into your target folder, then you run:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
cd my-hsp-app
|
|
31
|
+
npm install
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Release channels
|
|
35
|
+
|
|
36
|
+
- `latest`: immutable stable snapshots (tag workflow `snapshot-vX.Y.Z`)
|
|
37
|
+
- `next`: rolling snapshots from manual workflow dispatch
|
|
38
|
+
|
|
39
|
+
In the output, you'll find options to open the app in:
|
|
40
|
+
|
|
41
|
+
- [a development build](https://docs.expo.dev/develop/development-builds/introduction/)
|
|
42
|
+
- [an Android emulator](https://docs.expo.dev/workflow/android-studio-emulator/)
|
|
43
|
+
- [an iOS simulator](https://docs.expo.dev/workflow/ios-simulator/)
|
|
44
|
+
- [Expo Go](https://expo.dev/go), a limited sandbox for trying out app development with Expo
|
|
45
|
+
|
|
46
|
+
You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction).
|
package/docs/releases.md
CHANGED
|
@@ -12,7 +12,7 @@ This document defines the production plan for release detection, deduped GitHub
|
|
|
12
12
|
## Source of Truth
|
|
13
13
|
|
|
14
14
|
- The **GitHub Release tag** is the release identity (`release_id`), for example `build_03252026_1929`.
|
|
15
|
-
- Locally, `windows/cleanup.cjs` moves the built installer to `
|
|
15
|
+
- Locally, `windows/cleanup.cjs` moves the built installer to `releases/builder/build_MMDDYYYY_HHMM/HyperlinksSpaceProgramInstaller_<stamp>.exe` (other artifacts under `dev/`). In CI you can set `RELEASE_BUILD_ID` to match a chosen tag, or leave it unset so the folder name comes from build time.
|
|
16
16
|
|
|
17
17
|
## Workflow Trigger
|
|
18
18
|
|
|
@@ -51,7 +51,7 @@ Recommended extra safety:
|
|
|
51
51
|
|
|
52
52
|
## Endpoint Contract
|
|
53
53
|
|
|
54
|
-
- Webhook endpoint path: `
|
|
54
|
+
- Webhook endpoint path: `api/releases.ts`
|
|
55
55
|
- Route URL: `POST /api/releases`
|
|
56
56
|
- Purpose: accept release-published events from GitHub Actions and fan out update notifications to app clients.
|
|
57
57
|
|
|
@@ -89,7 +89,7 @@ If auth fails:
|
|
|
89
89
|
}
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
-
## Endpoint Behavior (`
|
|
92
|
+
## Endpoint Behavior (`api/releases.ts`)
|
|
93
93
|
|
|
94
94
|
1. Accept only `POST`.
|
|
95
95
|
2. Validate auth token/signature.
|
|
@@ -184,7 +184,7 @@ Client behavior:
|
|
|
184
184
|
|
|
185
185
|
## Rollout Plan
|
|
186
186
|
|
|
187
|
-
1. Deploy `
|
|
187
|
+
1. Deploy `api/releases.ts` in staging.
|
|
188
188
|
2. Run workflow in dry-run mode to validate folder parsing and dedupe checks.
|
|
189
189
|
3. Enable real release creation for test folder.
|
|
190
190
|
4. Enable webhook call to staging endpoint.
|
|
@@ -193,7 +193,7 @@ Client behavior:
|
|
|
193
193
|
|
|
194
194
|
## Acceptance Criteria
|
|
195
195
|
|
|
196
|
-
- A new `
|
|
196
|
+
- A new `releases/builder/build_.../` folder produces exactly one GitHub Release.
|
|
197
197
|
- Re-running workflow for the same `release_id` does not create duplicates.
|
|
198
198
|
- Webhook is called only for newly created releases.
|
|
199
199
|
- `POST /api/releases` rejects unauthorized requests.
|
|
@@ -12,7 +12,7 @@ This document defines the production plan for release detection, deduped GitHub
|
|
|
12
12
|
## Source of Truth
|
|
13
13
|
|
|
14
14
|
- The **GitHub Release tag** is the release identity (`release_id`), for example `build_03252026_1929`.
|
|
15
|
-
- Locally and in CI, `windows/cleanup.cjs` places the installer under `
|
|
15
|
+
- Locally and in CI, `windows/cleanup.cjs` places the installer under `releases/builder/build_MMDDYYYY_HHMM/HyperlinksSpaceProgramInstaller_<stamp>.exe` (other files under `dev/`). In CI, set `RELEASE_BUILD_ID` to pin the folder/tag, or omit it to use the timestamp from build time.
|
|
16
16
|
|
|
17
17
|
## When You Must Make a New Installer Release
|
|
18
18
|
|
|
@@ -78,7 +78,7 @@ Recommended extra safety:
|
|
|
78
78
|
|
|
79
79
|
## Endpoint Contract
|
|
80
80
|
|
|
81
|
-
- Webhook endpoint path: `
|
|
81
|
+
- Webhook endpoint path: `api/releases.ts`
|
|
82
82
|
- Route URL: `POST /api/releases`
|
|
83
83
|
- Purpose: accept release-published events from GitHub Actions and fan out update notifications to app clients.
|
|
84
84
|
|
|
@@ -116,7 +116,7 @@ If auth fails:
|
|
|
116
116
|
}
|
|
117
117
|
```
|
|
118
118
|
|
|
119
|
-
## Endpoint Behavior (`
|
|
119
|
+
## Endpoint Behavior (`api/releases.ts`)
|
|
120
120
|
|
|
121
121
|
1. Accept only `POST`.
|
|
122
122
|
2. Validate auth token/signature.
|
|
@@ -171,7 +171,7 @@ Client behavior:
|
|
|
171
171
|
|
|
172
172
|
## Rollout Plan
|
|
173
173
|
|
|
174
|
-
1. Deploy `
|
|
174
|
+
1. Deploy `api/releases.ts` in staging.
|
|
175
175
|
2. Run workflow in dry-run mode to validate folder parsing and dedupe checks.
|
|
176
176
|
3. Enable real release creation for test folder.
|
|
177
177
|
4. Enable webhook call to staging endpoint.
|
|
@@ -180,7 +180,7 @@ Client behavior:
|
|
|
180
180
|
|
|
181
181
|
## Acceptance Criteria
|
|
182
182
|
|
|
183
|
-
- A new `
|
|
183
|
+
- A new `releases/builder/build_.../` folder produces exactly one GitHub Release.
|
|
184
184
|
- Re-running workflow for the same `release_id` does not create duplicates.
|
|
185
185
|
- Webhook is called only for newly created releases.
|
|
186
186
|
- `POST /api/releases` rejects unauthorized requests.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Security Implementation Plan (Telegram-First Wallet)
|
|
2
2
|
|
|
3
|
-
This file describes a practical implementation plan for the security model defined in `security.md`, focused on the
|
|
3
|
+
This file describes a practical implementation plan for the security model defined in `security.md`, focused on the repository-root Expo/Vercel codebase and a serverless backend.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -13,7 +13,7 @@ This file describes a practical implementation plan for the security model defin
|
|
|
13
13
|
- Confirm `telegram-web-app.js` is loaded in the Mini App shell.
|
|
14
14
|
|
|
15
15
|
- **0.2. Serverless backend basics**
|
|
16
|
-
- Use existing Vercel project (
|
|
16
|
+
- Use existing Vercel project (repository root) API routes:
|
|
17
17
|
- Create a shared util for **Telegram initData validation** (WebApp) in `api/_lib/telegram.ts`:
|
|
18
18
|
- `validateInitData(initData: string): { username: string }`.
|
|
19
19
|
- Create a shared util for **Telegram Login widget validation** (web/native) in `api/_lib/telegram_login.ts`:
|
|
@@ -101,7 +101,7 @@ This file describes a practical implementation plan for the security model defin
|
|
|
101
101
|
|
|
102
102
|
## Phase 2 – iOS/Android App Flow (Single App)
|
|
103
103
|
|
|
104
|
-
(All implemented
|
|
104
|
+
(All implemented in the repository root app using Expo Router / React Native.)
|
|
105
105
|
|
|
106
106
|
- **2.1. Local state**
|
|
107
107
|
- Add a simple secure storage wrapper (e.g. `expo-secure-store`):
|
|
@@ -123,7 +123,7 @@ This file describes a practical implementation plan for the security model defin
|
|
|
123
123
|
- Opens a WebView or browser to hosted login page (e.g. `/login/telegram`).
|
|
124
124
|
|
|
125
125
|
- **2.3. Telegram Login for Websites (web page + API)**
|
|
126
|
-
- Create a web page (static route in
|
|
126
|
+
- Create a web page (static route in repository root or separate) that:
|
|
127
127
|
- Embeds the Telegram Login widget configured for your bot & domain.
|
|
128
128
|
- On success, posts the payload (via `data-onauth` callback) to `POST /api/login/telegram`.
|
|
129
129
|
- `POST /api/login/telegram`:
|
package/docs/security_raw.md
CHANGED
|
@@ -129,7 +129,7 @@ For platforms outside Telegram (web, desktop app, native mobile app not running
|
|
|
129
129
|
|
|
130
130
|
## IV. Android / iOS (Single App, Telegram‑Centric Flow)
|
|
131
131
|
|
|
132
|
-
We ship **one app** (the current
|
|
132
|
+
We ship **one app** (the current Expo app at repository root) to iOS/Android stores. On mobile, the app acts as a shell that:
|
|
133
133
|
|
|
134
134
|
- Explains why wallet creation happens in Telegram.
|
|
135
135
|
- Sends the user into the Telegram Mini App to actually create the wallet.
|
|
@@ -212,7 +212,7 @@ For a user who already has a Telegram wallet (created earlier in the Mini App):
|
|
|
212
212
|
|
|
213
213
|
**Key points of this model**
|
|
214
214
|
|
|
215
|
-
- There is **one app** (
|
|
215
|
+
- There is **one app** (repository root), not a separate companion; mobile just has a Telegram-centric onboarding path.
|
|
216
216
|
- All wallet creation and key material remain in the Telegram Mini App and its SecureStorage/CloudStorage environment.
|
|
217
217
|
- The iOS/Android app uses:
|
|
218
218
|
- **Telegram Login for Websites** to learn “who is this user?” (via `username`),
|
package/docs/timing_raw.md
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
**Important:** The app will not be sent to platforms (store/listing) before it is fully finished. So **MVP launch = full product launch**, and the realistic estimate is **3 months**.
|
|
6
6
|
|
|
7
|
-
## Transfer layout to
|
|
7
|
+
## Transfer layout to repository root (TypeScript) — build on new architecture
|
|
8
8
|
|
|
9
|
-
The goal is **not** to finish the Flutter app in `front/`. The **Flutter** app in `front/` is the **reference layout** (web pages, flows, structure). The work is to **transfer that layout and flows into
|
|
9
|
+
The goal is **not** to finish the Flutter app in `front/`. The **Flutter** app in `front/` is the **reference layout** (web pages, flows, structure). The work is to **transfer that layout and flows into the repository root app in TypeScript** and make everything work there, with **security plan compliance** (see `docs/security_plan.md`). The production Mini App is the TS app at repository root (Expo/React), backed by the same repo’s API and DB.
|
|
10
10
|
|
|
11
|
-
### Pages to implement in
|
|
11
|
+
### Pages to implement in repository root (TS) — from `front/` reference
|
|
12
12
|
|
|
13
13
|
- **Bootstrap** – initData auth, config from API, wallet warm-up.
|
|
14
14
|
- **Main** – home / hub after bootstrap.
|
|
@@ -23,7 +23,7 @@ The goal is **not** to finish the Flutter app in `front/`. The **Flutter** app i
|
|
|
23
23
|
- **Mnemonics** – mnemonic display/backup (security plan).
|
|
24
24
|
- **Wallet panel** – wallet panel page.
|
|
25
25
|
|
|
26
|
-
### Services / wiring in
|
|
26
|
+
### Services / wiring in repository root (TS)
|
|
27
27
|
|
|
28
28
|
| Concern | Role | Backend / compliance |
|
|
29
29
|
|--------|------|-----------------------|
|
|
@@ -31,7 +31,7 @@ The goal is **not** to finish the Flutter app in `front/`. The **Flutter** app i
|
|
|
31
31
|
| **AI** | Chat with AI via same-origin `/api/ai` (or app’s AI route). | Already in `app`; ensure config, keys, and error handling in prod. |
|
|
32
32
|
| **Wallet** | Mnemonic generation, storage, key derivation (client-side). | Security plan: SecureStorage/CloudStorage, wallet registration (`POST /api/wallet/register`), device auth flow; optional TonConnect later. |
|
|
33
33
|
|
|
34
|
-
### API surface (in
|
|
34
|
+
### API surface (in repository root)
|
|
35
35
|
|
|
36
36
|
- **`/api/telegram`** (or init) – initData validation, user upsert.
|
|
37
37
|
- **`/api/ai`** – AI proxy; used by the TS app.
|
|
@@ -56,8 +56,8 @@ Completion order and stages:
|
|
|
56
56
|
| Stage | Scope | Estimate | Notes |
|
|
57
57
|
|-------|--------|----------|--------|
|
|
58
58
|
| **1** | **Security plan implementation** | **~3 weeks** | Phase 0 (validation, DB), Phase 1 (wallet creation, device auth, register), Phase 2 (pending tx, confirmations). |
|
|
59
|
-
| **2** | **App (TS) – pages & UX** | **~3 weeks** | Transfer layout from `front/` and implement all pages in
|
|
60
|
-
| **3** | **App (TS) – services & wiring** | **~3 weeks** | Auth, AI, and wallet flows in
|
|
59
|
+
| **2** | **App (TS) – pages & UX** | **~3 weeks** | Transfer layout from `front/` and implement all pages in repository root app (send, swap, wallets, apps, AI, get, trade, creators, mnemonics, wallet panel); layout and navigation solid. |
|
|
60
|
+
| **3** | **App (TS) – services & wiring** | **~3 weeks** | Auth, AI, and wallet flows in repository root app; backend alignment; errors and edge cases. |
|
|
61
61
|
| **4** | **Integration, testing, finishing** | **~3 weeks** | E2E, platform checks, store/listing readiness, app/plan and root plan items (formatting, theme, bugs, features). |
|
|
62
62
|
|
|
63
63
|
**MVP launch (full finish, platform-ready):** **~3 months** (12 weeks).
|
package/docs/update.md
CHANGED
|
@@ -10,7 +10,7 @@ This plan defines how to deliver near-instant updates for the app with minimal u
|
|
|
10
10
|
- Target latency: minutes or less after publish.
|
|
11
11
|
- **Lane B: Binary releases (slow path)**
|
|
12
12
|
- Use installer/store release only when native/runtime changes are required.
|
|
13
|
-
- Triggered through `
|
|
13
|
+
- Triggered through `releases/**` and GitHub Release workflow.
|
|
14
14
|
|
|
15
15
|
Decision rule:
|
|
16
16
|
|
|
@@ -21,9 +21,9 @@ Decision rule:
|
|
|
21
21
|
|
|
22
22
|
Already configured:
|
|
23
23
|
|
|
24
|
-
- `app
|
|
25
|
-
- `app
|
|
26
|
-
- `
|
|
24
|
+
- `app.json` has `updates.url`.
|
|
25
|
+
- `app.json` has `runtimeVersion.policy = appVersion`.
|
|
26
|
+
- `eas.json` has channels:
|
|
27
27
|
- preview profile -> `main`
|
|
28
28
|
- production profile -> `production`
|
|
29
29
|
|
|
@@ -40,7 +40,7 @@ Implication:
|
|
|
40
40
|
|
|
41
41
|
For binary-only updates:
|
|
42
42
|
|
|
43
|
-
1. `
|
|
43
|
+
1. `releases/builder/build_MMDDYYYY_HHMM/` (or Forge under `releases/forge/...`) changes.
|
|
44
44
|
2. GitHub workflow dedupes and creates Release if new.
|
|
45
45
|
3. Workflow calls `POST /api/releases` webhook.
|
|
46
46
|
4. Backend notifies clients that binary update is available.
|
|
@@ -64,11 +64,11 @@ Create workflow `.github/workflows/eas-update.yml`:
|
|
|
64
64
|
- Optional `workflow_dispatch`
|
|
65
65
|
- Path filters to avoid unnecessary publishes (example):
|
|
66
66
|
- include app source and config paths
|
|
67
|
-
- exclude `
|
|
67
|
+
- exclude `releases/**`
|
|
68
68
|
- Steps:
|
|
69
69
|
1. checkout
|
|
70
70
|
2. setup node
|
|
71
|
-
3. install deps (`npm ci` in
|
|
71
|
+
3. install deps (`npm ci` in repository root)
|
|
72
72
|
4. publish OTA:
|
|
73
73
|
- branch `main` for preview/internal
|
|
74
74
|
- branch `production` for production
|
|
@@ -80,7 +80,7 @@ Recommended publish command:
|
|
|
80
80
|
|
|
81
81
|
### 4.3 Binary Workflow (Already Planned)
|
|
82
82
|
|
|
83
|
-
Keep `
|
|
83
|
+
Keep `releases/**` workflow with dedupe:
|
|
84
84
|
|
|
85
85
|
- If release exists, skip.
|
|
86
86
|
- If new, create GitHub Release and upload assets.
|
|
@@ -170,7 +170,7 @@ Phase 3 - Hardening:
|
|
|
170
170
|
|
|
171
171
|
### Publish OTA update
|
|
172
172
|
|
|
173
|
-
From
|
|
173
|
+
From repository root:
|
|
174
174
|
|
|
175
175
|
- `npx eas update --branch main --message "fix: ..."`
|
|
176
176
|
- for production:
|
|
@@ -178,7 +178,7 @@ From `app/`:
|
|
|
178
178
|
|
|
179
179
|
### Publish binary update
|
|
180
180
|
|
|
181
|
-
1. Create `
|
|
181
|
+
1. Create `releases/builder/build_MMDDYYYY_HHMM/` with installer at root and supporting files under `dev/`.
|
|
182
182
|
2. Push changes.
|
|
183
183
|
3. Workflow creates (or skips duplicate) GitHub Release and calls `/api/releases`.
|
|
184
184
|
|
|
@@ -198,7 +198,7 @@ From `app/`:
|
|
|
198
198
|
|
|
199
199
|
## 12) Next Implementation Tasks
|
|
200
200
|
|
|
201
|
-
1. Create `
|
|
201
|
+
1. Create `api/releases.ts` endpoint.
|
|
202
202
|
2. Add `.github/workflows/eas-update.yml`.
|
|
203
203
|
3. Add client update service wrapper (`check/fetch/apply` policy).
|
|
204
204
|
4. Add docs section in `build_and_install.md` linking OTA vs binary rules.
|