A web application that tracks and displays encounters with cats in the Ballard neighborhood of Seattle. When you meet 3 cats in a single day, it's considered a "Cat Trick" - similar to a hat trick in hockey! π
In the charming Seattle neighborhood of Ballard, friendly cats often approach for a greeting. This project began as a simple way to track these encounters using a Google Sheet and has evolved into a web application that celebrates our feline friends.
- Cat Encounter Tracking: Records daily cat meetings with photos and statistics
- Cat Leaderboard: Shows the most frequently encountered cats
- Daily Statistics: Displays cat encounters by date and frequency
- Cat Trick Detection: Highlights rare days when 3+ cats are met
- Responsive Design: Modern interface that works on all devices
- Frontend: Astro with React components
- Styling: Custom CSS with modern responsive design
- Data Source: Google Sheets via Google Apps Script API
- Deployment: Netlify with automated builds
- Automation: Zapier integration for real-time updates
The application uses a hybrid approach combining static site generation with dynamic data:
- Data Collection: Cat encounters are logged via Google Forms
- Data Processing: Google Apps Script processes the sheet data into JSON
- Build Trigger: Zapier monitors form submissions and triggers Netlify builds
- Static Generation: Astro generates a fast, static site with the latest data
- Deployment: Netlify serves the optimized static site
- Total cat encounters
- Encounters by date
- Monthly/yearly breakdowns
- Cat trick frequency analysis
- Individual cat photos and names
- Encounter frequency rankings
- Meeting history timeline
- Mobile-first approach
- Optimized images with lazy loading
- Fast loading times with static generation
- Node.js (v18 or higher)
- npm or pnpm
# Clone the repository
git clone https://github.com/yourusername/cat-trick.git
cd cat-trick
# Install dependencies
npm install# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run previewcat-trick/
βββ src/
β βββ components/ # Astro and React components
β β βββ CatLeaderboard.astro
β β βββ CatStats.astro
β β βββ CatWrapper.astro
β β βββ ...
β βββ layouts/ # Page layouts
β βββ pages/ # Route pages
β βββ assets/ # Cat images and media
β βββ styles/ # Global styles
βββ public/ # Static assets
βββ astro.config.mjs # Astro configuration
βββ package.json
The project uses a Google Apps Script to serve cat data as JSON:
- Set up a Google Form for cat encounter logging
- Configure Google Apps Script with the provided code
- Deploy as a web app with public access
- Update the data source URL in your Astro components
- Connect your repository to Netlify
- Set build command:
npm run build - Set publish directory:
dist - Configure environment variables if needed
- Create a Zapier trigger for Google Form submissions
- Set up a Netlify build webhook action
- Enable automatic builds on new cat encounters
- Cat Images: Add new cat photos to
src/assets/ - Styling: Modify
src/styles/global.cssfor visual changes - Components: Extend functionality by editing Astro components
- Data Processing: Customize statistics in
CatStats.astro
- Static site generation for fast loading
- Optimized images with proper sizing
- Minimal JavaScript bundle
- CDN delivery via Netlify
This project is licensed under the MIT License - see the LICENSE file for details.
- All the friendly cats of Ballard who make this project possible
- The Astro team for creating an amazing framework
- The open-source community for inspiration and tools πΎ_