Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
e0b8fbc
Node init
vertrox78 Nov 12, 2025
ff72c8d
Basic Crawling of STAC Index API
Mammutor Nov 12, 2025
30530da
feat: every object in the stac index, will be converted to an dynamic…
Mammutor Nov 12, 2025
eb0c8fd
added crawling to collection level, including nested catalogs
vertrox78 Nov 18, 2025
69b9ebb
Closes #55; added crawling to collection level, including nested cata…
vertrox78 Nov 18, 2025
65c6cad
Merge branch 'dev-crawler' of https://github.com/SpatioCore/STAC-Atla…
vertrox78 Nov 18, 2025
eaea3e0
feat: implement database connection with node pg for catalog management
LennKru Nov 19, 2025
62ab362
Merge remote-tracking branch 'origin/dev-crawler' into dev-crawler-Lenn
LennKru Nov 19, 2025
dda02f2
closes #53, set up docker for the crawler component
vertrox78 Nov 19, 2025
b3e289f
fixes #55, restructured the crawler component into catalog and api cr…
vertrox78 Nov 19, 2025
4be5bc8
feat: add dotenv for environment variable management and improved dat…
LennKru Nov 19, 2025
427b299
Merge remote-tracking branch 'origin/dev-crawler' into dev-crawler-Lenn
LennKru Nov 19, 2025
cc32162
deleted .env
LennKru Nov 19, 2025
88f4bcc
updated crawling with use uf stac-js
vertrox78 Nov 19, 2025
e15fcae
feat: basic api crawling
Mammutor Nov 20, 2025
fa5fdae
implements #76, stac api validation for catalog crawling
vertrox78 Nov 24, 2025
b611ef4
fix: updated crawler project to be ESM compliant
Mammutor Nov 24, 2025
9fc2900
refactor: improve catalog handling in crawler by restructuring catalo…
Mammutor Nov 25, 2025
ad9a440
feat: enhance database operations:
LennKru Nov 25, 2025
d0691ba
fix: adjust API crawling limit to include all found APIs instead of t…
Mammutor Nov 25, 2025
3c37635
updated pghost
LennKru Nov 26, 2025
f1f3e7b
feat: changed database connection configuration and add insertStacExt…
LennKru Nov 26, 2025
54a231c
removed the api valication #76
vertrox78 Nov 26, 2025
41a346c
Merge branch 'dev-crawler' of https://github.com/SpatioCore/STAC-Atla…
vertrox78 Nov 26, 2025
c9852fe
feat: implement helper functions for inserting STAC extensions, summ…
LennKru Nov 26, 2025
babb97d
Merge branch 'dev-crawler' into dev-crawler-Lenn
Mammutor Nov 26, 2025
239b5aa
feat: enhance crawler configuration with CLI and environment variable…
vertrox78 Nov 26, 2025
5826775
Merge pull request #156 from SpatioCore/dev-crawler-Lenn
Mammutor Nov 26, 2025
218a409
Merge branch 'dev-crawler' into dev-crawler-jakob
Mammutor Nov 26, 2025
b0825c6
Merge pull request #158 from SpatioCore/dev-crawler-jakob
Mammutor Nov 26, 2025
2c58b9c
Merge remote-tracking branch 'origin/dev' into dev-crawler
Mammutor Nov 26, 2025
4b818c7
feat: functions to save crawled catalogs, collections and apis in the…
LennKru Nov 27, 2025
6c47638
#154, refactored the crawler to use crawlee Framework, improved perfo…
vertrox78 Nov 28, 2025
fdb0cad
#53,example environment configuration file for database and crawler s…
vertrox78 Nov 28, 2025
14a6013
converted to es modules, added --no-db mode for debugging and moved c…
vertrox78 Dec 3, 2025
7b7e969
Update .env.example
vertrox78 Dec 3, 2025
72c4f40
Merge pull request #163 from SpatioCore/dev-crawler-jakob
Mammutor Dec 3, 2025
9c01cd8
Merge branch 'dev-crawler' into dev-crawler-Lenn
LennKru Dec 3, 2025
f1f3250
Merge pull request #166 from SpatioCore/dev-crawler-Lenn
Mammutor Dec 3, 2025
86aaacd
Refactor database interactions by moving db helper to utils and imple…
Mammutor Dec 3, 2025
4ac00b0
Merge pull request #168 from SpatioCore/dev-crawler-humam-fixDB
LennKru Dec 3, 2025
166ff8b
#176, fixed logic for max apis, fixed double db init
vertrox78 Dec 3, 2025
a7411ff
#167, fixed logic for max apis, fixed double db init
vertrox78 Dec 3, 2025
c997896
#153, refactor: update API crawling logic to use Crawlee and enhance …
vertrox78 Dec 3, 2025
67a027a
Merge branch 'dev-crawler-jakob' of https://github.com/SpatioCore/STA…
vertrox78 Dec 3, 2025
4103394
Update .gitignore and enhance catalog/collection database handling
LennKru Dec 3, 2025
6429285
psst
vertrox78 Dec 3, 2025
0b47037
Merge pull request #169 from SpatioCore/dev-crawler-jakob
Mammutor Dec 3, 2025
b82b180
Update .gitignore and enhance catalog/collection database handling
LennKru Dec 3, 2025
5f8f03e
Merge branch 'dev-crawler-Lenn' of github.com:SpatioCore/STAC-Atlas i…
Mammutor Dec 3, 2025
29e155d
Merge pull request #171 from SpatioCore/dev-crawler-Lenn
Mammutor Dec 3, 2025
5f017a9
Scheduling and time logic for recrawling (#190)
vertrox78 Dec 10, 2025
eb6d088
fix: time utility was missing and improved main module check logic (#…
Mammutor Jan 1, 2026
1e335db
A quick cleanup and fix for the crawler to work for docker (#210)
Mammutor Jan 7, 2026
24f6cb5
bug fix: extent was written wrong (#212)
LennKru Jan 7, 2026
cc60a7c
refactor(api): simplify collections link handling in STAC API root fu…
Mammutor Jan 8, 2026
08b398d
chore(crawler): comment out restart policy in docker-compose.yml
Mammutor Jan 8, 2026
e095d0a
fix(crawler): update .env.example and normalize base URL handling
Mammutor Jan 8, 2026
e0b2543
chore(db): update docker-compose.yml for network configuration
Mammutor Jan 11, 2026
d140405
feat(crawler): implement collection flushing to database
Mammutor Jan 11, 2026
81bd246
feat(crawler): enhance concurrency and storage configuration for craw…
Mammutor Jan 13, 2026
a5a3b78
Merge pull request #219 from SpatioCore/dev-crawler-humam
vertrox78 Jan 14, 2026
3ba13a9
feat(crawler): implement max depth configuration and batch flushing f…
Mammutor Jan 14, 2026
dea62a7
Merge branch 'dev-crawler' into dev-crawler-humam
Mammutor Jan 14, 2026
44b986a
Crawler: implemented rate limiting, and implements some bug fixes (#211)
vertrox78 Jan 14, 2026
664aaa8
Merge branch 'dev-crawler' into dev-crawler-humam
Mammutor Jan 14, 2026
62d7cc7
Merge pull request #238 from SpatioCore/dev-crawler-humam
vertrox78 Jan 14, 2026
2782266
Merge branch 'dev' into dev-crawler
Mammutor Jan 14, 2026
df81112
merge from dev to dev-crawler-humam and now to dev-crawler (#243)
Mammutor Jan 15, 2026
27507ed
Refactor: crawler configuration and memory management
Mammutor Jan 15, 2026
e5f6e33
Crawler added source_url to collection_summaries and changed stac_id,…
LennKru Jan 15, 2026
7c28bdc
Merge branch 'dev-crawler' into dev-crawler-humam
Mammutor Jan 16, 2026
c5b2e8f
Enhance memory management in API and handlers
Mammutor Jan 16, 2026
9a26ae0
Refactor database operations in insertOrUpdateCollection and insertSu…
Mammutor Jan 18, 2026
700f840
Merge branch 'dev' into dev-crawler
RobinGummels Jan 19, 2026
8e9d504
Delete .env.example in root
Mammutor Jan 19, 2026
fde14d7
Merge pull request #251 from SpatioCore/Mammutor-patch-2
vertrox78 Jan 19, 2026
77018aa
Merge pull request #250 from SpatioCore/dev-crawler-humam
vertrox78 Jan 19, 2026
70004cb
fix(crawler-db): Enhance collection extent handling in insertOrUpdate…
Mammutor Jan 20, 2026
f53d2e7
fix(crawler-api): update STAC object creation to disable URL migration
Mammutor Jan 20, 2026
23be843
fix(crawler-api): add defensive JSON validation in API and catalog ha…
Mammutor Jan 20, 2026
3ab484c
chore(crawler): update Node.js version in Dockerfile to 20-alpine
Mammutor Jan 20, 2026
c8aec56
fix(crawler): enhance JSON parsing in API and catalog request handlers
Mammutor Jan 20, 2026
392b0e9
fix(crawler): add S3 URL handling and relative URL conversion in API …
Mammutor Jan 20, 2026
5ee15b6
fix(crawler): update Dockerfile to omit development dependencies duri…
Mammutor Jan 20, 2026
ef3c498
feat(crawler): implement parallel crawling for APIs and catalogs
Mammutor Jan 21, 2026
14ff676
fix(crawler): enhance normalization of collection metadata extraction
Mammutor Jan 21, 2026
7357089
fix(crawler): enhance normalization of collection to include addition…
Mammutor Jan 21, 2026
c48840c
fix(crawler): increase max concurrency for improved throughput in API…
Mammutor Jan 21, 2026
657bd0a
fix(crawler): optimize concurrency settings for API and catalog crawlers
Mammutor Jan 21, 2026
edbf614
refactor(crawler): streamline concurrency settings in API and catalog…
Mammutor Jan 21, 2026
9cd68c6
fix(crawler): correct spatial extent format in database insertion
Mammutor Jan 21, 2026
e140246
feat(crawler): add deadlock handling and retry logic for database col…
Mammutor Jan 21, 2026
9fe7298
refactor(crawler): optimize batch sizes and memory management for low…
Mammutor Jan 21, 2026
048183d
Merge pull request #254 from SpatioCore/dev-crawler-humam
vertrox78 Jan 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea/
5 changes: 5 additions & 0 deletions crawler/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
npm-debug.log
.git
.gitignore
*.md
22 changes: 22 additions & 0 deletions crawler/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# STAC Crawler Configuration
# Copy this file to .env and adjust values as needed

# URI of the Postgres/PostGis Host
PGHOST=example_db_URL
# Postgres/PostGis Port
PGPORT=5432
# Postgres/PostGis user
PGUSER=example_user
# Postgres/PostGis password
PGPASSWORD=example_password
# Postgres/PostGis databse
PGDATABASE=example_db

# 'catalogs', 'apis', or 'both'
CRAWL_MODE=both
# Maximum Static Catalogs that are crawled (0 ist unlimited)
MAX_CATALOGS=0
# Maximum API Catalogs that are crawled (0 ist unlimited)
MAX_APIS=0
# Timeout of connection of crawler
TIMEOUT_MS=30000
3 changes: 3 additions & 0 deletions crawler/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
storage
.env
17 changes: 17 additions & 0 deletions crawler/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Use official Node.js LTS image
FROM node:20-alpine

# Set working directory
WORKDIR /app

# Copy package files
COPY package*.json ./

# Install dependencies
RUN npm install --omit=dev

# Copy application files
COPY . .

# Run the crawler
CMD ["node", "index.js"]
156 changes: 156 additions & 0 deletions crawler/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
# STAC Crawler

A Node.js crawler for STAC Index API that fetches and processes catalog and collection data with configurable options.

## Configuration

The crawler can be configured using environment variables, CLI arguments, or a combination of both. CLI arguments take precedence over environment variables.

### Configuration Options

| Option | CLI Flag | Environment Variable | Default | Description |
|--------|----------|---------------------|---------|-------------|
| Mode | `-m, --mode` | `CRAWL_MODE` | `both` | Crawl mode: `catalogs`, `apis`, or `both` |
| Max Catalogs | `-c, --max-catalogs` | `MAX_CATALOGS` | `10` | Maximum number of catalogs to process |
| Max APIs | `-a, --max-apis` | `MAX_APIS` | `5` | Maximum number of APIs to process |
| Timeout | `-t, --timeout` | `TIMEOUT_MS` | `30000` | Timeout per operation in milliseconds |
| Max Depth | `-d, --max-depth` | `MAX_DEPTH` | `3` | Maximum recursion depth for nested catalogs |

### Using Environment Variables

1. Copy the example environment file:
```bash
cp .env.example .env
```

2. Edit `.env` to customize settings:
```bash
CRAWL_MODE=both
MAX_CATALOGS=20
MAX_APIS=10
TIMEOUT_MS=60000
MAX_DEPTH=5
```

3. Run the crawler:
```bash
npm start
```

### Using CLI Arguments

Run the crawler with command-line arguments to override defaults or environment variables:

```bash
# Crawl only catalogs with custom limits
node index.js --mode catalogs --max-catalogs 20

# Crawl only APIs with extended timeout
node index.js -m apis -a 10 -t 60000

# Crawl both with all custom settings
node index.js -m both -c 50 -a 20 -t 45000 -d 5
```

### Show Help

Display all available options:

```bash
node index.js --help
```

## Running Locally

```bash
# Install dependencies
npm install

# Run with default configuration
npm start

# Run with custom configuration
node index.js --mode catalogs --max-catalogs 15
```

## Docker

### Build and run with Docker

```bash
# Build the image
docker build -t stac-crawler .

# Run with default configuration
docker run --rm stac-crawler

# Run with environment variables
docker run --rm -e CRAWL_MODE=apis -e MAX_APIS=10 stac-crawler

# Run with CLI arguments
docker run --rm stac-crawler --mode catalogs --max-catalogs 20
```

Or use npm scripts:

```bash
npm run docker:build
npm run docker:run
```

### Using Docker Compose

Create a `.env` file or modify `docker-compose.yml` to set environment variables:

```bash
# Start the crawler
docker-compose up -d

# View logs
docker-compose logs -f

# Stop the crawler
docker-compose down
```

Or use npm scripts:

```bash
npm run docker:compose:up
npm run docker:compose:down
```

## Examples

### Example 1: Quick API Test
Crawl only the first 3 APIs with a short timeout:
```bash
node index.js -m apis -a 3 -t 15000
```

### Example 2: Deep Catalog Exploration
Crawl 100 catalogs with maximum depth and extended timeout:
```bash
node index.js -m catalogs -c 100 -d 10 -t 120000
```

### Example 3: Balanced Crawl
Crawl both catalogs and APIs with moderate settings:
```bash
node index.js -m both -c 25 -a 15 -t 45000 -d 4
```

### Example 4: Production Environment
Set up `.env` for production:
```bash
CRAWL_MODE=both
MAX_CATALOGS=1000
MAX_APIS=500
TIMEOUT_MS=60000
MAX_DEPTH=5
```

Then run:
```bash
npm start
```
Loading
Loading