marek-saji / okupando Goto Github PK
View Code? Open in Web Editor NEWSingle-page application with single-task focus — checking if the toilet is occupied or not. Also a pun. 🚽🐼
License: ISC License
Single-page application with single-task focus — checking if the toilet is occupied or not. Also a pun. 🚽🐼
License: ISC License
/?dashboard
. Display same page as on /
, but:
Error: ENOENT: no such file or directory, stat '/home/pi/okupando/source/static/apple-touch-icon-120x120-precomposed.png'
Error: ENOENT: no such file or directory, stat '/home/pi/okupando/source/static/apple-touch-icon-120x120.png'
Error: ENOENT: no such file or directory, stat '/home/pi/okupando/source/static/apple-touch-icon.png'
Error: ENOENT: no such file or directory, stat '/home/pi/okupando/source/static/apple-touch-icon.png'
Resources:
--host=HOST
greenlock-express
to run on https with let’s encrypt certificateBlocks #4.
When server gets free
status, push only to first subscribed client. Push to next one if status changed from and then back to free
or after it’s free for some time.
error
alert pops up on browsers with no push supportWhen queue is not empty and status changes to free
:
occupied
within 1 min, top client is removed and she gets a notificationoccupied
within 1 min, top client gets removed, gets a notification and next client gets notified/queue
without web push subscription. Queueing should be possible even for non-JS users.Defer beforeinstallprompt
event.
See https://developers.google.com/web/fundamentals/app-install-banners/#listen_for_beforeinstallprompt
Display ➕🏠 icon in the corner of the screen.
static/index.mjs
got fat and hard to follow.
Progressive enhancement FTW.
<meta http-equiv="refresh">
🔗Served by the server.
localtunnel.me
). After some timeout, act same as we’d get denied.free
next timeWe enter this mode, when user user subscribes and JS detects that client has all the features we want and we successfully get notification permission.
Note: If there are subscribed clients, clients in mode ⓐ and ⓑ may be presented with status occupied
, while subscribed clients get pushed about status being free
.
free
Don’t run code if it will fail.
e.g. subscribing on safari (which is not supported yet, #5) ends up in ReferenceError
which prevents fallback from working
Now we have our debug interface baked–in in lib/status/observer/debug.mjs
. Extracting it to separate file would allow other modules registering their own key shortcuts. e.g.:
theme-color
is missingPage reflects every status change.
After receiving the notification page stops working.
Accept firebase tokens on /subscribe
Use FCM (Firebase Cloud Messaging) to send messages to these. See https://firebase.google.com/docs/cloud-messaging/send-message
Figure out whether this supports actions (needed for #11)
occupied
/error
: push to all clients, don’t clear themfree
: push to first client, remove from queue
/check
occupied
while push queue is not emptyDesign our own icon, instead of using toilet emoji from Google Noto Emoji font.
app icon (svg, png 192×192px, png 512×512px) for splash and android homescreen
Keep content in the safe zone: https://www.w3.org/TR/appmanifest/#icon-masks
iOS app icon (svg, png 512×512px), because iOS does not take icons from manifest, ignores transparency and adds rounded corners
With solid background and rounded corners of 80px. Add to index.html
:
<link rel="apple-touch-icon" href="/icon-512-apple.png">
favicon (svg, png 32×32px, ico 32×32px) that looks good in 16×16px
remove LICENSE-icon file and mention of Google Noto Emoji from README.md and
Probably reading from a file.
free
: push to all clients, remove them from queueweb-push
)web-push
)Similar to https://github.com/DietLabs/okupando/issues/25, but if number of people in queue goes up, announces the new number, if is occupied longer than some time.
Perfect for stressing out people occupying toilet for too long.
Should be easy enough with rpi-gpio looks promising.
We could then run it in single process with HTTP server and avoid file-reading shenanigans.
Come up with a way of running outside raspberry for UI development.
aria-live=polite
to status before changing it.Blocked by #10.
Instead of long polling for clients that can do web sockets.
Remember to update CONTRIBUTING.md
HTTPS is out of scope for this project. It should be handled by a load balancer or other router.
e.g. https://traefik.io/
We want to set up our instance so that you can go to the same address from company’s intranet and get a real okupando, but when you access the URL from outside of the company (to show the application off), you get a demo instance.
Demo mode that changes status every so often by itself and sometimes adds ghosts to the queue.
With big „demo” label and link to official website.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.