Build Log #1 - Serversinc x Github
April 14, 2025
š ļø What I Worked On
This past weekendās efforts were focused on adding GitHub integrations to ServerSinc. By the end of the first day (it being a 3-day weekend), I had the following shipped:
š GitHub Signup
Nothing too fancy hereāLaravel Socialite handles most of the heavy lifting, and I simply store the GitHub user ID in the database.
Iāll likely phase out email signups soon. It removes the need for a separate flow to connect a GitHub account later, especially if a user decides to create an application from a repository. Which leads me to...
šļø Create an Application from a GitHub Repository
This feature required updates across several parts of the codebase.
The UI for creating an application now includes a new option: āBuild from GitHub Repository.ā
Once selected, users are taken to a new page where they can:
- Choose a GitHub repository
- Select a branch (fetched live using Livewire once a repo is selected)
After the application is created, a job is dispatched to the queue to install a GitHub webhook. This hook points to the ServerSinc API and triggers a rebuild whenever new code is pushed.
The whole kit and kaboodle took less than a morning to integrate using Laravel and GitHubās API. Copilot chipped in here and there, but since Iād built a similar flow in a previous version of ServerSinc, most of it came straight from memory.
š Deployments and Deployment History
While the natural next step mightāve been handling incoming webhooks to trigger builds, I decided instead to focus on the Deployments tab under each Application.
This now shows:
- A list of deployments
- The ability to trigger a new deployment
The table is powered by Livewire and automatically updates with new deployments using Livewireās poll
attribute.
š§ Building a Github Repo
This is a big one, with lots of moving parts behind the scenes. Iāll be writing a separate deep-dive article on how this job works and what it actually does under the hood.
ā Wins
- GitHub OAuth integration
- Created deployments tab with history
- GitHub repository hooks connected to ServerSinc
- Triggering builds via
BuildNewGithubApp
ā ļø Challenges
- Switching context between two repos in two different languagesāLaravel (for the dashboard) and Node.js (Tugboat). I still occasionally forget syntax š
š” What I Learned
Donāt over-engineer everything.
In v1 of ServerSinc, I went all inācustom build servers, private Docker registries, the works.
This time, Iām sticking to the mantra:
āWhatās the simplest way to make this work?ā
Then iterate from there.
š Next Up
- Finish the
BuildNewGithubApp
job - Add webhook listener to trigger rebuilds from pushes