179 Commits

Author SHA1 Message Date
33d722b225 Add zip archive to build. (#82)
Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/82
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-28 22:21:34 +00:00
ba09f06a86 small readme tweaks (#81)
Some checks are pending
Run unit tests / run-unit-tests (push) Waiting to run
Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/81
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-28 12:57:19 +00:00
66f40e5e97 Add LLM disclosure to README (#79)
Some checks failed
Run unit tests / run-unit-tests (push) Has been cancelled
Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/79
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-18 13:09:18 +00:00
02f46cc08c update-docs (#74)
Update docs for 1.0 release

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/74
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-16 15:57:58 +00:00
d60230f975 Only show delete icon when logged in. (#73)
Check for a valid login session before showing delete icons on ticks.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/73
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-15 18:43:31 +00:00
d03c0a5331 Move feeds out of subpath. (#72)
Flatten feed location.

Now, if people decide to host this at my-domain/feed, the feeds won't be at my-domain/feed/feed

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/72
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-15 01:44:50 +00:00
dbd27b266d Gracefully handle validation errors in CSS and Emoji pages. (#71)
Handle CSS and Validation emoji errors so users get descriptive messages and are able to return to the application.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/71
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-14 19:44:41 +00:00
f96616bcef Add a bad docker config to test the setup error page (#70)
Add a configuration with apache and php, but no sqlite. Confirm that the setup error page displays on first load.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/70
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-14 11:54:36 +00:00
eeb73eccd4 Fix feed links, clean up single tick pages (#69)
Fix feed links. Clean up single-tick page.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/69
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-14 01:10:35 +00:00
d3a537aa6c Fix first-time setup issues. (#68)
Fixes for issues found testing first time setup in the different configurations.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/68
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-13 12:02:37 +00:00
801bbebf4f configure-delete-window (#66)
Let users configure the amount of time that a tick can be deleted

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/66
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-11 00:34:06 +00:00
86abf587f6 simplify web server configs (#65)
Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/65
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-10 22:13:45 +00:00
195de75b78 Add tick delete function (#64)
Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/64
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-09 14:49:56 +00:00
16f8631fd4 Fix cases where I missed renaming config to settings (#63)
Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/63
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-08 20:03:44 +00:00
3df38de9fb Change ConfigModel to SettingsModel (#62)
Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/62
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-08 19:44:31 +00:00
38c35f9bff Convert snake_case class functions to camelCase. (#61)
Convert moodView class functions to camelCase

Closes https://gitea.subcultureofone.org/greg/tkr/issues/34

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/61
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-06 01:07:50 +00:00
6123757c37 Add strict typing to all files that were missing it. (#60)
Shockingly, this didn't require any code changes. But PHP is more forgiving with "strict typing" than I'd expected. I may go back and clean up function declarations later, but that's not urgent.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/60
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-06 00:14:50 +00:00
1337ffa155 Fix build and publish job (#59)
I renamed and repurposed the prerequisites script, but forgot to update the build job accordingly.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/59
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-05 22:21:36 +00:00
086c3e2ebb Make first time setup more robust. (#58)
Split out prerequisite validation from creation. Distinguish system prereqs from application prereqs. Support URL autodetection to eliminate requirement to edit file as part of setup.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/58
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-05 21:48:10 +00:00
e5945e91a3 Add error handling to remaining controllers. (#56)
Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/56
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-05 00:44:27 +00:00
d9d0ed9571 Add error handling for external dependencies. (#55)
Protect functions that interact with databases and filesystems.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/55
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-04 11:46:55 +00:00
51abf33ad1 Optimize initialization logic and simplify error handling. (#54)
Consolidate prerequisite tests - include database migrations.
Remove SetupException and fold database initialization error handling into prereqs.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/54
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-04 01:54:45 +00:00
7816581216 Focus unit tests on business logic and fix log test state pollution (#53)
Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/53
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-04 01:19:45 +00:00
832b7b95fa Remove all static model methods. (#52)
Replace all static model methods. Support dependency injection for all models. Clean up things that used the static model methods. Decouple ConfigModel and CssModel.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/52
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-03 19:15:24 +00:00
dc4f60ce2e refactor-app-initialization (#51)
Separate database migrations from other database initialization functions.
Move some initialization directly into index to keep classes targeted.
Simplify setup validation and redirection logic.
Clean up comments.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/51
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-03 16:04:06 +00:00
2e82f946ae Add TickController tests and logs (#50)
Closes https://gitea.subcultureofone.org/greg/tkr/issues/45

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/50
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-02 20:57:01 +00:00
0b0fd29913 simplify-dependency-injection (#44)
Closes https://gitea.subcultureofone.org/greg/tkr/issues/43

Use a global $app dictionary to manage global state rather than having complex class constructors that expect three input arguments. Update and fix tests. Add tests for Util class functions that broke in the refactor.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/44
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-02 19:52:33 +00:00
9593a43cc0 make-homepage-testable (#42)
Add logging and tests for the homepage and settings page. Make both support dependency injection.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/42
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-02 01:43:48 +00:00
879bd9ff9f Move route logging to router and log missing routes as warnings. 2025-08-01 14:21:28 -04:00
a7e79796fa Add log viewer and tests for the logs and the viewer (#41)
Now that I'm adding more logging, I wanted to add a log viewer so people don't have to ssh to their servers to inspect logs. Also added tests around logging and the viewer.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/41
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-08-01 01:52:45 +00:00
dc0abf8c7c Add debug logging to feeds. Add route info to all debug logs. (#39)
Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/39
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-07-31 13:19:35 +00:00
8b5a249450 Make URL building more resilient and add tests. (#38)
Since the base URL and base path are user inputs, I'd like tkr to be resilient to any combination of leading and trailing slashes so people don't have to worry about that. This adds some helper functions to normalize URLs and adds tests to confirm that all combinations are handled correctly.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/38
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-07-31 02:39:09 +00:00
a9f610fc60 Make home page similar to feeds. Simplify tick retrieval. (#37)
Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/37
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-07-31 01:30:25 +00:00
dc63d70944 Refactor feeds to be more testable and to remove templates. (#36)
Move feed generation into generator classes and out of templates. Remove feed templates, since they don't have any UI elements.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/36
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-07-31 00:05:46 +00:00
bb58e09cbf add-runtime-logging (#35)
Set up logging framework and add runtime logging to foundational operations (database, sessions, auth).

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/35
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-07-29 22:45:17 +00:00
659808f724 Add prereq script to package build. (#32)
Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/32
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-07-28 01:45:39 +00:00
681f64c527 Add prereq check to README. Remove installation by cloning. Fix CI typos. (#31)
Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/31
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-07-28 01:04:46 +00:00
dc44d51479 Add posix_getuid detection to the right place. 2025-07-27 15:33:15 -04:00
3c0f2a2ca5 Skip root test if POSIX PHP extension not installed (e.g. alpine) 2025-07-27 15:14:34 -04:00
64e2ff56da add instructions for setting permissions when CLI is run as root. 2025-07-27 14:50:42 -04:00
fb0b58dcbf Don't recomment curl php extension. 2025-07-27 14:20:32 -04:00
53ed66dce9 Name .yaml files consistently. 2025-07-27 12:48:49 -04:00
b53d58df8c Run prereq check on push to catch PR merge. 2025-07-27 12:45:18 -04:00
6337fa2dfb Add Prerequisite class and cli script to confirm prereqs. (#30)
Add a Prerequisite class to manage all initilaization prerequisites. Invoke before each request. Provide a CLI script to allow checking Prereqs from command line. Add CI  workflow to confirm prereq validation behavior.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/30
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-07-27 16:43:09 +00:00
4255f46fc7 Fix database migrations for first-time setup. (#29)
The database initialization had a number of bugs for the first-time setup. This PR fixes them.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/29
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-07-26 15:46:06 +00:00
edd7f6effe Closes #24 (#27)
Remove all references to `storage/ticks`, including code that migrates those files.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/27
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
2025-07-24 19:53:12 +00:00
3867bc36cf Closes #25 (#26)
Co-authored-by: Greg Sarjeant <1686767+gsarjeant@users.noreply.github.com>
Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/26
2025-07-24 18:49:32 +00:00
b40a4dce18 Remove no-longer-used settings (#23)
Simplifying the app.

The "about" profile field is somewhat redundant. There's already a site title and description.
I'm removing mood emoji from the ticks and just using the user-level mood. That toggle is no longer necessary.

Co-authored-by: Greg Sarjeant <1686767+gsarjeant@users.noreply.github.com>
Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/23
2025-07-24 13:28:47 +00:00
Greg Sarjeant
c7acca6bb3 Fix validation error and bootstrap order of operations issue. 2025-07-23 23:27:02 -04:00
Greg Sarjeant
f5123e5044 Remove backup database. 2025-07-23 22:13:46 -04:00