Skip to content

Commit 55c72dc

Browse files
committed
fix(.md): main, npm, backlogs, npm release readme's
1 parent a1384c8 commit 55c72dc

File tree

4 files changed

+146
-81
lines changed

4 files changed

+146
-81
lines changed

README.md

Lines changed: 95 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,94 @@
1-
# Welcome to your Expo app 👋
2-
This is an [Expo](https://expo.dev) project created with [`create-expo-app`](https://www.npmjs.com/package/create-expo-app).
1+
# Hyperlinks Space Program
32

4-
## Get started
3+
<u>**In progress.**</u>
54

6-
To start the app (and the Telegram bot in polling mode), run:
5+
This program is built upon [React Native](https://reactnative.dev/) by Meta and [Expo](https://expo.dev) multiplatform technologies, Windows build and executable creation achieved with [Electron Builder](https://www.electron.build/) and [Electron Forge](https://www.electronforge.io/), working in Telegram with help of [Telegram Mini Apps React SDK](http://telegram-mini-apps.com/) and [Bot API](https://core.telegram.org/bots). AI is backed by [OpenAI API](https://openai.com/ru-RU/api/), blockchain data is processed from [Swap.Coffee API](https://docs.swap.coffee/eng/user-guides/welcome).
6+
7+
## Program Kit
8+
9+
To give value for other developers we decided to launch an npm package that provides a ready starter for creating a multiplatform program in one command.
710

811
```bash
9-
npm run start
12+
npx @www.hyperlinks.space/program-kit ./your-project
1013
```
1114

12-
This runs both the Expo dev server and the bot. For Expo only (no bot), use `npm run start:expo`.
15+
Link to the package: https://www.npmjs.com/package/@www.hyperlinks.space/program-kit
1316

14-
## Milestone snapshot package (npm)
17+
## Program design
18+
19+
Access [Figma](https://www.figma.com/design/53lDKAD6pRv3e0uef1DP18/TECHSYMBAL-Inc.?node-id=754-71&t=v3tmAlywNgXkTWMd-1) in real time for contributing. Contact [Seva](t.me/sevaaignatyev) in Telegram to discuss and implement.
1520

16-
This repository includes a publishable snapshot package for fast developer bootstrap:
21+
Copying fully or partially, usage as an inspiration for other developments are unpleasant, participation in our projects is appreciated. All core materials are available publicly for instant access worldwide and our project availability for newcomers.
1722

18-
- package source: repository root (published directly)
19-
- **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)
20-
- **GitHub Packages:** `@hyperlinksspace/program-kit` (same version; GitHub requires the package scope to match this repo’s owner)
23+
## How to fork and contribute?
2124

22-
**npm ownership:** your token must be allowed to publish under scope `@www.hyperlinks.space` (org members or automation token with access to that org).
25+
1. Install GitHub CLI and authorize to GitHub from CLI for instant work
2326

24-
### Verify publish payload locally
27+
```
28+
winget install --id GitHub.cli
29+
gh auth login
30+
```
2531

26-
The npm package page uses `README.md` from the published tarball, not `npmReadMe.md`. The published package also includes **`fullREADME.md`**, a copy of this developer readme (saved before the npm readme replaces `README.md`). Match CI before `npm pack`, then restore:
32+
2. Fork the repo, clone it and create a new branch and switch to it
2733

28-
```bash
29-
cp README.md fullREADME.md
30-
cp npmReadMe.md README.md
31-
npm pack --dry-run
32-
git checkout -- README.md
33-
rm -f fullREADME.md
34+
```
35+
gh repo fork https://github.com/HyperlinksSpace/HyperlinksSpaceBot.git --clone
36+
git checkout -b new-branch-for-an-update
37+
git switch -c new-branch-for-an-update
3438
```
3539

36-
### Install snapshot as a developer
40+
3. Make a commit (address unassigned issue or think yourself)
3741

38-
```bash
39-
npx @www.hyperlinks.space/program-kit ./my-hsp-app
4042
```
43+
git add . # Stage changes on this branch
44+
git commit -m "Describe your change" # Commit on this branch
45+
```
46+
47+
3. After making a commit, make a pull request, gh tool will already know the upstream remote
48+
49+
```
50+
gh pr create --title "My new PR" --body "It is my best PR"
51+
```
52+
53+
4. For subsequent commits (sync `main`, create a fresh branch, and commit there)
54+
55+
```
56+
git checkout main # Return to main
57+
git fetch upstream # Fully sync with upstream main
58+
git reset --hard upstream/main # Reset local main to upstream/main
59+
git push origin main # Keep your fork main in sync too
60+
git switch -c new-branch-for-next-update # Create and switch to a new feature branch
61+
```
62+
63+
**Move in loops starting from the step 3.**
4164

42-
The CLI materializes the bundled package payload into your target folder, then you run:
65+
## Pull requests and commits requirements
66+
67+
- Give pull requests and commits a proper name and description
68+
- Dedicate each pull request to an understandable area or field, each commit to a focused logical change
69+
- Check file changes in every commit pulled, no arbitrary files modifications should persist such as LF/CRLF line-ending conversion, broken/garbled text diffs, BOM added or removed, accidental "invisible" corruption from text filters
70+
- Add dependecies and packages step by step for security
71+
- An issue creation or following an existing before a pull request would be a good practice
72+
73+
## Local deploy
74+
75+
To start the full local stack, run:
4376

4477
```bash
45-
cd my-hsp-app
46-
npm install
78+
npm run start
4779
```
4880

49-
### Release channels
81+
This runs Expo dev server, the Telegram bot (polling mode), and local Vercel API (`vercel dev`).
5082

51-
- `latest`: immutable stable snapshots (tag workflow `snapshot-vX.Y.Z`)
52-
- `next`: rolling snapshots from manual workflow dispatch
83+
Isolated/local run options:
5384

54-
In the output, you'll find options to open the app in:
85+
- Expo only (no bot, no Vercel): `npm run start:expo`
86+
- Bot only (polling mode): `npm run bot:local`
87+
- Vercel API only: `npm run dev:vercel`
5588

56-
- [a development build](https://docs.expo.dev/develop/development-builds/introduction/)
57-
- [an Android emulator](https://docs.expo.dev/workflow/android-studio-emulator/)
58-
- [an iOS simulator](https://docs.expo.dev/workflow/ios-simulator/)
59-
- [Expo Go](https://expo.dev/go), a limited sandbox for trying out app development with Expo
89+
## Milestone snapshot package (npm)
6090

61-
You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction).
91+
NPM release and snapshot details were moved to `docs/npm-release.md`.
6292

6393
### Local env setup
6494

@@ -77,9 +107,22 @@ You can start developing by editing the files inside the **app** directory. This
77107

78108
The `.env` file is gitignored; do not commit it.
79109

80-
## Workflows
110+
## GitHub Actions
81111

82-
This project is configured to use [EAS Workflows](https://docs.expo.dev/eas/workflows/get-started/) to automate some development and release processes. These commands are set up in [`package.json`](./package.json) and can be run using NPM scripts in your terminal.
112+
Current Actions workflows include:
113+
114+
- `Vercel Deploy Test` (`.github/workflows/vercel-deploy-test-envs.yml`) - manual web deploy to Vercel.
115+
- `NPM Package Release` (`.github/workflows/npm-package-release.yml`) - npm/GitHub Packages release workflow.
116+
- `Electron EXE Release` and `Electron Forge EXE Release` - manual Windows release pipelines.
117+
- `EXPO Publish` (`.github/workflows/expo-publish.yml`) - manual OTA publish with EAS CLI.
118+
- `Lint errors check` (`.github/workflows/lint-errors-check.yml`) - manual lint check.
119+
120+
## Expo Workflows
121+
122+
This project uses two automation layers:
123+
124+
- [EAS Workflows](https://docs.expo.dev/eas/workflows/get-started/) for Expo update/build/deploy flows (triggered via npm scripts from [`package.json`](./package.json)).
125+
- GitHub Actions for CI/CD tasks stored in `.github/workflows` (manual release/deploy jobs and checks).
83126

84127
### Previews
85128

@@ -109,51 +152,26 @@ Deploying from repository root makes this folder the project root, so `api/bot`
109152

110153
### Telegram bot (Grammy)
111154

112-
A minimal bot that replies "Hello" is included. It is deployable on Vercel via webhook and runnable locally with getUpdates.
155+
The bot is extended beyond a basic "Hello" and "Start program" responder and now supports AI streaming and threads.
113156

114157
**Vercel (webhook)**
115-
- **Env for deploy:** In Vercel → **Settings → Environment Variables** add **`BOT_TOKEN`** (or `TELEGRAM_BOT_TOKEN`). Assign to **Production** (and to **Build** if your dashboard has that option) so the deploy-step webhook script can run. The webhook URL is built from Vercel’s `VERCEL_PROJECT_PRODUCTION_URL` or `VERCEL_URL`.
116-
- **Webhook on deploy:** Each build runs `scripts/set-webhook.ts` and calls Telegram `setWebhook` with the base URL + `/api/bot`. If the script fails (e.g. missing URL or Telegram error), the build fails so you see the error in the deploy log.
117-
- Telegram sends updates to **POST** `/api/bot`; the bot replies "Hello".
158+
- **Runtime path:** Telegram sends updates to `POST /api/bot`. This route proxies to the shared bot webhook handler in `bot/webhook`.
159+
- **Webhook setup:** `scripts/set-webhook.ts` sets `https://<base>/api/bot` using `VERCEL_PROJECT_PRODUCTION_URL` (preferred) or `VERCEL_URL`.
160+
- **Required env:** set `BOT_TOKEN` (or `TELEGRAM_BOT_TOKEN`) in Vercel project envs for production deploys.
161+
- **Deploy flow:** webhook mode is intended for Vercel deploys (CLI `vercel --prod` or the manual GitHub Action `Vercel Deploy (Test Envs)`).
118162

119163
**Bot works locally but not on Vercel**
120-
1. Open **GET** `https://<your-app>.vercel.app/api/bot` in a browser. The JSON shows:
121-
- `bot: true` → BOT_TOKEN is set; `bot: false` → add BOT_TOKEN in Vercel → Settings → Environment Variables (Production), then redeploy.
122-
- `expected_url` → URL we use for the webhook (from VERCEL_PROJECT_PRODUCTION_URL or VERCEL_URL).
123-
- `telegram_has` → URL Telegram actually has. It must match your production URL (e.g. `https://hsbexpo.vercel.app/api/bot`). If it’s `(none)` or different, ensure the project’s production domain is set in Vercel and redeploy so set-webhook.ts runs with the correct URL.
124-
- `webhook_set: true` → last setWebhook call succeeded.
125-
2. **Root directory:** If you deploy via Git (auto-deploy from the repo), set **Root Directory** to the repository root (leave it empty/default) in Vercel → Project Settings → General. If you run `vercel --prod` from the root, the CLI already uses the correct project root.
126-
3. **Logs:** After sending /start, check **Logs** for `[webhook] POST update` and any `[bot]` errors (e.g. handler_error, timeout).
127-
4. Don’t run the same bot in polling locally while testing the webhook (or Telegram may deliver updates to the wrong place).
164+
1. Confirm Vercel env has `BOT_TOKEN` and redeploy.
165+
2. Ensure the deployed URL is stable and matches the webhook target (`/api/bot`).
166+
3. Check deploy/runtime logs for `[set-webhook]` and `[webhook]` errors.
167+
4. Do not run local polling with the same token while validating webhook mode.
128168

129169
**Local (getUpdates, no webhook)**
130-
- Only `BOT_TOKEN` is required (in env or `.env`).
131-
- Run the bot in polling mode (do not use the same token with webhook set elsewhere):
132-
```bash
133-
npx tsx scripts/run-bot-local.ts
134-
```
135-
- `npm run start` runs both Expo and the bot; or run the bot alone with `npm run bot:local`.
136-
137-
## Get a fresh project
138-
139-
When you're ready, run:
140-
141-
```bash
142-
npm run reset-project
143-
```
144-
145-
This command will move the starter code to the **app-example** directory and create a blank **app** directory where you can start developing.
146-
147-
## Learn more
148-
149-
To learn more about developing your project with Expo, look at the following resources:
150-
151-
- [Expo documentation](https://docs.expo.dev/): Learn fundamentals, or go into advanced topics with our [guides](https://docs.expo.dev/guides).
152-
- [Learn Expo tutorial](https://docs.expo.dev/tutorial/introduction/): Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web.
153-
154-
## Join the community
170+
- Only `BOT_TOKEN` is required (env or `.env`).
171+
- Run bot only: `npm run bot:local`
172+
- Run full local stack (Expo + bot + Vercel): `npm run start`
173+
- Keep production and local bot tokens separate when possible to avoid webhook/polling conflicts.
155174

156-
Join our community of developers creating universal apps.
175+
## Where to discuss the project?
157176

158-
- [Expo on GitHub](https://github.com/expo/expo): View our open source platform and contribute.
159-
- [Discord community](https://chat.expo.dev): Chat with Expo users and ask questions.
177+
This repository has [GitHub Discussions](https://github.com/HyperlinksSpace/HyperlinksSpaceProgram/discussions) opened, as well you can join our [Telegram Chat](https://t.me/HyperlinksSpaceChat) and [Channel](https://t.me/HyperlinksSpace).

backlogs/short_term_backlog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Bring repository root app to demo design state<br>
1010
readme.md<br>
1111
Windows setup refactor<br>
1212
https://azure.microsoft.com/en-us/products/artifact-signing<br>
13+
README.md: Project news, discussions, where to learn for contributions<br>
1314

1415
Issues:<br>
1516
Several chats async streaming<br>

docs/npm-release.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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).

npmReadMe.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ and deployed across popular platforms.
77
## What You Get
88

99
- Expo + React Native app foundation
10-
- Telegram bot support (webhook + local bot scripts)
10+
- Telegram bot support (webhook + local bot scripts) with AI functionality
1111
- Telegram Mini App-ready client structure
12-
- Android and iOS workflow scripts
12+
- Android and iOS clients
1313
- Windows desktop packaging (`.exe`) with Electron Builder
1414
- CI-oriented release workflow and deployment helpers
15+
- OpenAI functionality and Swap.Coffee for blockchain data retrievement
1516

1617
## Install
1718

@@ -38,7 +39,7 @@ npm install
3839
npm run start
3940
```
4041

41-
Then open the project `README.md` for full setup details (env vars, bot setup, build
42+
Then open the project **`fullREADME.md`** for details (env vars, bot setup, build
4243
and release commands).
4344

4445
## Release Channels
@@ -50,4 +51,3 @@ and release commands).
5051

5152
- Published directly from the `app/` folder.
5253
- 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).

0 commit comments

Comments
 (0)