This project is not covered by Drupal’s security advisory policy.

Space Calendar API integrates NASA's DONKI (Space Weather Database Of Notifications, Knowledge,
Information) API into Drupal through a CMS-configurable paragraph type. No API credentials are ever
hardcoded -- everything is managed through a standard Drupal admin settings form. Designed for
headless Drupal sites running a Next.js frontend, the module also exposes two lightweight JSON
endpoints that the frontend uses to fetch API configuration and resolve path aliases to node types
and UUIDs.

Features

- Adds a Space Calendar paragraph type that editors attach to calendar event nodes
- Admin settings form at /admin/config/services/space-calendar to configure the API base URL, API
key, and cache duration -- no code changes needed to swap providers
- /api/space-calendar/config endpoint serves API credentials and cache settings to a decoupled
frontend
- /api/resolve-path endpoint resolves Drupal path aliases to node type and UUID, enabling Next.js
ISR routing
- CORS headers included on both endpoints for cross-origin frontend requests
- DEMO_KEY supported out of the box for testing without a NASA account

Post-Installation

After enabling the module, go to Administration > Configuration > Web services > Space Calendar API
Settings (/admin/config/services/space-calendar) and enter:

1. API Base URL -- for NASA DONKI: https://api.nasa.gov/DONKI/
2. API Key -- use DEMO_KEY to test (30 requests/hour limit) or get a free key at api.nasa.gov
3. Cache duration -- how long your Next.js frontend caches responses via ISR (default: 3600 seconds)

The Space Calendar paragraph type will automatically appear on any calendar_event content type node.
Attach it from the node edit form and the configured API will power the display.

Additional Requirements

- Drupal 10 or 11
- Paragraphs module
- Entity Reference Revisions module
- A calendar_event content type must exist on your site
- A NASA DONKI API key (free at api.nasa.gov) or use DEMO_KEY for testing

This module is purpose-built for headless Drupal with a Next.js frontend. The JSON endpoints follow
Drupal's standard JSON response patterns and require no additional libraries on the Drupal side.

Similar projects

Unlike JSON:API or Decoupled Router, Space Calendar API is narrowly scoped: it provides one
paragraph type for a specific NASA data integration and two thin endpoints optimized for a Next.js
ISR setup. It is not a general-purpose decoupling solution.

Project information

  • Created by guardadostoic on , updated
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.

Releases