A WordPress plugin for Spacebring API integration
  • PHP 87%
  • Hack 7.4%
  • TypeScript 4.1%
  • JavaScript 1.2%
  • CSS 0.3%
Find a file
2026-02-11 14:36:41 +10:00
assets Add calendar functionality with event handling and tab navigation 2026-02-11 14:13:58 +10:00
src Add Services class and implement Events registration 2026-02-11 14:14:39 +10:00
templates Improve layout of Events shortcode template with centralized styling 2026-02-11 14:36:26 +10:00
.gitignore init commit 2026-02-11 11:16:43 +10:00
changelog.txt init commit 2026-02-11 11:16:43 +10:00
composer.json Fix autoload path for Templates and update PHP requirement in composer.json 2026-02-11 14:13:47 +10:00
LICENSE Add LICENSE file and update README with development setup instructions 2026-02-11 11:25:29 +10:00
package-lock.json Add FullCalendar dependencies to package.json and package-lock.json 2026-02-11 14:13:43 +10:00
package.json Add FullCalendar dependencies to package.json and package-lock.json 2026-02-11 14:13:43 +10:00
README.md Update README.md to reflect changes in frontend build process and add shortcode documentation for events 2026-02-11 14:14:48 +10:00
spacebring.php Bump version to 1.1.1 in plugin header 2026-02-11 14:36:41 +10:00
tsconfig.json init commit 2026-02-11 11:16:43 +10:00
vite.config.js Add input entry for events script in Vite configuration 2026-02-11 14:13:54 +10:00

Spacebring for WordPress

A modern WordPress plugin to integrate Spacebring with WordPress, enabling data sync, admin tooling, and frontend rendering using a modern JS stack.

🚀 Overview

Spacebring for WordPress is a plugin designed to connect a WordPress site with the Spacebring platform. The goal is to allow WordPress to act as a management and presentation layer for Spacebring data.

Planned features include:

  • 🔐 Authenticate WordPress with the Spacebring API
  • 🔄 Sync Spacebring resources into WordPress (as custom post types)
  • 🧩 Admin dashboard for managing Spacebring settings and sync status
  • 🌐 Frontend rendering of Spacebring data (blocks/shortcodes)
  • ⚡ Modern frontend tooling (Vite + Tailwind + TypeScript)

⚠️ Status: This project currently provides the plugin foundation and architecture. The actual Spacebring API integration and sync features are still in progress.

🧱 Architecture

This plugin is built with a modern WordPress architecture:

  • PHP (OOP, namespaced)
    • Modular service classes (Admin, Ajax, PostTypes, etc.)
    • Composer autoloading
  • Frontend Tooling
    • Vite
    • Tailwind CSS
    • TypeScript

This structure is intended to support rich admin interfaces and frontend components.

📁 Project Structure

spacebring/
├── spacebring.php        # Main plugin bootstrap file
├── src/
│   ├── Plugin.php        # Core plugin loader
│   ├── Admin.php         # Admin UI (settings, pages)
│   ├── Ajax.php          # AJAX endpoints
│   └── PostTypes.php     # Custom post types for synced data
├── assets/               # Frontend source (TS, Tailwind, etc.)
├── vite.config.js        # Frontend build config
├── composer.json        # PHP dependencies & autoloading
└── package.json         # Frontend dependencies

⚙️ Requirements

  • WordPress 6.x+
  • PHP 8.0+
  • Node.js 18+ (for frontend build)
  • Composer

🛠️ Development Setup

  1. Install PHP dependencies
composer install
  1. Install frontend dependencies
npm install
  1. Build frontend assets
npm run dev
# or
npm run build
  1. Activate the plugin
  • Zip the plugin folder or symlink it into your WordPress wp-content/plugins directory.
  • Activate Spacebring for WordPress from the WP admin panel.

🧪 Current Status

Implemented:

  • ✅ WordPress plugin bootstrapping
  • ✅ Modular service architecture
  • ✅ Modern frontend build system (Vite + Tailwind + TS)
  • ✅ Basic CPT syncing with spacebring API
  • ✅ Basic Cached Sync + Live Fetch for events
  • ✅ Template overriding for frontend

Not yet implemented:

  • ❌ Webhooks / scheduled sync
  • ❌ Cached Sync + Live Fetch for feeds
  • ❌ Support for multiple locations
  • ❌ Template version control in settings

Shortcodes

Events

Use the [spacebring_events] shortcode to display upcoming Spacebring events anywhere on your site (posts, pages, or templates).

[spacebring_events]

Shortcode Attributes

You can customize the shortcode using the following attributes:

limit (number)

Controls how many upcoming events to display.

[spacebring_events]

Default: 5

assets (boolean)

Controls whether the plugin loads its JavaScript and CSS assets (Tailwind, calendar, view toggle, etc.).

[spacebring_events assets="true"]

Disable assets if you are manually enqueueing them elsewhere:

[spacebring_events assets="false"]

Default: true

Template Override (Advanced)

You can override the default markup by copying the template into your theme:

your-theme/spacebring/shortcodes/events.php

This allows you to fully customize the layout and styling of the events list and calendar views.

Notes

  • Events are cached for performance and refreshed automatically.
  • Dates are displayed using your WordPress site’s date format.
  • Clicking an event opens the full Spacebring event page in a new tab.

🤝 Contributing

This project is in early development. Contributions and ideas are welcome. If you’re extending this plugin, consider keeping the modular service structure intact.

📄 License

MIT