Coder Social home page Coder Social logo

nicolaschan / bell Goto Github PK

View Code? Open in Web Editor NEW
23.0 6.0 10.0 23.08 MB

⏱ Counting down to the next time the bell rings at school

Home Page: https://bell.plus

License: MIT License

CSS 9.87% JavaScript 70.30% HTML 1.30% Shell 0.52% TypeScript 17.90% Dockerfile 0.12%
nodejs schedule school mithril

bell's Introduction

Bell Schedule Countdown

Build Status Uptime codecov.io codebeat badge JavaScript Style Guide dependencies Status devDependencies Status Chrome Web Store

Saved by the bell.plus!

About

Bell is a synchronized timer that counts down to the next time the bell rings at school. A live instance of this program is currently running at bell.plus (formerly countdown.zone and bell.lahs.club). This software continues to be developed by Los Altos High School alumni, nicolaschan and noloerino, who began working on it during their senior year of high school. The LAHS Hack Club helps to maintain the schedules for LAHS.

As seen in The Talon, the Los Altos High School student newspaper

Features

  • Support for weekly schedules
  • Support for special schedules and holidays
  • Support for entering custom schedules
  • Support for fetching data from distributed sources
  • Automatic data refreshing and caching
  • Visual indicator of the proportion of the time elapsed in current period
  • Customizable theme and period names, stored client-side
  • Accurately synchronizes, even if client computer time is incorrect
  • Adjustable correction for use when the server time is not the exact same as the school time
  • Hits and errors are recorded to a database for analysis

Documentation

Usage instructions are provided on our wiki.

Screenshots

screenshot customizable

bell's People

Contributors

jamsheedmistri avatar nicolaschan avatar noloerino avatar safelock avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bell's Issues

Synchronizing window sometimes gets stuck

The synchronizing spinner/loader just got stuck and reloading doesn't fix it. Here is the console:

20:04:40 INFO: Type logger.setLevel('debug') to enable debug logging
client.js:50237 Uncaught (in promise) TypeError: this.setBellCompensation is not a function
at BellTimer.loadCustomCourses (client.js:50237)
at BellTimer.reloadData (client.js:50237)
at BellTimer.initialize (client.js:50240)
at client.js:49663
at
screen shot 2017-11-12 at 8 04 57 pm

api message.json

Please add a file called message.json to the data/<api name>/ folder in the bell API. Each message would be in addition to the countdown.zone messages, if enabled. Format similar to the current message.json:

[{
  "message": {
    "enabled": true,
    "text": "Come check out the LAHS Hack Club!",
    "href": "https://lahs.club"
  }
}]

Report current client version in analytics/error reports

Would be useful to record which version of the client the user is currently on in each analytics/error report. This should only require a simple update to the database schema and simply adding a field to the JSON data that is posted.

Schedules not updated

The schedules are not reflected on the site. I am 98% sure it has something to do with this
image

not being this:
image

I would open a PR but I don't want to mess something up(and I have no clue how to fix it)

Memory profile Tomcat server

Tomcat server needs to be memory profiled to figure out how to reduce its memory usage and ensure that there are no leaks.

Setting -Xmx/-Xms command line arguments or similar might help.

egan bell not right

my chum goes to egan and the bell schedule is off, here is the correct schedule for Friday/Tuesday

image

hope this helps

EDIT: advisory on wednesday is tutorial too got email from him

Extremely high cpu usage in background

If I leave bell.plus open for a few days (a few hours of actual computer use) in the background while doing other things it runs the browser's cpu usage over 100% (according to top -u on macos). It seems like there's some kind of leak somewhere, but I don't really have the ability to debug where it comes from at the moment. This problem occurs in both Firefox and Google Chrome. There's a pretty slim chance the leak is somewhere else other than the site, because the cpu usage issue is resolved when I close the tab. I do not have any extensions installed.

I would recommend just double checking that the page isn't causing any issues with CPU usage, and if it isn't I guess I should do some closer monitoring of the source of the usage.

