calendar
All repositories: gitoria
3.4 KB
// project.hl — calendar.worldapi.org: THE MAP. Config, routes and WHO HEARS WHAT. Hybriel on hl:web.// The month view at `/` (ticket #1); login with ident and the user's private events (ticket #2).//// WHERE WHAT IS (README "Files"):// events, every write to events.db, the faces' answers lib/events.hl (+ lib/events-helpers.hl)// the default reminders (settings.db) lib/settings.hl// users, the ident exchange, both logins' user step lib/users.hl// /login/callback lib/api.hl (+ lib/api-helpers.hl)// env, table folder, lists, id checks lib/util.hl// the page shell, login/logout faces components/main.hl// `/` and the event faces, /login/failed, all CSS components/calendar.hl, loginfailed.hl, styles.hl// the month view (UI, dates, names, reminders, clock) components/month-view/import WebFramework from 'hl:web'import { env } from 'hl:proc'import Styles from './components/styles.hl'import { tagOf } from './lib/users.hl'import { loginCallback } from './lib/api.hl'import Calendar from './components/calendar.hl'import LoginFailed from './components/loginfailed.hl'static siteName = "Calendar"appTitle = siteNameappThemeColor = '#191e23'appBackgroundColor = '#191e23'appIcons = [{ src = '/icons/icon-192.png' sizes = '192x192' purpose = 'any' }{ src = '/icons/icon-512.png' sizes = '512x512' purpose = 'any' }{ src = '/icons/icon-192.png' sizes = '192x192' purpose = 'maskable' }{ src = '/icons/icon-512.png' sizes = '512x512' purpose = 'maskable' }]offline = [ Calendar ]styles = Stylesroutes = [{ pattern = "/favicon.ico" direct = "" }// the login button's return writes the session: the request and the store go BY REFERENCE (lib/api.hl){ pattern = "/login/callback" function = (route, req) => { return loginCallback(route, &req, &server.sessions) } }{ pattern = "/login/failed" component = LoginFailed }{ pattern = "/login.js" file = "./login.js" headers = { 'Cache-Control' = 'no-cache' } }// the installable app (ticket #3): the icons (manifest and service worker are hl:web's own, from appIcons / offline){ pattern = "/icons/icon-192.png" file = "./icons/icon-192.png" headers = { 'Cache-Control' = 'no-cache' } }{ pattern = "/icons/icon-512.png" file = "./icons/icon-512.png" headers = { 'Cache-Control' = 'no-cache' } }{ pattern = "/" component = Calendar }]// WHO GETS THE PUSH: the login state reaches the tabs of one session.// `calendarSignedIn` / `calendarSignedOut` go to the tabs of ONE session: the one whose login carries that random tag.audience = {calendarSignedIn = (tag, session) => { return tag != null && tagOf(session) == tag }calendarSignedOut = (tag, session) => { return tag != null && tagOf(session) == tag }}sessionDir = env('CALENDAR_SESSIONS') != null ? env('CALENDAR_SESSIONS') : nullport = env('CALENDAR_PORT') != null ? toNumber(env('CALENDAR_PORT')) : 8380// HL_HOST = the interface hl:web binds: 127.0.0.1 on Byrodin behind nginx; unset = 0.0.0.0 (dev on Loreana).// CALENDAR_WATCH=0 = no dev watcher.watching = env('CALENDAR_WATCH') != '0'// The session idles out after the 14 days of sessionMaxAge, not after 15 minutes.sessionCookie = 'calendarsid'sessionIdle = 1209600server = new WebFramework(routes = routes, styles = styles, minify = true, port = port, watchMode = watching, sessionCookie = sessionCookie)on Error(e) { console.log('error absorbed: ' + e.message) }
Branches
- mainmain branch
Latest commits
- f5ce6b1dcalendar mission 001 (2/4): code order — topics, map, thin faces: lib/util.hl, lib/events(-helpers).hl (+calendarView/settingsView/soonOf), lib/settings.hl, lib/users.hl (+userOfLoginCode, tagOf), lib/api(-helpers).hl; project.hl = map; login route takes &req/&sessions (failed-login reason now kept); gates 78/0 + 18/0mre
- c6fbd011calendar mission 001 (1/4): code order — files moved: lib/events.hl, lib/users.hl, components/styles.hl (imports only); gates 78/0 + 18/0, live-data run identicalmre
- d6c59290calendar: Hybriel master 06617221 (plugin allocators 3a781359 + 413f60e4, mpackdb 2cb7ae5e, http1 773de63e); gates 78/0 + 18/0mre
- 7bd0337ccalendar: Hybriel master 190aa11d (fc838894 GC correctness, #126 closure scopes, #127); gates 78/0 + 18/0mre
- ff41310ccalendar: Hybriel master 8efba065 (#126 memory, #48 lambda copy; audit: no & needed)mre
- 14ba08c7antcolony#40: mission references point to the moved missionsmre
- 99c73346antcolony#40: history (LOG.md), worker briefs (missions/) and reports moved here from antcolony, numbered per project; old numbers in antcolony docs/mission-map.mdmre
- 76edaa62calendar: Hybriel master ff51cf46 (re-vendor round, static workaround removed)mre
- 90a3fc2cdeploy.sh: back up live storage/.sessions/.env before every deploy (newest 5 kept)mre
- 6722b72ddeploy.sh: never send .git or .gitignore to Byrodinmre
- be099807State of 2026-09-27, before the move to gitoriamre