- Revised README.md to clarify the use of Docker alongside Podman for containerization. - Updated API documentation to reflect new RPC endpoints, including `auth.logout`. - Enhanced WebSocket handling in the API for better connection management. - Modified Neode UI to utilize a curated list of Docker-based applications, replacing previous Start9 registry calls. - Improved error handling and logging in the marketplace for better user experience.
298 lines
7.3 KiB
Markdown
298 lines
7.3 KiB
Markdown
# Development Environment Setup - Complete
|
|
|
|
## ✅ What's Been Accomplished
|
|
|
|
### 1. Docker Compose Configuration ✓
|
|
Created `docker-compose.yml` with all 13 apps:
|
|
|
|
**Bitcoin & Lightning:**
|
|
- Bitcoin Core (regtest mode, port 18443)
|
|
- LND Lightning Network (ports 8080, 9735, 10009)
|
|
- BTCPay Server (port 14142)
|
|
- Mempool Explorer (port 4080)
|
|
- Fedimint (port 8173)
|
|
|
|
**Self-Hosted Services:**
|
|
- Home Assistant (port 8123)
|
|
- Grafana (port 3000)
|
|
- SearXNG (port 8082)
|
|
- Ollama AI (port 11434)
|
|
|
|
**Collaboration:**
|
|
- OnlyOffice (port 8083)
|
|
- Penpot (port 9001)
|
|
|
|
**Placeholders:**
|
|
- Endurain (port 8084)
|
|
- MorphOS Server (port 8081)
|
|
|
|
### 2. App Definitions Updated ✓
|
|
Updated `neode-ui/src/utils/dummyApps.ts`:
|
|
- Corrected ports for all Docker containers
|
|
- All apps configured with proper LAN addresses
|
|
- Apps sorted alphabetically in the UI
|
|
|
|
### 3. UI Improvements ✓
|
|
Updated `neode-ui/src/views/Apps.vue`:
|
|
- Apps always display alphabetically by title
|
|
- Order stable regardless of running/stopped state
|
|
- Launch button opens apps at correct Docker ports
|
|
- Reads `lan-address` from app manifest
|
|
|
|
### 4. Startup Scripts ✓
|
|
|
|
**Main startup:** `neode-ui/start-dev.sh`
|
|
- Checks Docker status
|
|
- Starts all Docker containers
|
|
- Starts mock backend
|
|
- Starts Vite dev server
|
|
- All in one command: `npm start`
|
|
|
|
**Main stop:** `neode-ui/stop-dev.sh`
|
|
- Stops Vite and backend
|
|
- Stops all Docker containers
|
|
- All in one command: `npm stop`
|
|
|
|
**Docker management scripts:**
|
|
- `start-docker-apps.sh` - Start all containers with progress
|
|
- `stop-docker-apps.sh` - Stop all containers
|
|
- `test-docker-setup.sh` - Test with lightweight apps
|
|
|
|
### 5. Placeholder Apps ✓
|
|
Created placeholder pages for apps without direct images:
|
|
- `docker/endurain-placeholder/index.html`
|
|
- `docker/morphos-placeholder/index.html`
|
|
|
|
### 6. Documentation ✓
|
|
|
|
**Getting Started Guide:** `GETTING_STARTED.md`
|
|
- Step-by-step setup instructions
|
|
- Common tasks and troubleshooting
|
|
- Quick reference for all apps
|
|
|
|
**Detailed Docs:** `DOCKER_DEV_SETUP.md`
|
|
- Complete architecture explanation
|
|
- Configuration details
|
|
- Advanced usage
|
|
- Development workflow
|
|
|
|
## 🚀 How to Use
|
|
|
|
### First Time Setup
|
|
|
|
```bash
|
|
cd neode-ui
|
|
npm install
|
|
npm start
|
|
```
|
|
|
|
This will:
|
|
1. Start Docker Desktop (if needed)
|
|
2. Download all images (~3-5GB, 10-30 min first time)
|
|
3. Start all 13 apps in Docker
|
|
4. Start the UI dev server
|
|
|
|
### Daily Development
|
|
|
|
```bash
|
|
cd neode-ui
|
|
npm start # Start everything
|
|
npm stop # Stop everything
|
|
```
|
|
|
|
### Access Apps
|
|
|
|
**UI Dashboard:**
|
|
http://localhost:8100
|
|
|
|
**Direct Access Examples:**
|
|
- Grafana: http://localhost:3000
|
|
- Home Assistant: http://localhost:8123
|
|
- Mempool: http://localhost:4080
|
|
- Penpot: http://localhost:9001
|
|
|
|
See GETTING_STARTED.md for complete list.
|
|
|
|
## 📊 Architecture
|
|
|
|
```
|
|
┌─────────────────────────────────────────────┐
|
|
│ Neode UI (Vue.js) │
|
|
│ http://localhost:8100 │
|
|
└─────────────┬───────────────────────────────┘
|
|
│
|
|
├─► Mock Backend (Node.js, port 5959)
|
|
│
|
|
└─► Docker Containers
|
|
├─► Bitcoin Core (regtest)
|
|
├─► LND (Lightning)
|
|
├─► BTCPay Server
|
|
├─► Mempool
|
|
├─► Home Assistant
|
|
├─► Grafana
|
|
├─► And 7 more apps...
|
|
└─► All on archy-net network
|
|
```
|
|
|
|
## 🎯 Key Features
|
|
|
|
### ✅ Alphabetical Sorting
|
|
Apps in "My Apps" always display A-Z, regardless of state:
|
|
- Bitcoin Core
|
|
- BTCPay Server
|
|
- Endurain
|
|
- Fedimint
|
|
- Grafana
|
|
- Home Assistant
|
|
- Lightning Stack
|
|
- Mempool
|
|
- MorphOS Server
|
|
- Ollama
|
|
- OnlyOffice
|
|
- Penpot
|
|
- SearXNG
|
|
|
|
### ✅ No Blockchain Sync
|
|
- Bitcoin Core runs in regtest mode
|
|
- LND connects without real blockchain
|
|
- Can generate test blocks instantly
|
|
- Saves ~500GB+ of storage
|
|
- Perfect for development
|
|
|
|
### ✅ Production-Like
|
|
- Same apps as production will use
|
|
- Docker containers (like Podman in prod)
|
|
- All services isolated
|
|
- Proper networking
|
|
- Can test dependencies
|
|
|
|
### ✅ Start/Stop Control
|
|
**From UI:**
|
|
- Launch button opens apps
|
|
- Start/Stop buttons (UI ready, backend TBD)
|
|
|
|
**From CLI:**
|
|
```bash
|
|
docker compose stop bitcoin # Stop one app
|
|
docker compose start bitcoin # Start one app
|
|
docker compose restart lnd # Restart an app
|
|
```
|
|
|
|
### ✅ Easy Development
|
|
- Hot reload for UI changes
|
|
- View logs: `docker compose logs -f [app]`
|
|
- Reset data: `docker compose down -v`
|
|
- Update images: `docker compose pull`
|
|
|
|
## 📝 Files Changed/Created
|
|
|
|
### New Files
|
|
- `docker-compose.yml` - All app definitions
|
|
- `start-docker-apps.sh` - Docker startup script
|
|
- `stop-docker-apps.sh` - Docker stop script
|
|
- `test-docker-setup.sh` - Testing script
|
|
- `GETTING_STARTED.md` - User guide
|
|
- `DOCKER_DEV_SETUP.md` - Technical docs
|
|
- `docker/endurain-placeholder/index.html`
|
|
- `docker/morphos-placeholder/index.html`
|
|
|
|
### Modified Files
|
|
- `neode-ui/src/views/Apps.vue` - Added sorting, launch logic
|
|
- `neode-ui/src/utils/dummyApps.ts` - Updated ports
|
|
- `neode-ui/start-dev.sh` - Added Docker integration
|
|
- `neode-ui/stop-dev.sh` - Added Docker cleanup
|
|
|
|
## 🔄 Development Workflow
|
|
|
|
### Start Working
|
|
```bash
|
|
cd archy/neode-ui
|
|
npm start
|
|
```
|
|
|
|
### Make Changes
|
|
Edit files in `src/`, browser auto-reloads
|
|
|
|
### View Logs
|
|
```bash
|
|
docker compose logs -f bitcoin
|
|
```
|
|
|
|
### Stop Working
|
|
```bash
|
|
npm stop
|
|
```
|
|
|
|
### Fresh Start
|
|
```bash
|
|
docker compose down -v
|
|
npm start
|
|
```
|
|
|
|
## 🎉 Next Steps
|
|
|
|
### Immediate
|
|
1. ✅ Test the setup: `npm start`
|
|
2. ✅ Open http://localhost:8100
|
|
3. ✅ Navigate to "My Apps"
|
|
4. ✅ Click "Launch" on apps
|
|
|
|
### Short Term
|
|
- Connect backend API to Docker API
|
|
- Implement real start/stop from UI
|
|
- Add health check indicators
|
|
- Show container logs in UI
|
|
|
|
### Medium Term
|
|
- Add app configuration UI
|
|
- Implement backup/restore
|
|
- Add resource monitoring
|
|
- Create app marketplace
|
|
|
|
### Long Term
|
|
- Build Alpine Linux image
|
|
- Integrate Podman
|
|
- Add Tor support
|
|
- Production deployment
|
|
|
|
## 📚 Documentation
|
|
|
|
- **Quick Start**: See [GETTING_STARTED.md](GETTING_STARTED.md)
|
|
- **Technical Details**: See [DOCKER_DEV_SETUP.md](DOCKER_DEV_SETUP.md)
|
|
- **Architecture**: See [.cursor/rules/Architecture.mdc](.cursor/rules/Architecture.mdc)
|
|
|
|
## 🐛 Known Issues
|
|
|
|
### First Run
|
|
- Image download takes 10-30 minutes
|
|
- Some apps need time to initialize
|
|
- Fedimint needs guardian setup (not implemented yet)
|
|
|
|
### Current Limitations
|
|
- Start/Stop buttons in UI don't call Docker yet (need backend)
|
|
- No health monitoring yet
|
|
- No log viewing in UI yet
|
|
- Bitcoin/Lightning not fully configured for channels
|
|
|
|
### Workarounds
|
|
- Use `docker compose` commands for now
|
|
- Check logs with `docker compose logs -f`
|
|
- Restart manually if apps don't respond
|
|
|
|
## ✨ What's Working
|
|
|
|
✅ All 13 apps defined in docker-compose
|
|
✅ Apps display alphabetically in UI
|
|
✅ Launch button opens correct ports
|
|
✅ Placeholder pages for incomplete apps
|
|
✅ One-command startup: `npm start`
|
|
✅ One-command shutdown: `npm stop`
|
|
✅ Bitcoin in regtest (no sync needed)
|
|
✅ LND connected to Bitcoin
|
|
✅ Complete documentation
|
|
✅ Development workflow established
|
|
|
|
---
|
|
|
|
**🎊 Ready to develop! Run `npm start` and open http://localhost:8100**
|