No description
- Svelte 50.9%
- TypeScript 39.8%
- CSS 4.3%
- JavaScript 2.4%
- Dockerfile 2%
- Other 0.6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github/workflows | ||
| src | ||
| static | ||
| .dockerignore | ||
| .gitignore | ||
| .npmrc | ||
| docker-compose.yml | ||
| Dockerfile | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.js | ||
| README.md | ||
| svelte.config.js | ||
| tailwind.config.js | ||
| tsconfig.json | ||
| vite.config.ts | ||
🐴 Hoovesin - Stables or Paddock?
A weather-based decision helper for horse care in Guernsey. This SvelteKit application helps decide whether horses should stay in the paddock overnight or be brought into the stables based on weather forecasts.
Features
- Smart Recommendations: Automatically recommends "STABLES TONIGHT" if rain is expected or "PADDOCK OK" for clear conditions
- Wind Warnings: Alerts when wind gusts exceed 50km/h
- Hourly Breakdown: Detailed hour-by-hour forecast from 6pm to 7am
- Weather Stats: Total rain, peak wind speed, and peak gusts
- Caching: Weather data cached for 30 minutes to reduce API calls
- Mobile-First Design: Dark mode UI optimized for viewing at dusk/dawn
Tech Stack
- Framework: SvelteKit with TypeScript
- Styling: Tailwind CSS v4
- Database: SQLite with Drizzle ORM
- Weather Data: Open-Meteo API (free, no key required)
- Deployment: Docker with Traefik integration
Development
Prerequisites
- Node.js 22+
- npm
Setup
# Install dependencies
npm install
# Run development server
npm run dev
Visit http://localhost:5173 to view the app.
Build
npm run build
npm run preview
Docker Deployment
Build and Run
docker compose up -d
The app will be available on port 3000 with a SQLite database persisted in ./data.
Environment Variables
NODE_ENV: Set toproductionfor production buildsPORT: Server port (default: 3000)
API Endpoints
GET /api/weather
Returns the current weather recommendation.
Query Parameters:
refresh=true: Force refresh (bypasses cache, limited to once every 5 minutes)
Response:
{
"recommendation": "stables" | "paddock",
"rainPredicted": boolean,
"totalRainMm": number,
"peakWindSpeed": number,
"peakWindGust": number,
"windWarning": boolean,
"rainHours": ["6pm", "7pm", ...],
"hourly": [...],
"fetchedAt": "ISO timestamp",
"cached": boolean
}
Recommendation Logic
- STABLES: If ANY rain is predicted overnight (>0.1mm in any hour)
- PADDOCK OK: If no rain is expected
- Wind Warning: Added when gusts exceed 50km/h
Location
Configured for Guernsey (Channel Islands):
- Latitude: 49.4657
- Longitude: -2.5853
- Overnight window: 6pm - 7am
GitHub Actions Deployment
The repository includes a GitHub Actions workflow (.github/workflows/deploy.yml) that:
- Builds the Docker image on GitHub Actions
- Pushes to GitHub Container Registry (ghcr.io)
- SSHs into VPS and pulls the new image
Required Secrets
Set these in your GitHub repository settings:
VPS: Your VPS IP or hostnameVPS_USERNAME: SSH usernameVPS_SSH_KEY: Private SSH key for deploymentVPS_SSH_PASSPHRASE: SSH key passphrase (if applicable)VPS_SSH_PORT: SSH port (usually 22)
VPS Setup
- Create directory:
mkdir -p ~/docker-apps/hoovesin - Copy
docker-compose.ymlto~/docker-apps/hoovesin/ - Create data directory:
mkdir -p ~/docker-apps/hoovesin/data - Ensure Docker and Docker Compose are installed
- Configure Traefik reverse proxy on your network
- Run initial deployment:
docker compose up -d
License
MIT