{"id":20573558,"url":"https://github.com/timf34/fovthingdashboard","last_synced_at":"2026-06-06T10:31:33.196Z","repository":{"id":256061285,"uuid":"854225431","full_name":"timf34/FOVThingDashboard","owner":"timf34","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-13T22:37:51.000Z","size":407,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-13T23:31:56.204Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timf34.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-09-08T17:51:02.000Z","updated_at":"2025-07-13T22:37:54.000Z","dependencies_parsed_at":"2024-12-15T02:27:44.218Z","dependency_job_id":"d553f6ea-bc45-4089-870a-10d76caa273a","html_url":"https://github.com/timf34/FOVThingDashboard","commit_stats":null,"previous_names":["timf34/fovthingdashboard"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/timf34/FOVThingDashboard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timf34%2FFOVThingDashboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timf34%2FFOVThingDashboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timf34%2FFOVThingDashboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timf34%2FFOVThingDashboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timf34","download_url":"https://codeload.github.com/timf34/FOVThingDashboard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timf34%2FFOVThingDashboard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33979274,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-06T02:00:07.033Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T05:28:06.884Z","updated_at":"2026-06-06T10:31:33.188Z","avatar_url":"https://github.com/timf34.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# FOVThingDashboard\r\n\r\n`docker-compose up --build`\r\n\r\nAnd note that you might need to run `docker system prune -a` to clean up the docker images and containers on the \r\ndroplet before re-running the `docker-compose up --build` command.\r\n\r\nI should also add more memory to the swap for the build process. \r\n\r\n\r\nOr just run:\r\n```\r\n# Note: be sure to create .env files in the client and app directories set to localhost:8000\r\n# in 1 terminal\r\ncd client\r\nnpm install\r\nnpm start\r\n\r\n# in a 2nd terminal\r\ncd app\r\npython main.py\r\n```\r\n\r\n\r\n## Notes \r\n\r\n**TODO**\r\n- Add raising an error when we don't have any .env files! The code runs without them atm, but mysteriously doesn't work fully ofc! Or just works on a local network. I didn't notice this when setting up aviva.fovdashboard.com\r\n\r\n\r\n## Instructions\r\n\r\nFrom asking ChatGPT how to set it up and point it at aviva.fovdashboard.com\r\n\r\nHere’s a step-by-step guide to setting up this GitHub project on a **DigitalOcean Droplet** and pointing it to **aviva.fovdashboard.com**.\r\n\r\n---\r\n\r\n## **1. Set Up DigitalOcean Droplet**\r\n1. **Create a DigitalOcean Droplet**  \r\n   - Choose **Ubuntu 22.04 LTS** as the operating system.\r\n   - Select at least **2 vCPUs and 4GB RAM** for performance.\r\n   - Enable **SSH authentication** for secure access.\r\n\r\n2. **Connect to the Droplet**  \r\n   ```bash\r\n   ssh root@YOUR_DROPLET_IP\r\n   ```\r\n---\r\n\r\n\r\n## **2. Install Docker \u0026 Docker Compose**\r\nRun the following commands to install Docker and Docker Compose:\r\n\r\n```bash\r\nsudo apt update \u0026\u0026 sudo apt upgrade -y\r\nsudo apt install -y docker.io docker-compose\r\nsudo systemctl enable docker\r\nsudo systemctl start docker\r\n```\r\n\r\nVerify installation:\r\n```bash\r\ndocker --version\r\ndocker-compose --version\r\n```\r\n\r\n---\r\n\r\n## **3. Clone the GitHub Repository**\r\nReplace `GITHUB_REPO_URL` with the actual repository URL:\r\n\r\n```bash\r\ngit clone GITHUB_REPO_URL fovdashboard\r\ncd fovdashboard\r\n```\r\n\r\n---\r\n\r\n## **4. Set Up Environment Variables**\r\nCreate a `.env` file in `app/` and `client/` directories if needed:\r\n```bash\r\nnano app/.env\r\n```\r\nAdd your API keys, database URL, etc., if required.\r\n\r\n---\r\n\r\n## **5. Build \u0026 Run Docker Containers**\r\nNavigate to the project directory and start the services:\r\n```bash\r\ndocker-compose up --build -d\r\n```\r\nThis will:\r\n- Build and start the **backend (FastAPI)**\r\n- Build and start the **frontend (React)**\r\n- Ensure both run inside Docker\r\n\r\nTo check if containers are running:\r\n```bash\r\ndocker ps\r\n```\r\n\r\n---\r\n\r\n## **6. Install \u0026 Configure Nginx**\r\nInstall Nginx:\r\n```bash\r\nsudo apt install -y nginx\r\n```\r\n\r\nReplace Nginx’s default config:\r\n```bash\r\nsudo nano /etc/nginx/sites-available/default\r\n```\r\nPaste the following updated configuration:\r\n```nginx\r\nserver {\r\n    server_name aviva.fovdashboard.com www.aviva.fovdashboard.com;\r\n\r\n    # Proxy for React frontend\r\n    location / {\r\n        proxy_pass http://localhost:3000;\r\n        proxy_set_header Host $host;\r\n        proxy_set_header X-Real-IP $remote_addr;\r\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\r\n        proxy_set_header X-Forwarded-Proto $scheme;\r\n    }\r\n\r\n    # Proxy for FastAPI backend\r\n    location /api/ {\r\n        proxy_pass http://localhost:8000;\r\n        proxy_set_header Host $host;\r\n        proxy_set_header X-Real-IP $remote_addr;\r\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\r\n        proxy_set_header X-Forwarded-Proto $scheme;\r\n    }\r\n\r\n    # WebSockets for FastAPI\r\n    location /ws {\r\n        proxy_pass http://localhost:8000/ws;\r\n        proxy_http_version 1.1;\r\n        proxy_set_header Upgrade $http_upgrade;\r\n        proxy_set_header Connection \"upgrade\";\r\n        proxy_set_header Host $host;\r\n        proxy_set_header X-Real-IP $remote_addr;\r\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\r\n        proxy_set_header X-Forwarded-Proto $scheme;\r\n    }\r\n\r\n    listen 443 ssl; # managed by Certbot\r\n    ssl_certificate /etc/letsencrypt/live/aviva.fovdashboard.com/fullchain.pem;\r\n    ssl_certificate_key /etc/letsencrypt/live/aviva.fovdashboard.com/privkey.pem;\r\n    include /etc/letsencrypt/options-ssl-nginx.conf;\r\n    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;\r\n}\r\n\r\n\r\nserver {\r\n    listen 80;\r\n    server_name aviva.fovdashboard.com www.aviva.fovdashboard.com;\r\n    return 301 https://$host$request_uri;\r\n}\r\n```\r\n\r\nSave and restart Nginx:\r\n```bash\r\nsudo systemctl restart nginx\r\n```\r\n\r\n---\r\n\r\n## **7. Set Up a Domain with SSL (Let's Encrypt)**\r\n### **Update DNS Records**\r\n- Go to your domain registrar (e.g., Namecheap, GoDaddy).\r\n- Create an **A record** pointing `aviva.fovdashboard.com` to your **Droplet’s IP**.\r\n\r\n### **Install Certbot**\r\n```bash\r\nsudo apt install -y certbot python3-certbot-nginx\r\n```\r\n\r\n### **Generate SSL Certificate**\r\n```bash\r\nsudo certbot --nginx -d aviva.fovdashboard.com -d www.aviva.fovdashboard.com\r\n```\r\n\r\n### **Auto-Renew SSL**\r\n```bash\r\nsudo certbot renew --dry-run\r\n```\r\n\r\n---\r\n\r\n## **8. Verify Everything is Running**\r\n- **Check logs for errors**\r\n  ```bash\r\n  docker logs fov-frontend\r\n  docker logs fov-backend\r\n  sudo systemctl status nginx\r\n  ```\r\n- **Access the website**\r\n  - Open `https://aviva.fovdashboard.com`\r\n  - The frontend should load correctly.\r\n- **Test API**\r\n  ```bash\r\n  curl -X GET https://aviva.fovdashboard.com/api/devices\r\n  ```\r\n\r\n---\r\n\r\n### **9. (Optional) Enable Firewall**\r\nTo secure the server:\r\n```bash\r\nsudo ufw allow OpenSSH\r\nsudo ufw allow 'Nginx Full'\r\nsudo ufw enable\r\n```\r\n\r\n---\r\n\r\n### 🎉 **Done!**  \r\nYour project is now running on **DigitalOcean**, accessible at **https://aviva.fovdashboard.com** 🚀.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimf34%2Ffovthingdashboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimf34%2Ffovthingdashboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimf34%2Ffovthingdashboard/lists"}