BlueSphere

BlueSphere

CI Release GitHub Pages License Dependabot Status Snyk Security

Created by Mark Lindon

Frontend (Next.js) β€” Quick Start

cd frontend/ocean-ui
cp .env.local.example .env.local
# edit NEXT_PUBLIC_API_BASE and add a Mapbox token
npm install
npm run dev

Tile Server

cd tileserver
docker build -t tileserver .
mkdir -p tiles && # put your static tiles here
docker run --rm -p 8080:80 -v $PWD/tiles:/usr/share/nginx/html/tiles tileserver
# Visit http://localhost:8080/tiles/{z}/{x}/{y}.mvt

GitHub Actions (Nightly Ingestion)

Project Docs

Smart Auto-Update

Data Freshness Panel

Environmental Mission

BlueSphere is more than data: it’s a climate action enabler.

Vision: Use open ocean data to shape a brighter future and help fix the planet.

Pitch Deck

See assets/pitch/BlueSphere_Pitch.pptx and assets/pitch/BlueSphere_Pitch.pdf for a full presentation deck.

Presentation with Charts

See assets/pitch/BlueSphere_Pitch_WithCharts.pptx for the full deck including charts on SST trends, COβ‚‚, heatwaves, sea level rise, and projections.

PRD Versions

πŸ“‘ Documentation Tracks

πŸ”§ Clean (for developers)

🎀 Pitch-Ready (for stakeholders)

πŸ“ Executive Summary

Repo Map

Repo Map

Business & Vision Docs

Website Content (Descriptors + Copy)

Website (Next.js) β€” Content-Driven

We ship a separate bluesphere-site that renders Markdown pages from /website.

cd frontend/bluesphere-site
npm install
npm run dev  # opens http://localhost:4000

Playwright E2E tests

npm run build && npm start &
npm run test:e2e

CI runs in .github/workflows/ci-node.yml.

Design System & Branding

Stories & Smarter Chatbot

Multi‑Agent Kickoff

Bulk-create GitHub Issues

We provide a JSONL seed and a helper script (requires gh + jq):

./scripts/import_issues.sh Twick1234 BlueSphere

This reads tasks/issues_seed.jsonl and creates labeled issues automatically.

Issue Templates

Pre-configured GitHub issue templates are available under .github/ISSUE_TEMPLATE/:

Pull Request Template

A default PR template is provided under .github/PULL_REQUEST_TEMPLATE/pull_request_template.md. Contributors should fill in description, related issues, type, tests, and checklist.

Code Owners

We define ownership in .github/CODEOWNERS. Adjust usernames/teams so PRs auto-request reviews.

Contributing

See CONTRIBUTING.md for setup, branching, commit style, and PR process.

Contributing

Please read CONTRIBUTING.md for setup, branching, commit style, tests, and PR process. We use issue/PR templates and CODEOWNERS for smooth collaboration.

Governance & Policies

Attribution

Created by Mark Lindon β€” Founder & Lead Author of BlueSphere.

SPDX Licensing

We include SPDX headers in source files for clarity and tooling compatibility. Use the snippet in docs/SPDX_HEADER.txt:

// SPDX-License-Identifier: MIT
// SPDX-FileCopyrightText: 2024–2025 Mark Lindon β€” BlueSphere

Third‑Party Licenses

We include a LICENSES/THIRD_PARTY.md scaffold and scripts to generate detailed lists:

Pre‑commit

Install and enable pre-commit to enforce SPDX headers:

pip install pre-commit
pre-commit install
pre-commit run --all-files

This runs basic hygiene checks and ensures new files include SPDX headers.

Release Compliance

On every GitHub Release (published), CI will generate third‑party license files and attach them to the release:

Automated Releases & Dependencies

Discussions

GitHub Discussions are enabled with categories:

Discussions (Community)

Public Roadmap

See docs/ROADMAP.md. The Roadmap content is also posted to the pinned discussion automatically by scripts/create_pinned_discussions.sh.

Website Deployment (GitHub Pages)

A workflow deploys the static export of the site to GitHub Pages on each push to main:

Backend API (FastAPI)

Ingestion

Map UI

Policies

Branch Protection

Monitoring

Data docs

Modeling

Tiles & Map Layers

Data-Backed Tiles (SST & Currents)

To precompute SST tiles from an ERSST NetCDF:

# Install data libs inside the API image or local env first
pip install -r backend/requirements.txt

# Build SST PNG tiles at zooms 0..2
python ingestion/make_sst_tiles.py /path/to/ersst.v5.YYYYMM.nc 0 2

Generate synthetic currents vector tiles (MVT):

pip install -r backend/requirements.txt
python ingestion/make_currents_mvt.py 0 2

Start API and UI:

docker compose up
cd frontend/ocean-ui && npm install && npm run dev
# Open http://localhost:3000/map

The map loads SST PNG tiles and a VectorGrid overlay that fetches MVT currents.

ERDDAP Adapter

Use ingestion/erddap_adapter.py to pull recent slices from ERDDAP (tabledap/griddap). Set ERDDAP_BASE and dataset/env vars, then call from ingestion pipelines.

Daily Tiles Refresh (CI)

A scheduled workflow (.github/workflows/daily-tiles-refresh.yml) regenerates vector (synthetic) currents and, if ERSST_URL secret is set, builds SST PNG tiles. Optionally commits the refreshed cache to main.

Database (Postgres)

Ingestion β†’ DB

ERDDAP Sample

NDBC Realtime2 Ingestion

We now parse NDBC realtime2 text files (e.g., data/realtime2/41001.txt) extracting WTMP (water temperature, Β°C).
Parser: ingestion/ndbc_parser.py β†’ used by ingestion/ingest_ndbc.py.

End-to-end test

# Start DB + API
docker compose up -d db adminer
pip install -r backend/requirements.txt
python backend/create_tables.py
docker compose up api

# Run NDBC ingestion (example station 41001)
python ingestion/ingest_ndbc.py

# Query observations
curl 'http://localhost:8000/obs?station=41001&limit=5'

Observations API

End-to-end tests (Playwright)

cd tests/e2e
npm install
npx playwright install --with-deps
# Start API and UI in terminals, then:
npm test

CI: Playwright E2E

A GitHub Actions workflow (.github/workflows/ci-e2e.yml) starts the API and UI, waits for readiness, and runs the E2E tests on PRs and main pushes.

Bundle Consistency

A concise overview of what’s in sync lives in docs/CONSISTENCY_REPORT.md.
We also publish it to the site at /consistency via frontend/bluesphere-site/pages/consistency.mdx.

Website Navigation & Styling

Brand

Logos and brand assets are stored in frontend/bluesphere-site/public/brand/.
See docs/BRAND_GUIDE.md for palette, typography, and usage rules.

Dark Mode & Social Previews

Theme Toggle

A Sun/Moon toggle in the site header lets users switch Light / Dark / System themes. See docs/THEME_TOGGLE.md.

About Page

We added an About page with our mission, environmental goals, data sources, and brand story at /about.

Data Sources

We added a Sources page (/sources) and docs/DATA_SOURCES.md describing datasets, cadence, and integration.

Data Sources