diff --git a/technotes/.claude/instructions.md b/.claude/instructions.md similarity index 95% rename from technotes/.claude/instructions.md rename to .claude/instructions.md index 9d039f1..79ca080 100644 --- a/technotes/.claude/instructions.md +++ b/.claude/instructions.md @@ -57,6 +57,8 @@ FLASK_PORT - Web server port (default: 5000) ``` mc-webui/ +├── Dockerfile +├── docker-compose.yml ├── app/ │ ├── main.py # Flask entry point │ ├── config.py # Environment config @@ -68,9 +70,6 @@ mc-webui/ │ │ └── views.py # HTML views │ ├── static/ # CSS, JS │ └── templates/ # Jinja2 templates -├── docker/ -│ ├── Dockerfile -│ └── docker-compose.yml ├── PRD.md # Full requirements doc └── README.md ``` @@ -107,5 +106,5 @@ POST /api/contacts/cleanup - Remove inactive contacts 1. Develop locally (Windows/WSL) 2. Push to GitHub 3. Pull on server (192.168.131.80) -4. Build and run with docker-compose +4. Build and run: `docker compose up -d --build` 5. Test on http://192.168.131.80:5000 \ No newline at end of file diff --git a/CLAUDE_CODE_PROMPT.md b/CLAUDE_CODE_PROMPT.md index a5a8a7d..0ae53d0 100644 --- a/CLAUDE_CODE_PROMPT.md +++ b/CLAUDE_CODE_PROMPT.md @@ -31,9 +31,8 @@ You are continuing development of **mc-webui** - a lightweight web interface for ``` mc-webui/ -├── docker/ -│ ├── Dockerfile -│ └── docker-compose.yml +├── Dockerfile +├── docker-compose.yml ├── app/ │ ├── __init__.py │ ├── main.py # Flask entry point diff --git a/docker/Dockerfile b/Dockerfile similarity index 100% rename from docker/Dockerfile rename to Dockerfile diff --git a/README.md b/README.md index 3d5fb83..1982e06 100644 --- a/README.md +++ b/README.md @@ -52,8 +52,7 @@ A lightweight web interface for meshcore-cli, providing browser-based access to 4. **Build and run** ```bash - # Run from the project root directory - docker compose -f docker/docker-compose.yml up -d --build + docker compose up -d --build ``` 5. **Access the web interface** @@ -87,9 +86,8 @@ See [.env.example](.env.example) for a complete example. ``` mc-webui/ -├── docker/ -│ ├── Dockerfile # Docker image definition -│ └── docker-compose.yml # Docker Compose configuration +├── Dockerfile # Docker image definition +├── docker-compose.yml # Docker Compose configuration ├── app/ │ ├── __init__.py │ ├── main.py # Flask entry point @@ -120,17 +118,17 @@ mc-webui/ ## Development Status -🚧 **Current Phase: 0 - Environment Setup** ✅ +🚧 **Current Phase: 1 - Backend Basics** ✅ ### Roadmap - [x] Phase 0: Environment Setup -- [ ] Phase 1: Backend Basics -- [ ] Phase 2: Frontend Chat View -- [ ] Phase 3: Message Sending -- [ ] Phase 4: Auto-refresh -- [ ] Phase 5: Contact Management -- [ ] Phase 6: Polish & Documentation +- [x] Phase 1: Backend Basics (REST API, message parsing, CLI wrapper) +- [x] Phase 2: Frontend Chat View (Bootstrap UI, message display) +- [x] Phase 3: Message Sending (Send form, reply functionality) +- [x] Phase 4: Auto-refresh (60s polling, live updates) +- [x] Phase 5: Contact Management (Cleanup modal) +- [ ] Phase 6: Polish & Documentation (Testing, optimization) See [PRD.md](PRD.md) for detailed requirements and implementation plan. @@ -160,23 +158,21 @@ Access the settings panel to clean up inactive contacts: ## Docker Commands -**Note:** Run all commands from the project root directory (where .env file is located) - ```bash # Start the application -docker compose -f docker/docker-compose.yml up -d +docker compose up -d # View logs -docker compose -f docker/docker-compose.yml logs -f +docker compose logs -f # Stop the application -docker compose -f docker/docker-compose.yml down +docker compose down # Rebuild after code changes -docker compose -f docker/docker-compose.yml up -d --build +docker compose up -d --build # Check container status -docker compose -f docker/docker-compose.yml ps +docker compose ps ``` ## Troubleshooting @@ -193,10 +189,10 @@ sudo chmod 666 /dev/serial/by-id/usb-Espressif* ### Container won't start ```bash # Check logs -docker-compose logs mc-webui +docker compose logs mc-webui # Verify .env file exists -ls -la ../.env +ls -la .env # Check if port 5000 is available sudo netstat -tulpn | grep 5000 diff --git a/docker/docker-compose.yml b/docker-compose.yml similarity index 92% rename from docker/docker-compose.yml rename to docker-compose.yml index 4fe0540..995a2ad 100644 --- a/docker/docker-compose.yml +++ b/docker-compose.yml @@ -3,8 +3,8 @@ version: '3.8' services: mc-webui: build: - context: .. - dockerfile: docker/Dockerfile + context: . + dockerfile: Dockerfile container_name: mc-webui restart: unless-stopped ports: @@ -23,7 +23,7 @@ services: - FLASK_PORT=${FLASK_PORT:-5000} - FLASK_DEBUG=${FLASK_DEBUG:-false} env_file: - - ../.env + - .env healthcheck: test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:5000/api/status')"] interval: 30s