Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basic layout #6

Merged
merged 12 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
name: CI

on:
[pull_request, push]
pull_request:
branches:
- main

push:
branches:
- main

jobs:
test:
Expand Down
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,29 @@

[![CI](https://github.com/ellielle/bootdev-buddy/actions/workflows/ci.yml/badge.svg)](https://github.com/ellielle/bootdev-buddy/actions/workflows/ci.yml)

This app provides a GUI to collect and show data from [Boot.dev](https://boot.dev/). It can be used as a companion app while doing coursework to monitor on-going events, buff timers, courses or lessons added since the app was last opened, and much more.
This app provides a GUI to collect and show data from [Boot.dev](https://boot.dev/). It can be used as a companion app while doing coursework to monitor on-going events, their buffs, and much more.

Note: This project isn't affiliated with Boot.dev in any way. I'm just a student that wanted to make something I thought was cool.

## Logging In

Boot.dev uses a one-time password system for logging in via it's CLI. Using this same OTP, BDB can authenticate the user and retrieve their Boot.dev data.

> Currently logging into the app is session-based. You'll need another OTP each time you open it.
Access tokens are only valid for 60 minutes. Once invalid, the app will attempt to renew the token. If it fails, you may need get another OTP and sign in again. If that fails, restart the app.

## Planned Features

- [x] Sign in using Boot.dev's authentication
- [x] In-memory cache of requests made
- [ ] Not in-memory cache of images
- [x] Automatic sign-in on load
- [ ] Fancier and more formatted stats
- [ ] View other mages' profiles by click
- [ ] View a tally of lessons completed, and see how many of each course are done
- [ ] Buff timers
- [ ] Boss event monitoring / participation
- [ ] Pomodoro timer (might as well if it's going to be open!)
- [ ] More(?)

## Live Development

Expand Down
9 changes: 7 additions & 2 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ func (a *App) LoginUserWithToken() (bool, error) {

// UserData sends an authenticated request to gather the user's
// data for display in the app.
func (a *App) UserData() {
log.Print("UserData")
func (a *App) UserData() (bootdevapi.UserData, error) {
userData, err := bootdevapi.UserInfo(a.cache, a.tokens.AccessToken)
if err != nil {
return bootdevapi.UserData{}, nil
}

return userData, nil
}
100 changes: 100 additions & 0 deletions frontend/bootdevtheme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
/** @type {import('@skeletonlabs/tw-plugin').CustomThemeConfig} */
export const bootDevTheme = {
name: "bootdev",
properties: {
// =~= Theme Properties =~=
"--theme-font-family-base": `system-ui`,
"--theme-font-family-heading": `system-ui`,
"--theme-font-color-base": "0 0 0",
"--theme-font-color-dark": "255 255 255",
"--theme-rounded-base": "9999px",
"--theme-rounded-container": "8px",
"--theme-border-base": "1px",
// =~= Theme On-X Colors =~=
"--on-primary": "0 0 0",
"--on-secondary": "255 255 255",
"--on-tertiary": "0 0 0",
"--on-success": "0 0 0",
"--on-warning": "0 0 0",
"--on-error": "255 255 255",
"--on-surface": "255 255 255",
// =~= Theme Colors =~=
// primary | #7E88F7
"--color-primary-50": "236 237 254", // #ecedfe
"--color-primary-100": "229 231 253", // #e5e7fd
"--color-primary-200": "223 225 253", // #dfe1fd
"--color-primary-300": "203 207 252", // #cbcffc
"--color-primary-400": "165 172 249", // #a5acf9
"--color-primary-500": "126 136 247", // #7E88F7
"--color-primary-600": "113 122 222", // #717ade
"--color-primary-700": "95 102 185", // #5f66b9
"--color-primary-800": "76 82 148", // #4c5294
"--color-primary-900": "62 67 121", // #3e4379
// secondary | #2b2c31
"--color-secondary-50": "223 223 224", // #dfdfe0
"--color-secondary-100": "213 213 214", // #d5d5d6
"--color-secondary-200": "202 202 204", // #cacacc
"--color-secondary-300": "170 171 173", // #aaabad
"--color-secondary-400": "107 107 111", // #6b6b6f
"--color-secondary-500": "43 44 49", // #2b2c31
"--color-secondary-600": "39 40 44", // #27282c
"--color-secondary-700": "32 33 37", // #202125
"--color-secondary-800": "26 26 29", // #1a1a1d
"--color-secondary-900": "21 22 24", // #151618
// tertiary | #2B2C31
"--color-tertiary-50": "223 223 224", // #dfdfe0
"--color-tertiary-100": "213 213 214", // #d5d5d6
"--color-tertiary-200": "202 202 204", // #cacacc
"--color-tertiary-300": "170 171 173", // #aaabad
"--color-tertiary-400": "107 107 111", // #6b6b6f
"--color-tertiary-500": "43 44 49", // #2B2C31
"--color-tertiary-600": "39 40 44", // #27282c
"--color-tertiary-700": "32 33 37", // #202125
"--color-tertiary-800": "26 26 29", // #1a1a1d
"--color-tertiary-900": "21 22 24", // #151618
// success | #39d50d
"--color-success-50": "225 249 219", // #e1f9db
"--color-success-100": "215 247 207", // #d7f7cf
"--color-success-200": "206 245 195", // #cef5c3
"--color-success-300": "176 238 158", // #b0ee9e
"--color-success-400": "116 226 86", // #74e256
"--color-success-500": "57 213 13", // #39d50d
"--color-success-600": "51 192 12", // #33c00c
"--color-success-700": "43 160 10", // #2ba00a
"--color-success-800": "34 128 8", // #228008
"--color-success-900": "28 104 6", // #1c6806
// warning | #fad35f
"--color-warning-50": "254 248 231", // #fef8e7
"--color-warning-100": "254 246 223", // #fef6df
"--color-warning-200": "254 244 215", // #fef4d7
"--color-warning-300": "253 237 191", // #fdedbf
"--color-warning-400": "252 224 143", // #fce08f
"--color-warning-500": "250 211 95", // #fad35f
"--color-warning-600": "225 190 86", // #e1be56
"--color-warning-700": "188 158 71", // #bc9e47
"--color-warning-800": "150 127 57", // #967f39
"--color-warning-900": "123 103 47", // #7b672f
// error | #e4184b
"--color-error-50": "251 220 228", // #fbdce4
"--color-error-100": "250 209 219", // #fad1db
"--color-error-200": "248 197 210", // #f8c5d2
"--color-error-300": "244 163 183", // #f4a3b7
"--color-error-400": "236 93 129", // #ec5d81
"--color-error-500": "228 24 75", // #e4184b
"--color-error-600": "205 22 68", // #cd1644
"--color-error-700": "171 18 56", // #ab1238
"--color-error-800": "137 14 45", // #890e2d
"--color-error-900": "112 12 37", // #700c25
// surface | #1f1f23
"--color-surface-50": "221 221 222", // #ddddde
"--color-surface-100": "210 210 211", // #d2d2d3
"--color-surface-200": "199 199 200", // #c7c7c8
"--color-surface-300": "165 165 167", // #a5a5a7
"--color-surface-400": "98 98 101", // #626265
"--color-surface-500": "31 31 35", // #1f1f23
"--color-surface-600": "28 28 32", // #1c1c20
"--color-surface-700": "23 23 26", // #17171a
"--color-surface-800": "19 19 21", // #131315
"--color-surface-900": "15 15 17", // #0f0f11
},
};
4 changes: 2 additions & 2 deletions frontend/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<html lang="en" class="dark">

<head>
<meta charset="UTF-8" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<title>Boot.dev Buddy</title>
</head>

<body style="--wails-draggable:drag">
<body style="--wails-draggable:drag" data-theme="bootdev">
<div id="app"></div>
<script src="./src/main.js" type="module"></script>
</body>
Expand Down
Loading
Loading