Family calendar and contacts service
Go to file
2025-08-19 13:53:35 -04:00
app Integrates ArcGIS for fetching detailed location data; sets up new job to pull locations for missing event locations; sets up Horizon for job monitoring; updates readme a bit; subtle animations and improvements to month view 2025-08-19 13:53:35 -04:00
bootstrap Integrates ArcGIS for fetching detailed location data; sets up new job to pull locations for missing event locations; sets up Horizon for job monitoring; updates readme a bit; subtle animations and improvements to month view 2025-08-19 13:53:35 -04:00
config Integrates ArcGIS for fetching detailed location data; sets up new job to pull locations for missing event locations; sets up Horizon for job monitoring; updates readme a bit; subtle animations and improvements to month view 2025-08-19 13:53:35 -04:00
database Integrates ArcGIS for fetching detailed location data; sets up new job to pull locations for missing event locations; sets up Horizon for job monitoring; updates readme a bit; subtle animations and improvements to month view 2025-08-19 13:53:35 -04:00
docker Adds beginning docker support 2025-07-21 17:26:22 -04:00
public Initial commit with tons of files, but the custom auth plugin isn't working yet 2025-07-17 21:11:23 -04:00
resources Integrates ArcGIS for fetching detailed location data; sets up new job to pull locations for missing event locations; sets up Horizon for job monitoring; updates readme a bit; subtle animations and improvements to month view 2025-08-19 13:53:35 -04:00
routes Adds calendar settings page and handling, adds new calendar subscription functionality, fixes big calendar object for display, improvements to object 2025-08-02 06:52:26 -04:00
storage Initial commit with tons of files, but the custom auth plugin isn't working yet 2025-07-17 21:11:23 -04:00
tests Initial commit with tons of files, but the custom auth plugin isn't working yet 2025-07-17 21:11:23 -04:00
.editorconfig Initial commit with tons of files, but the custom auth plugin isn't working yet 2025-07-17 21:11:23 -04:00
.env.example Integrates ArcGIS for fetching detailed location data; sets up new job to pull locations for missing event locations; sets up Horizon for job monitoring; updates readme a bit; subtle animations and improvements to month view 2025-08-19 13:53:35 -04:00
.gitattributes Initial commit with tons of files, but the custom auth plugin isn't working yet 2025-07-17 21:11:23 -04:00
.gitignore Initial commit with tons of files, but the custom auth plugin isn't working yet 2025-07-17 21:11:23 -04:00
artisan Initial commit with tons of files, but the custom auth plugin isn't working yet 2025-07-17 21:11:23 -04:00
composer.json Integrates ArcGIS for fetching detailed location data; sets up new job to pull locations for missing event locations; sets up Horizon for job monitoring; updates readme a bit; subtle animations and improvements to month view 2025-08-19 13:53:35 -04:00
composer.lock Integrates ArcGIS for fetching detailed location data; sets up new job to pull locations for missing event locations; sets up Horizon for job monitoring; updates readme a bit; subtle animations and improvements to month view 2025-08-19 13:53:35 -04:00
docker-compose.yml Adds beginning docker support 2025-07-21 17:26:22 -04:00
package-lock.json Calender month display fully handled now, modals are working, HTMX added and working, ICS and Subscription handling set up and differentiated, timezone handling to convert from UTC in the database to local finally done 2025-07-29 15:20:53 -04:00
package.json Calender month display fully handled now, modals are working, HTMX added and working, ICS and Subscription handling set up and differentiated, timezone handling to convert from UTC in the database to local finally done 2025-07-29 15:20:53 -04:00
phpunit.xml Initial commit with tons of files, but the custom auth plugin isn't working yet 2025-07-17 21:11:23 -04:00
postcss.config.js Calendar now grabs all events and formatted date ranges for display; calendar view shows mini calendar; more theme and brand updates for better glitz 2025-07-24 12:50:44 -04:00
README.md Integrates ArcGIS for fetching detailed location data; sets up new job to pull locations for missing event locations; sets up Horizon for job monitoring; updates readme a bit; subtle animations and improvements to month view 2025-08-19 13:53:35 -04:00
vite.config.js Initial commit with tons of files, but the custom auth plugin isn't working yet 2025-07-17 21:11:23 -04:00

Kithkin

Contacts and calendars for smart people.

Scheduled jobs

Jobs are located in app/Jobs and we use Laravel Horizon as an admin frontend.

Starting jobs

To start the jobs themselves, run php artisan schedule:work. This creates a running process that outputs job runs and other minimal data.

Production cron

On production, this should be setup via cron job like this:

* * * * * /usr/bin/php /path/to/artisan schedule:run >> /dev/null 2>&1

Monitoring jobs

Horizon is the monitoring app and frontend. Run php artisan horizon to start it. This will create a running process that outputs the results of the jobs in a better format than schedule:work.

The /horizon UI is just a normal route in Kithkin; the php artisan horizon process is what actually runs the workers and updates Redis for the dashboard.

Working with scheduled jobs

To see the list of scheduled jobs and their crons, run php artisan schedule:list.

Application flow notes for my own sanity

Local calendars

Local calendar creation

Creating a local calendar (not available in the UI yet) hits the Calendar.php controller. That store() method creates entries in the calendars, calendarinstances, and calendar_meta tables using model functions for each of them.

Local event creation

When the user creates a new event, it gets added to calendarobjects where the raw VEVENT data is stored. We have our own utility tables event_meta and locations for way more metadata and convenience fields so that we don't need to keep parsing the VEVENT blob.

The controller is EventController.php and it uses models Event.php (calendarobjects), EventMeta.php (event_meta), and Location.php (locations, not yet created).

Remote calendars

Remote calendars are calendars that a user "subscribes" to via .ics URL. These are also called subscription calendars in the app.

Remote calendar creation

The user adds a new remote calendar by entering the url in calendar settings, adding a display name, and picking a color.

When a new remote calendar is added, we create a row in calendarsubscriptions, calendars, and calendarinstances, and a corresponding meta data row in calendar_meta. This is so verbose because of the way SabreDAV handles remote subscriptions.

  • Normally, all Sabre does is add a row to calendarsubscriptions. It doesn't contemplate pulling the events down into the database locally--it assumes you're fetching the .ics file fresh and parsing out events every time the user loads the calendar.

  • Since we want to be able to search everything and do more, we need to pull the events down into our database. This requires creating corresponding rows in the local calendar tables. It's a little weird Sabre-wise since we have remote calendars populating their local calendar tables, but Sabre doesn't care that these are in there and it means the user can also share them out again.

The controller is SubscriptionController.php and it uses the additional model Subscription.php.

Remote events

When a user creates an event in a subscription calendar, we need to send that back up to the primary server. We also create the event locally as normal.