{"id":13414314,"url":"https://github.com/tripflex/captive-portal-wifi-web","last_synced_at":"2026-03-15T13:05:56.248Z","repository":{"id":147531751,"uuid":"174578126","full_name":"tripflex/captive-portal-wifi-web","owner":"tripflex","description":"Mongoose OS Wifi Web UI Configuration library","archived":false,"fork":false,"pushed_at":"2019-03-10T22:24:42.000Z","size":581,"stargazers_count":3,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-07-31T21:52:51.701Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tripflex.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}},"created_at":"2019-03-08T17:13:04.000Z","updated_at":"2023-03-23T23:55:24.000Z","dependencies_parsed_at":"2024-01-13T17:13:37.305Z","dependency_job_id":"e29e94fb-ee23-4fa3-8c10-7a6f4765947f","html_url":"https://github.com/tripflex/captive-portal-wifi-web","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tripflex%2Fcaptive-portal-wifi-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tripflex%2Fcaptive-portal-wifi-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tripflex%2Fcaptive-portal-wifi-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tripflex%2Fcaptive-portal-wifi-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tripflex","download_url":"https://codeload.github.com/tripflex/captive-portal-wifi-web/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254388341,"owners_count":22063033,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-07-30T21:00:18.807Z","updated_at":"2026-03-15T13:05:51.213Z","avatar_url":"https://github.com/tripflex.png","language":"JavaScript","funding_links":[],"categories":["Awesome Mongoose OS [![Awesome](https://awesome.re/badge.svg)](https://awesome.re)"],"sub_categories":["Community Libraries"],"readme":"# Mongoose OS Captive Portal WiFi Web UI\n\n[![Gitter](https://badges.gitter.im/cesanta/mongoose-os.svg)](https://gitter.im/cesanta/mongoose-os?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n\n- [Mongoose OS Captive Portal WiFi Web UI](#mongoose-os-captive-portal-wifi-web-ui)\n  - [Captive Portal Stack](#captive-portal-stack)\n  - [Author](#author)\n  - [Features](#features)\n  - [Installation/Usage](#installationusage)\n    - [Full Captive Portal Stack](#full-captive-portal-stack)\n    - [Only this library](#only-this-library)\n    - [Use specific branch of library](#use-specific-branch-of-library)\n  - [Required Libraries](#required-libraries)\n  - [How it works](#how-it-works)\n  - [Ideal Flow](#ideal-flow)\n  - [Directories and Files](#directories-and-files)\n  - [Gulp Commands](#gulp-commands)\n    - [Minify Files](#minify-files)\n    - [GZIP Files](#gzip-files)\n    - [Minify and GZIP](#minify-and-gzip)\n  - [Changelog](#changelog)\n  - [License](#license)\n\nThis library is **only** the Captive Portal WiFi Web UI.  It does not include any C or mJS files, and is specifically for use in the Captive Portal WiFi Stack.  This library was built with minimal space in mind, and as such, it **DOES NOT** include any libs like `axios`, `jquery` or anything else that would add unecessary bloat to your already limited space on embedded device!  **Completely vanilla JavaScript!**\n\n![OSX Captive Portal](https://raw.githubusercontent.com/tripflex/captive-portal-wifi-web/master/osx-portal.gif)\n\n## Captive Portal Stack\nThis is the **WiFi Setup Web UI** library from the [Captive Portal WiFi Full Stack](https://github.com/tripflex/captive-portal-wifi-stack), a full stack (frontend web ui \u0026 backend handling) library for implementing a full Captive Portal WiFi with Mongoose OS\n\n## Author\nMyles McNamara ( https://smyl.es )\n\n## Features\n- Provides web UI for testing and configuring WiFi\n- **Completely vanilla JavaScript**, no jQuery, Zepto, or other libraries required (because we all know space is limited)\n- **Unminified and non-gzipped** files are only `14.2kb` total in size ( `wifi_portal.css - 2.87 KB`, `wifi_portal.html - 1.45kb`, `wifi_portal.js - 14.2 KB` )\n- **Minified** files are only `14.2kb` total in size ( `wifi_portal.css -  1.81 KB`, `wifi_portal.html - 1007 Bytes`, `wifi_portal.js - 6.79 KB` )\n- **Minified and gzipped** files are only `3.26kb` total in size ( `wifi_portal.css.gz - 735b`, `wifi_portal.html.gz - 561b`, `wifi_portal.js.gz - 2kb` )\n- Displays a dropdown of available networks to connect to\n- Included minified files by default on device `fs_min` directory (are copied to device)\n- Source files are available in the `fs` directory (are not copied to device)\n- Minified and GZIP files are available in the `fs_min_gzip` directory (are not copied to device)\n\n## Installation/Usage\n\n### Full Captive Portal Stack\nIf you want all of the features this library was built for, you should install the [Captive Portal WiFi Stack](https://github.com/tripflex/captive-portal-wifi-stack) library instead of just this one:\n\nAdd this lib your `mos.yml` file under `libs:`\n\n```yaml\n  - origin: https://github.com/tripflex/captive-portal-wifi-stack\n```\n\n### Only this library\nAdd this lib your `mos.yml` file under `libs:`\n\n```yaml\n  - origin: https://github.com/tripflex/captive-portal-wifi-web\n```\n\n### Use specific branch of library\nTo use a specific branch of this library (as example, `dev`), you need to specify the `version` below the library\n\n```yaml\n  - origin: https://github.com/tripflex/captive-portal-wifi-web\n   version: dev\n```\n\n## Required Libraries\n*These libraries are already defined as dependencies of this library, and is just here for reference (you're probably already using these anyways)*\n- [captive-portal-wifi-rpc](https://github.com/tripflex/captive-portal-wifi-rpc)\n\n## How it works\nOn the initial load of captive portal page, a scan will be initiated immediately to scan for available networks from the device `WiFi.PortalScan`, and the dropdown will be updated with the available SSID's the device can connect to.\n\nOnce the user enters the password (if there is one), the page will then call the custom RPC endpoint from this library, `WiFi.PortalTest`, which initiates a connection test to the STA using provided credentials.\n\nThe captive portal will then wait `2` seconds for first initial check, and then every `5` seconds it will make an RPC call to `Sys.GetInfo` to see if the connection was succesful or not.  After `30` seconds, if the connection is not succesful, a timeout is assumed and notice will be shown on the screen (these values configurable in javascript file).  `30` seconds was chosen as default wifi lib connect timeout is `30` seconds.\n\nIf device succesfully connects to the SSID, and `cportal.setup.copy` is not set to `-1` (disabled), the values will be saved to the configured wifi sta `cportal.setup.copy`\n\nAll other relevant settings and handling will then also be called (as set/configured in Captive Portal WiFi Setup library)\n\n## Ideal Flow\nThe ideal flow process for the captive portal setup, is as follows:\n- AP is enabled on boot (or by code base)\n- User configures wifi settings\n- On succesful connection, device saves values, disables AP, and reboots .. automatically connecting to WiFi after reboot\n\n## Directories and Files\n- `fs` directory contains source files for the captive portal (unminified and not gzipped) *not copied to device*\n- `fs_min_gzip` directory contains the captive portal minified and gzipped files (css/js/index) *not copied to device*\n- `fs_min` directory contains the captive portal minified files (css/js/index) *copied to device*\n\n## Gulp Commands\nIf you decide to modify any of the source files and want to minify them afterwards, it's very easy to do using the included `gulpfile.js`.\n\nFirst you need to install all the dependencies for doing this, to do so, in the root of this library directory run this command:\n```shell\nnpm install\n```\n\nThis will install all the required libraries (Gulp, and gulp related modules), and then you can run any of the Gulp commands below.\n\n### Minify Files\nWhen running any of the minify gulp commands below, the files from `fs` directory will be minified and copied to the `fs_min` directory:\n**Minify HTML Only**\n```shell\ngulp minhtml\n```\n**Minify CSS Only**\n```shell\ngulp mincss\n```\n**Minify JS Only**\n```shell\ngulp minjs\n```\n**Minify All Files (HTML, CSS, and JS)**\n```shell\ngulp min\n```\n\n### GZIP Files\nWhen running the gzip gulp command, this will gzip all files located in the `fs_min` directory, and output them in the `fs_min_gzip`:\n```shell\ngulp gzipfiles\n```\n\n### Minify and GZIP\nYou can also run the `deploy` command to minify and gzip all files:\n```shell\ngulp deploy\n```\n\n## Changelog\n**1.0.1** (March 10, 2019) \n - Added support for Enterprise Networks\n - Added Emoji Support to show Lock/Unlock for Network Security Type\n - Hide password field for OPEN networks\n - Increased dropdown, button, and text input sizes to make easier to select on mobile devices\n - Added scroll to top after clicking save (to easily see info banner)\n\n**1.0.0** (March 9, 2019)\n - Initial release\n\n## License\nApache 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftripflex%2Fcaptive-portal-wifi-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftripflex%2Fcaptive-portal-wifi-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftripflex%2Fcaptive-portal-wifi-web/lists"}