Blocking Cookies will cause the Page to Hang on Loading.

Title.

Reproduce Instructions: Block All (including Third-Party) Cookies on Chrome or Firefox, and attempt to load the site.

2 Errors are thrown in the JS console, which are listed below.

One is: Uncaught (in promise) DOMException: Failed to register a ServiceWorker for scope ('https://bell.plus/') with script ('https://bell.plus/bin/service-worker.js'): The user denied permission to use Service Worker.

The other is: client-mithril.js:formatted:11073 Uncaught (in promise) Error: No available storage method found. at n (client-mithril.js:formatted:11073:53)

It appears that some exception handling is required for these items since the site can still work (and reports ready in the JS Console) without these items, it just means that user data will not store locally and will be unavailable after a refresh of the site.

This "no storage effect" does not affect users who just use one of the built-in schedules, as they can still continue to use a direct link to the schedule to load their preferred schedule, or the root site to load the default schedule (LAHS on bell.plus). They will however, still hang due to the exception handling not being properly implemented.

Workaround: Please enable (at the very min) First Party Cookies and Local Storage. These are only stored within your browser and contain data about your schedules should you decide to store a custom schedule. You may clear these at any time, with the only caveat being that if you clear the local storage, you also clear any custom schedule you may have entered, and will need to re-enter that schedule again.

Add preview for future schedules

Add a way to view future schedules. Also add a way to view the entirety of today's schedules. We probably shouldn't allow more than the current week's schedules to be viewed because there might be unannounced changes in the following weeks.

Client error report: QuotaExceededError

Very common error reported to our database. Likely caused by overuse of local database for storing the request cache.

To fix:

  1. Switch all request caching to use service-worker (service-worker.js)
  2. Clear requestCache on clients (RequestManager)

Add nginx config file to repository

For those running on nginx, it would be useful to include a sample config file for bell. This file would include serving static files and routing API requests to the node server.

Allow iOS users to add to homescreen as standalone app

If you have an iOS device, most people are unaware that it's super easy to make a native app out of a normal website for easy access.

In Safari, there's an option to export a website to the homescreen. Once you do that, it sets the current page <title> to the title of the app, and the current page render as the app icon. When you click the app, it just opens Safari to the saved webpage.

However, Apple allows you to customize this using <meta> tags, and it's actually really neat!

I'd propose adding these meta tags (I would make a PR myself but I'm not sure where they're supposed to go).

<meta name="apple-mobile-web-app-title" content="bell">

This would make the name of the web app "bell" rather than the current time (as the tablist would display normally) when exporting.

<meta name="apple-mobile-web-app-capable" content="yes" />

This will make the app able to be exported as its own standalone app. Meaning that when you open it, it'll open in its own app rather than in Safari.

<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />

This will allow the top status bar to blend in with the app

<link rel="apple-touch-icon-precomposed" href="assets/images/logo.png" />
<link rel="apple-touch-icon" href="assets/images/logo.png" />

If linked to the correct location, this will change the app icon to whatever the image is. Must be a square. I'd recommend using the current logo we have for our Twitter. I made a special one for this purpose, you can find it at this link: https://i.imgur.com/Zv2bBox.png

And that should be it! Sorry for not doing it myself but I didn't want to mess anything up. This will allow a fully functioning bell app on iOS user's home screen for easier access!

Add Standard Time option

Hello!

I just installed your Bell Countdown extension and am using the Custom Schedule function to help my 8 year old stay on track while doing remote learning this semester. Since she is still learning how to tell time, I would like to see if you can add an option to select either Military Time or Standard AM/PM Time.

Thanks for your consideration!
Amy

Time Difference

