A modern expense tracking application built with Bun.
To install dependencies:
bun installTo build the frontend:
cd frontend && bun run buildTo run the application:
bun run startThis project uses GitHub Actions for continuous integration and deployment to Google Cloud Run. To set up the CI/CD pipeline:
-
Create a Google Cloud Service Account with the following roles:
- Cloud Run Admin
- Storage Admin
- Artifact Registry Writer
- Service Account User
-
Configure Workload Identity Federation in Google Cloud:
- Go to IAM & Admin > Workload Identity Federation
- Create a new provider for GitHub Actions
- Configure it with your GitHub repository
-
Add the following secrets to your GitHub repository:
WORKLOAD_IDENTITY_PROVIDER: Your Workload Identity Provider- Format:
projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/providers/PROVIDER_ID
- Format:
SERVICE_ACCOUNT: Your Google Cloud Service Account email- Format:
service-account-name@project-id.iam.gserviceaccount.com
- Format:
-
Create the Artifact Registry repository in Google Cloud:
gcloud artifacts repositories create expense-tracker \ --repository-format=docker \ --location=australia-southeast1 \ --description="Expense Tracker Docker repository" -
Push to the main branch to trigger the deployment pipeline.
The application's build process is streamlined:
-
Local Development: Build the frontend with
cd frontend && bun run buildfor local testing -
CI/CD Pipeline:
- The GitHub Actions workflow builds and pushes the Docker image
- The Dockerfile handles building the frontend during the Docker build process
- No redundant build steps occur in the GitHub Actions workflow itself
-
Server: The Hono server uses
serveStaticto serve the frontend assets from the dist directory.
This application is containerized with Docker and deployed to Google Cloud Run. The CI/CD pipeline builds a platform-specific image (linux/amd64) to ensure compatibility with Cloud Run infrastructure.
This project was created using bun init in bun v1.2.14. Bun is a fast all-in-one JavaScript runtime.