No description
  • Svelte 46.9%
  • JavaScript 21.3%
  • TypeScript 15.1%
  • CSS 11.3%
  • Dockerfile 3.3%
  • Other 2.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
CrazedDog 99cba6489a
Some checks failed
Deploy to VPS / build-database (push) Failing after 11m36s
Deploy to VPS / build-web (push) Has been skipped
Deploy to VPS / build-worker (push) Has been skipped
Deploy to VPS / deploy (push) Has been skipped
clean up
2026-04-16 10:25:36 +01:00
.github/workflows clean up 2026-04-16 10:08:32 +01:00
.vscode feat: docker setup, pools comp, styling fixes 2024-11-04 08:15:29 +00:00
apps clean up 2026-04-16 10:19:14 +01:00
packages/database clean up 2026-04-16 10:25:36 +01:00
sql Remove unused weekly tides SQL table and related functions; update pool cleaning dates SQL file with new entries; adjust max days ahead in page server load function; enhance styling for text color in Pools component. 2025-07-07 11:20:21 +01:00
.dockerignore refactor app 2026-04-16 09:21:00 +01:00
.env.example clean up 2026-04-16 10:11:01 +01:00
.gitignore refactor app 2026-04-16 09:21:00 +01:00
.mcp.json refactor app 2026-04-16 09:21:00 +01:00
.npmrc remove font-awesom and replace with Icons component which has the SVGs from font-awsome 2024-11-11 22:15:30 +00:00
CLAUDE.md rebrand to GYSLabs 2026-03-12 13:40:01 +00:00
docker-compose.prod.yml clean up 2026-04-16 10:19:14 +01:00
docker-compose.yml clean up 2026-04-16 10:19:14 +01:00
Dockerfile fix build 2026-01-17 13:46:20 +00:00
package-lock.json clean up 2026-04-16 10:08:32 +01:00
package.json clean up 2026-04-16 10:08:32 +01:00
pnpm-lock.yaml feat: Add playwrite and get seat temp from new source 2024-11-25 07:06:10 +00:00
README.md refactor app 2026-04-16 09:21:00 +01:00

Guernsey Tides App (seas.gg)

A SvelteKit application that displays tides, weather, sea temperatures, and pool cleaning schedules for Guernsey.

Architecture

This is a monorepo with npm workspaces containing:

  • apps/web - SvelteKit frontend application
  • apps/tide-scraper - Standalone service that scrapes tide data
  • apps/sea-temp-scraper - Standalone service that scrapes sea temperature (uses Playwright)
  • apps/weather-service - Standalone service that fetches weather from Open-Meteo
  • packages/database - Shared database package with Drizzle ORM

Development Setup

1. Install dependencies

npm install

2. Set up environment variables

cp .env.example .env
# Edit .env and add your scraping URLs

Required environment variables:

  • DATABASE_URL - PostgreSQL connection string (default: postgresql://dev:devpass@localhost:5432/tides)
  • TIDE_URL - URL to scrape tide data from
  • SEA_TEMP_URL - URL to scrape sea temperature from

3. Start development environment

npm run dev

This will:

  1. Start PostgreSQL in Docker (docker-compose.db.yml)
  2. Wait for database to be ready
  3. Start all Node services with hot reload:
    • Tide scraper (port: node process)
    • Sea temperature scraper (port: node process)
    • Weather service (port: node process)
    • Web app (port 5173)

Each service runs as a separate Node process with tsx watch for hot reloading. Services are color-coded in the terminal output.

Individual Service Commands

# Database only (Docker)
npm run db:dev

# Individual services
npm run tide:dev        # Tide scraper
npm run sea-dev:dev     # Sea temperature scraper
npm run weather:dev     # Weather service
npm run web:dev         # Web app only

Database Setup

The database schema is managed by Drizzle ORM. To set up the database:

# Start the database
npm run db:dev

# Push schema changes (development only)
npm run db:migrate

# View database with Drizzle Studio
npm run db:studio

Production

For production deployment, use the full Docker Compose:

docker compose up -d

This runs all services in Docker containers.

Project Structure

seas-gg/
├── apps/
│   ├── web/                 # SvelteKit web app
│   ├── tide-scraper/        # Tide scraping service
│   ├── sea-temp-scraper/    # Sea temperature scraping service
│   └── weather-service/     # Weather fetching service
├── packages/
│   └── database/            # Shared Drizzle ORM package
├── docker-compose.db.yml    # Dev: PostgreSQL only
├── docker-compose.yml       # Prod: All services
└── package.json             # Workspace root

Environment Variable Reference

Variable Default Description
DATABASE_URL postgresql://dev:devpass@localhost:5432/tides PostgreSQL connection
TIDE_URL - URL to scrape tide data
SEA_TEMP_URL - URL to scrape sea temperature
TIDE_SCRAPER_INTERVAL_MINUTES 60 How often to scrape tides
SEA_TEMP_SCRAPER_INTERVAL_MINUTES 30 How often to scrape sea temp
WEATHER_SERVICE_INTERVAL_MINUTES 15 How often to fetch weather
TIDE_SCRAPER_DAYS_AHEAD 30 Days of tide data to fetch
WEATHER_SERVICE_DAYS_AHEAD 7 Days of weather to fetch