projects > better_dtek.ts
1
Better DTEK[github][live]
1
2
Real-time web application for tracking power outages in Ukraine
3
across DTEK regions.
4
5
Features visual traffic light status indicators, multi-address
6
tracking with custom labels, and hourly schedules for planned
7
outages. Emergency alerts are distinguished with pulsing
8
indicators.
9
10
[Playwright][Redis][SvelteKit][TailwindCSS][TypeScript][Vercel][Vite]
11
12
13
┌─┐ ┌─ ┌─┐ ┌─┐ 00:00 – 04:00 ██ power
14
│ │ ├─┐ │ │ │ │ 04:00 – 07:30 ░░ outage [██████░░░░]
15
└─┘ └─┘ └─┘ └─┘ 07:30 – 08:00 ▒▒ maybe
16
08:00 – 13:00 ██ power
17
today 13:00 – 16:30 ░░ outage
18
GPV1.2 16:30 – 17:00 ▒▒ maybe
19
17:00 – 21:00 ██ power
20
outage 21:00 – 23:30 ░░ outage
21
next 07:30 maybe 23:30 – 00:00 ██ power
22
in 1h30m
23
25
26
export function transformBuildingStatus(raw: DtekBuildingStatus): BuildingStatus {
27
const result: BuildingStatus = {};
28
29
// Extract schedule group (e.g., "GPV1.2")
30
const group = extractScheduleGroup(raw.sub_type_reason);
31
if (group) result.group = group;
32
33
// Set outage if API reports active blackout with dates
34
if (raw.type && raw.start_date && raw.end_date) {
35
result.outage = {
36
type: getOutageType(raw.sub_type),
37
from: raw.start_date,
38
to: raw.end_date,
39
};
40
}
41
42
return result;
43
}
44
45
46
47
48
49
NORMAL~/oleksandr/projects/better_dtek.ts.../projects/better_dtek.tsmainutf-8
Enter to open · :q to quit
keys
j / kmove the cursor line, or the tree cursor
hfocus the tree; in the tree, fold or go to the parent
l / Enterin the tree, unfold or open the file
gg / Gfirst / last line
clickput the cursor on a line; on README.sh, run the session again
:qquit to the shell
:help ?this table
q / Escclose this