{"id":28956846,"url":"https://github.com/developmentseed/eoapi-devseed","last_synced_at":"2025-06-23T21:41:01.858Z","repository":{"id":240687722,"uuid":"801949155","full_name":"developmentseed/eoapi-devseed","owner":"developmentseed","description":"Custom eoAPI framework example for DevelopmentSeed","archived":false,"fork":false,"pushed_at":"2025-03-26T06:27:25.000Z","size":328,"stargazers_count":8,"open_issues_count":8,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-26T07:29:13.015Z","etag":null,"topics":["eoapi"],"latest_commit_sha":null,"homepage":"https://eoapi.dev/customization/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/developmentseed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-17T08:21:35.000Z","updated_at":"2025-03-25T07:40:09.000Z","dependencies_parsed_at":"2024-05-23T08:51:28.627Z","dependency_job_id":"1b1b541a-7ac2-429e-bbcb-c8ecf13b5eb2","html_url":"https://github.com/developmentseed/eoapi-devseed","commit_stats":null,"previous_names":["developmentseed/eoapi-devseed"],"tags_count":0,"template":false,"template_full_name":"developmentseed/eoapi-template","purl":"pkg:github/developmentseed/eoapi-devseed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developmentseed%2Feoapi-devseed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developmentseed%2Feoapi-devseed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developmentseed%2Feoapi-devseed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developmentseed%2Feoapi-devseed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/developmentseed","download_url":"https://codeload.github.com/developmentseed/eoapi-devseed/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developmentseed%2Feoapi-devseed/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261561185,"owners_count":23177545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eoapi"],"created_at":"2025-06-23T21:41:01.099Z","updated_at":"2025-06-23T21:41:01.839Z","avatar_url":"https://github.com/developmentseed.png","language":"HTML","readme":"\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"500\" alt=\"eoapi-devseed\" src=\"https://github.com/developmentseed/eoapi-devseed/assets/10407788/fc69e5ae-4ab7-491f-8c20-6b9e1372b4c6\"\u003e\n  \u003cp align=\"center\"\u003eExample of eoAPI customization.\u003c/p\u003e\n\u003c/p\u003e\n\n---\n\n**Documentation**: \u003ca href=\"https://eoapi.dev/customization/\" target=\"_blank\"\u003ehttps://eoapi.dev/customization/\u003c/a\u003e\n\n**Source Code**: \u003ca href=\"https://github.com/developmentseed/eoapi-devseed\" target=\"_blank\"\u003ehttps://github.com/developmentseed/eoapi-devseed\u003c/a\u003e\n\n---\n\nThis repository shows an example of how users can customize and deploy their own version of eoAPI starting from [eoapi-template](https://github.com/developmentseed/eoapi-template).\n\n## Custom\n\n### Runtimes\n\n#### eoapi.stac\n\nBuilt on [stac-fastapi.pgstac](https://github.com/stac-utils/stac-fastapi-pgstac) application,\n\n#### Features\n\n- **`TiTilerExtension`**\n\n  When the `EOAPI_STAC_TITILER_ENDPOINT` environment variable is set (pointing to the `raster` application) and `titiler` extension is enabled, additional endpoints will be added to the stac-fastapi application (see: [stac/extension.py](https://github.com/developmentseed/eoapi-devseed/blob/main/runtimes/eoapi/stac/eoapi/stac/extension.py)):\n\n  - `/collections/{collectionId}/items/{itemId}/tilejson.json`: Return the `raster` tilejson for an item\n  - `/collections/{collectionId}/items/{itemId}/viewer`: Redirect to the `raster` viewer\n\n- a simple **`Search Viewer`** (`/index.html`)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"800\" alt=\"stac-search\" src=\"https://github.com/user-attachments/assets/d08b8b3c-ac3f-421c-ba5c-f6a9eae02964\"\u003e\n\u003c/p\u003e\n\n- **HTML** response output\n\n  When receiving `Accept: text/html` headers or `f=html` query parameter the application will return HTML response\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"800\" alt=\"stac-search\" src=\"https://github.com/user-attachments/assets/8790182b-ae60-4262-89ae-9dda518b1846\"\u003e\n\u003c/p\u003e\n\n- **GeoJSON-Seq** / **csv** response output\n\n  As for the HTML output, the `/search` and `/items` endpoint can return `new line` delimited GeoJSON or CSV when specifically requested by the user with `Accept: application/geo+json-seq|text/csv`  headers or `f=geojsonseq|csv` query parameter.\n\n  ```\n  curl https://stac.eoapi.dev/search\\?limit\\=1 --header \"Accept: text/csv\"\n\n  itemId,collectionId,gsd,quadkey,datetime,...\n  11_031311120101_103001010C12B000,WildFires-LosAngeles-Jan-2025,...\n  ```\n\n#### eoapi.raster\n\nThe dynamic tiler deployed within `eoapi-devseed` is built on top of [titiler-pgstac](https://github.com/stac-utils/titiler-pgstac) and [pgstac](https://github.com/stac-utils/pgstac). It enables large-scale mosaic based on the results of STAC search queries.\n\nThe service includes all the default endpoints from **titiler-pgstac** application and:\n\n- `/`: a custom landing page with links to the different endpoints\n- `/searches/builder`: a virtual mosaic builder UI that helps create and register STAC Search queries\n- `/collections`: a secret (not in OpenAPI documentation) endpoint used in the mosaic-builder page\n- `/collections/{collection_id}/items/{item_id}/viewer`: a simple STAC Item viewer\n\n#### eoapi.vector\n\nOGC Features and Tiles API built on top of [tipg](https://github.com/developmentseed/tipg).\n\nThe API will look for tables in the database's `public` schema by default. We've also added three functions that connect to the pgSTAC schema:\n\n- **pg_temp.pgstac_collections_view**: Simple function which returns PgSTAC Collections\n- **pg_temp.pgstac_hash**: Return features for a specific `searchId` (hash)\n- **pg_temp.pgstac_hash_count**: Return the number of items per geometry for a specific `searchId` (hash)\n\n### Infrastructure\n\nThe CDK code is almost similar to the one found in [eoapi-template](https://github.com/developmentseed/eoapi-template). We just added some configurations for our custom runtimes.\n\n### Local testing\n\nBefore deploying the application on the cloud, you can start by exploring it with a local *Docker* deployment\n\n```\ndocker compose up --watch\n```\n\nOnce the applications are *up*, you'll need to add STAC **Collections** and **Items** to the PgSTAC database. If you don't have, you can use the follow the [MAXAR open data demo](https://github.com/vincentsarago/MAXAR_opendata_to_pgstac) (or get inspired by the other [demos](https://github.com/developmentseed/eoAPI/tree/main/demo)).\n\nThen you can start exploring your dataset with:\n\n- the STAC Metadata service [http://localhost:8081](http://localhost:8081)\n- the Raster service [http://localhost:8082](http://localhost:8082)\n- the browser UI [http://localhost:8085](http://localhost:8085)\n\nIf you've added a vector dataset to the `public` schema in the Postgres database, they will be available through the **Vector** service at [http://localhost:8083](http://localhost:8083).\n\n## Deployment\n\n### Requirements\n\n- python \u003e=3.9\n- docker\n- node \u003e=14\n- AWS credentials environment variables configured to point to an account.\n- **Optional** a `config.yaml` file to override the default deployment settings defined in `config.py`.\n\n### Installation\n\nInstall python dependencies with\n\n```\nuv sync --group deploy\n```\n\n\u003e [!NOTE]\n\u003e [install `uv`](https://docs.astral.sh/uv/getting-started/installation/#installing-uv)\n\nAnd node dependencies with\n\n```\nuv run npm install\n```\n\nVerify that the `cdk` CLI is available. Since `aws-cdk` is installed as a local dependency, you can use the `npx` node package runner tool, that comes with `npm`.\n\n```\nuv run npx cdk --version\n```\n\nFirst, synthesize the app\n\n```\nuv run npx cdk synth --all\n```\n\nThen, deploy\n\n```\nuv run npx cdk deploy --all --require-approval never\n```\n\n## Loading new collections/items\n\n### Copy collection from another STAC API\n\nOne workflow for adding collections and items is to clone the metadata from another STAC API.\nYou can do this with the following workflow:\n\n1. Set pgstac database credentials\n\n- for docker network:\n\n```bash\nexport PGUSER=username\nexport PGPASSWORD=password\nexport PGHOST=localhost\nexport PGPORT=5439\nexport PGDATABASE=postgis\n```\n\n- for AWS deployment\n\n```bash\nAWS_REGION=us-west-2 source scripts/get-pgstac-creds.sh $EOAPI_PGSTAC_SECRET_ARN\n```\n\n\u003e [!NOTE]\n\u003e this will load the secret from AWS and set the Postgres environment variables\n\n2. Run the `load` script pointed at an external API and collection:\n\n```bash\nuv sync --group load\nuv run scripts/load --stac-api https://stac.earthgenome.org --collection-id sentinel2-temporal-mosaics\n```\n\nThis can be helpful for loading collections and items into your local docker network!\n\n```bash\nexport PGUSER=username\nexport PGPASSWORD=password\nexport PGHOST=localhost\nexport PGPORT=5439\nexport PGDATABASE=postgis\nuv run scripts/load --stac-api https://stac.eoapi.dev --collection-id MAXAR_Maui_Hawaii_fires_Aug_23 --force\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevelopmentseed%2Feoapi-devseed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevelopmentseed%2Feoapi-devseed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevelopmentseed%2Feoapi-devseed/lists"}