{"id":27017849,"url":"https://github.com/cotestatnt/esp-fs-webserver","last_synced_at":"2026-03-08T11:04:02.998Z","repository":{"id":36950913,"uuid":"378156220","full_name":"cotestatnt/esp-fs-webserver","owner":"cotestatnt","description":"ESP32/ESP8266 webserver, WiFi manager and web editor Arduino library","archived":false,"fork":false,"pushed_at":"2026-01-17T10:40:14.000Z","size":10583,"stargazers_count":145,"open_issues_count":3,"forks_count":33,"subscribers_count":11,"default_branch":"master","last_synced_at":"2026-01-17T21:35:42.498Z","etag":null,"topics":["arduino","esp32","esp32-arduino","esp8266","esp8266-arduino","ffat","filesystem","littlefs","spiffs","web-editor","webserver","wifi-manager","wifimanager"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cotestatnt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-06-18T13:17:38.000Z","updated_at":"2026-01-17T10:19:16.000Z","dependencies_parsed_at":"2026-01-17T12:33:38.323Z","dependency_job_id":null,"html_url":"https://github.com/cotestatnt/esp-fs-webserver","commit_stats":null,"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"purl":"pkg:github/cotestatnt/esp-fs-webserver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cotestatnt%2Fesp-fs-webserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cotestatnt%2Fesp-fs-webserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cotestatnt%2Fesp-fs-webserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cotestatnt%2Fesp-fs-webserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cotestatnt","download_url":"https://codeload.github.com/cotestatnt/esp-fs-webserver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cotestatnt%2Fesp-fs-webserver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28770198,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T07:45:00.504Z","status":"ssl_error","status_checked_at":"2026-01-26T07:45:00.070Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["arduino","esp32","esp32-arduino","esp8266","esp8266-arduino","ffat","filesystem","littlefs","spiffs","web-editor","webserver","wifi-manager","wifimanager"],"created_at":"2025-04-04T16:33:52.648Z","updated_at":"2026-03-08T11:04:02.990Z","avatar_url":"https://github.com/cotestatnt.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ESP-FS-WebServer\n\nA library for ESP8266/ESP32 that provides a web server with an integrated file system browser, WiFi configuration manager, and support for WebSockets. This library is based on the synchronous `WebServer` class.\n\n![WiFi Manager](docs/wifi_manager.png)\n\n## Features\n\n-   **Dynamic WiFi Configuration**: An integrated setup page (`/setup`) allows you to scan for WiFi networks and connect the ESP to your local network. Passwords are stored using AES-256-CBC encryption (hardware on ESP32 platform) with multiple SSIDs manager (up to 5 different WiFi credentials).\n-   **Powerful \u0026 Customizable UI**:\n    -   Easily add your own configuration parameters (text boxes, checkboxes, sliders, dropdown lists) to the setup page.\n    -   Inject custom **HTML, CSS, and JavaScript** snippets into the setup page to create rich, dynamic user interfaces for your specific project needs.\n-   **Over-the-Air (OTA) Updates**: Update your device's firmware securely and conveniently through the web interface. You can easily upload also your entire web project's `data` folder to the ESP's filesystem.\n-   **WebSocket Support**: Built-in support for real-time, two-way communication between the web client and the ESP.\n-   **Advanced File Management**: An embedded file manager (`/edit`) allows you to browse, view, upload, and delete files and folders.\n\n## Documentation\n\nFor more detailed information, please refer to the documentation in the `docs` folder:\n\n-   **[API Reference](docs/API.md)** – Detailed overview of the public methods.\n-   **[Setup and WiFi](docs/SetupAndWiFi.md)** – Guide to `startWiFi()`, captive portal, and the `/setup` page.\n-   **[Filesystem and Editor](docs/FileEditorAndFS.md)** – How to serve static files and use the `/edit` page.\n-   **[WebSocket](docs/WebSocket.md)** – Information on using the WebSocket server.\n-   **[Password Encryption](docs/pwd_encrypt.md)** – Information on how passwords are managed.\n\n## Dependencies\n\n-   ESP8266/ESP32 Core for Arduino\n\n## Basic Usage\n\n```cpp\n#include \u003cFS.h\u003e\n#include \u003cLittleFS.h\u003e\n#if defined(ESP8266)\n#include \u003cESP8266WiFi.h\u003e\n#else\n#include \u003cWiFi.h\u003e\n#endif\n#include \"FSWebServer.h\"\n\n// Use LittleFS\nfs::FS\u0026 filesystem = LittleFS;\n\nFSWebServer server(80, filesystem, \"esphost\");\n\nvoid setup() {\n  Serial.begin(115200);\n\n  // Initialize Filesystem\n  if (!filesystem.begin()) {\n    Serial.println(\"Error mounting file system.\");\n    return;\n  }\n\n  // Start WiFi (or captive portal if no credentials)\n  server.startWiFi(10000);\n\n  // Add a handler for the root page\n  server.on(\"/\", []() {\n    server.send(200, \"text/html\", \"\u003ch1\u003eHello from FSWebServer!\u003c/h1\u003e\");\n  });\n\n  // Start the server\n  server.begin();\n  Serial.println(\"HTTP server started.\");\n}\n\nvoid loop() {\n  server.run();\n}\n\n```\n\n## WiFi Management Enhancements\n\n### Dedicated WiFiService class\n- `WiFiService` centralizes scanning, connections, captive portal setup, MDNS, and watchdog handling so the sketch can stay focused on application logic.\n- When `startWiFi()` runs it loads credentials from `CredentialManager`, picks the SSID with the strongest RSSI (optionally honoring static IP data saved per credential), and reports a `WiFiStartResult` that tells `FSWebServer` whether to stay in STA or fall back to the captive portal.\n- `doWifiConnection()` now persists updated credentials before calling `WiFiService::connectWithParams()`, which feeds the long-timeout watchdog, reuses stored passwords when the form leaves the password blank, and advertises `http://\u003chostname\u003e.local` through `startMDNSOnly()` as soon as the STA link is up. `FSWebServer` logs when mDNS becomes reachable so you can verify the hostname was published.\n\n### Setup page reconnection experience\n- The `/getStatus` handler exposes firmware version, active mode, hostname, IP, and the configuration file path so the UI knows where to direct the user after a network change.\n- After `/connect` begins switching SSIDs the browser starts polling `http://\u003chostname\u003e.local/getStatus` (falling back to the captured AP when necessary) until the ESP reappears on the new network, automatically updates the credential list, and surfaces a timeout message only after several failed polls.\n- This polling loop keeps the loader visible, shows a modal once the device is reachable again, and points users to either the new `http://\u003chostname\u003e.local` URL or the IP reported by the ESP without forcing them to refresh manually.\n\n\n### Custom application \"options manager\"\n![options](docs/options_manager.png)\n\n### OTA update and `data` folder upload\n![OTA](docs/ota_data.png)\n\n### Custom 'code snippets'\n![snippet](docs/custom_html.png)\n\n### ACE file editor\n![File Manager](docs/file_manager.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcotestatnt%2Fesp-fs-webserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcotestatnt%2Fesp-fs-webserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcotestatnt%2Fesp-fs-webserver/lists"}