Hi I'm A Person Who Is Trying To Make A Better Schedule For My School But Your Time Is Ass, I'm Sorry To Say This But My School And Custom Schedule That I Wanted To Post Is A Damn 1 Minute Off, From Our School To Your Website Is Still 1 Minute Off And Keeps Increasing. I Can't Edit Your Code But If I Had Access To Your Code I Could Fix It For You But If Not I Respect That, Just Please Get Your God Damn Time Right Because Its Driving Me Crazy That The Time Doesn't Match With The Bell.
Please Fix This Fast,
Coder Chris

Can this be embedded on webpage?

We are a school who would love to embed this onto our Home webpage so that the clock feature shows up and counts down directly there rather than have our parents and students have to go completely to another tab or website. Is this a possibility?

Custom Schedule Enhancement

When selecting the day for the time block in a custom schedule there should be an option for every weekday (Mon-Fri). At our school, our bell schedule is the same every day, every week. Entering the schedule for each day might improve the ease of custom scheduling.

Current Way
Capture

Proposed Way
Capture

Rewrite performance sensitive code in WebAssembly

Performance sensitive code should be rewritten in WebAssembly. We can use Rust, C, or C++ and compile to WebAssembly.

Areas that might benefit:

  • BellTimer and related modules (Calendar, Schedule, etc.)
  • Schedule/calendar parsers

Combining classes

It would be cool to have an option to have all of your free periods merge with other periods. Like how if you had a free 4th, it would merge with lunch and it would be called "free".
screen shot 2017-11-01 at 1 20 45 pm

Preferences always reset

Whenever I input my preferences (classes, color), they show up for a little while (on the extension, the default shows for a second then it switches to my preferences), but then when I open it again it reverts back to default (sometimes it will show my changes for a moment, then switches back to default). I tried reinstalling the extension and manually resetting my preferences, then putting them back in. I'm using a Chromebook on the latest OS with the chrome extension. Thanks in advance.

no website caching

Hi!

As a fellow website developer, I noticed that recently your website doesn't cache resources such as JS and CSS.
This is especially concerning as your download per page-load has come up to 41.9 KB compared to the ~5 KB it was before.
Update: I just noticed that it is about 50 KB on Google Chrome because of "304 Not Modified" headers. However, on browsers that don't fully support that, I get around 500 KB of information downloaded on each page load.

I know you may have done this purposefully, but I think that it greatly increases load time.

On top of that is server load:
You're are running node.js on a home server (I assume Comcast because of an IP lookup).
At the amount of page loads you get, you have the possibility of overloading your server and your home bandwidth.
You used to use Cloudflare which seems like a great way to ensure protection and speed of your website, but it seems like that was also recently disabled.

I realize that you might have done this all for a reason; as a curious fellow developer, would you mind enlightening as to the benefits of these changes?

Edge not supported

Edge is not supported because of its limitations with localStorage. Fix this by switching to indexedDB.

Client error report: TimeoutError (and localForage errors in general)

We need to deal with localForage errors in a better way and make sure the website remains usable even if we can't save persistent state.

Here is some of the error data we have collected:

{"name":"TimeoutError","message":"Transaction timed out due to inactivity."}
{"name":"Error","message":"No available storage method found.","stack":"e@https://countdown.zone/bin/client-mithril.js?_v=3.0:1:203617\nu@https://countdown.zone/bin/client-mithril.js?_v=3.0:1:152503\nhttps://countdown.zone/bin/client-mithril.js?_v=3.0:1:152625\ns@https://countdown.zone/bin/client-mithril.js?_v=3.0:1:25759"}
{"name":"NotFoundError","message":"Failed to execute 'transaction' on 'IDBDatabase': One of the specified object stores was not found.","stack":"Error: Failed to execute 'transaction' on 'IDBDatabase': One of the specified object stores was not found.\n at https://countdown.zone/bin/client-mithril.js?_v=3.0:1:187114\n at <anonymous>"}
{"name":"UnknownError","message":"An unknown error occurred within Indexed Database."}

Improve service worker

We should rewrite RequestManager to leave all request caching to the service worker (would help resolve issue #22).

Goals:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.