Add comprehensive documentation for fx-test repo

This commit is contained in:
Vish
2026-03-14 21:35:38 -07:00
parent 3b9d759b4b
commit aa313bdcaa
5 changed files with 204 additions and 0 deletions

60
docs/quickstart.md Normal file
View File

@@ -0,0 +1,60 @@
# 🚀 Quick Start Guide
Follow this stepbystep guide to spin up the **fx-test** service stack locally. The instructions assume you have Docker, DockerCompose, and Git installed.
## 1⃣ Clone the Repository
```bash
git clone https://git.vish.gg/Vish/fx-test.git
cd fx-test
```
## 2⃣ Build & Deploy
The repository uses DockerCompose stacks wrapped in a **GitOps** pattern. The simplest way to start the stack locally is with the provided `run_dev.sh` script.
```bash
./fluxer/scripts/run_dev.sh
```
* The script pulls the latest code, compiles the Erlang project, builds the Docker image, and spins up the stack via `docker-compose`.
## 3⃣ Verify the Service
Once the containers are running, you can verify the API endpoints:
```bash
# Port 8080 WS API
curl http://localhost:8080
# Port 8090 HTTP API
curl http://localhost:8090/health
```
Both should respond with JSON payloads confirming the service is healthy.
## 4⃣ Interacting with the WebSocket
Use `wscat` (or any `ws` client) to open a connection:
```bash
npm install -g wscat
wscat -c ws://localhost:8080
```
Send a simple test message:
```json
{"type":"ping"}
```
You'll receive a `pong` response if the relay is working.
---
### Troubleshooting Tips
| Symptom | Likely Cause | Fix |
|---------|--------------|-----|
| Containers exit instantly | Build step failed | Check CI logs, rebuild locally with `make` |
| HTTP endpoints return **503** | Health check script misconfigured | Verify `/fluxer/config/health_check.json` |
| WebSocket not reachable | Port blocked | Ensure OS firewall allows 8080 |