chore: prepare repository for public launch
This commit is contained in:
+16
-12
@@ -74,9 +74,10 @@ archy/
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- **macOS** (development machine): Node.js 20+, npm
|
||||
- **Linux server** (`192.168.1.228`): Rust toolchain, Podman, Nginx, Debian 13
|
||||
- SSH key: `~/.ssh/archipelago-deploy`
|
||||
- Node.js 20+ and npm for frontend development.
|
||||
- Rust stable for backend development.
|
||||
- Linux with Podman, systemd, and Nginx for host integration work.
|
||||
- Debian 13 is the target runtime for release validation.
|
||||
|
||||
### Local Frontend Development
|
||||
|
||||
@@ -86,17 +87,18 @@ npm install
|
||||
npm start # Vite dev server on :8100, mock backend on :5959
|
||||
```
|
||||
|
||||
The dev server at `http://localhost:8100` uses a mock backend. Login with `password123`.
|
||||
The dev server at `http://localhost:8100` uses a mock backend.
|
||||
|
||||
### Deploying Changes
|
||||
|
||||
**Never build Rust on macOS.** The deploy script rsyncs source to the Linux server and builds there.
|
||||
Release and host-integration builds should run on Linux. The deploy script rsyncs
|
||||
source to a configured Linux target and builds there.
|
||||
|
||||
```bash
|
||||
# Deploy to live server (builds backend + frontend, restarts services)
|
||||
# Deploy to the configured primary target (builds backend + frontend, restarts services)
|
||||
./scripts/deploy-to-target.sh --live
|
||||
|
||||
# Deploy to both servers
|
||||
# Deploy to both configured targets
|
||||
./scripts/deploy-to-target.sh --both
|
||||
```
|
||||
|
||||
@@ -114,14 +116,16 @@ The deploy script:
|
||||
# Frontend tests
|
||||
cd neode-ui && npm test
|
||||
|
||||
# Backend tests (on dev server via SSH)
|
||||
ssh -i ~/.ssh/archipelago-deploy archipelago@192.168.1.228 \
|
||||
"cd ~/archy/core && cargo test --all-features"
|
||||
# Backend tests
|
||||
cd core && cargo test --all-features
|
||||
|
||||
# Both
|
||||
./scripts/run-tests.sh
|
||||
```
|
||||
|
||||
`scripts/run-tests.sh` can run backend tests on a Linux target when
|
||||
`ARCHIPELAGO_SSH_HOST` and `ARCHIPELAGO_SSH_KEY` are set.
|
||||
|
||||
## Adding a New RPC Endpoint
|
||||
|
||||
### 1. Create the Handler
|
||||
@@ -200,7 +204,7 @@ async myAction(params: { name: string }): Promise<{ ok: boolean; result: string
|
||||
|
||||
```bash
|
||||
./scripts/deploy-to-target.sh --live
|
||||
curl -X POST http://192.168.1.228/rpc/v1 \
|
||||
curl -X POST http://<node-host>/rpc/v1 \
|
||||
-H "Content-Type: application/json" \
|
||||
-b "archipelago_session=YOUR_SESSION" \
|
||||
-d '{"method":"mymodule.action","params":{"name":"test"}}'
|
||||
@@ -309,5 +313,5 @@ mod tests {
|
||||
2. Make changes following the standards above
|
||||
3. Test locally: `cd neode-ui && npm test`
|
||||
4. Deploy to dev server: `./scripts/deploy-to-target.sh --live`
|
||||
5. Verify at `http://192.168.1.228`
|
||||
5. Verify on your configured development target
|
||||
6. Commit with conventional format: `feat: add my feature`
|
||||
|
||||
Reference in New Issue
Block a user