ExtantApe

payload plugin events

by ExtantApe
Other
v3
^3.80.0
MIT

Overview

Summary generated from the README

Adds events and event dates collections to Payload, where an event can be one-time, reusable or recurring. Repeat rules are built from plain choices and computed in each event's timezone. Admin tools cover a duplicate check, splitting and merging events, and ICS endpoints. Requires Payload 3.80 or later, React 19 and Node 22 or later; near-me search needs a geocode function you supply.

Features

  • One-time, reusable and recurring events with generated dates for the next 12 months
  • Repeat rules evaluated in the event's own timezone, keeping local times across daylight saving
  • Near-me and drop-off date searches by distance using your own geocode function
  • Duplicate check matching similar names, organizers, websites or venues, with remembered dismissals
  • Split dates into new events or merge events, with a plan shown first and redirects from old slugs
  • ICS endpoints for a recurring event with its rule or a single date

Use cases

  • Publish recurring meetups whose dates are generated from a rule and stay at the same local time
  • Let visitors find upcoming events near them by distance
  • Clean up duplicate event listings by merging them into one reusable event

From the author

Events for Payload: events and their dates, with repeat rules in the event's timezone, near-me search, appearances, merge and split, and calendar files.

Installation

npm i @extantape/payload-plugin-events

0

Stars

0

Forks

0

Open Issues

1 weeks ago

Last Updated

167

Weekly Downloads

v0.2.1

npm Version

116.9 KB

Unpacked Size

1

Dependencies

GitHub stars

00 since Nov 8

Show data
GitHub stars by day (UTC)
DateStars
Dec 6, 20260
Dec 5, 20260
Dec 4, 20260
Dec 3, 20260
Dec 2, 20260
Dec 1, 20260
Nov 30, 20260
Nov 29, 20260
Nov 28, 20260
Nov 27, 20260
Nov 26, 20260
Nov 25, 20260
Nov 24, 20260
Nov 23, 20260
Nov 22, 20260
Nov 21, 20260
Nov 20, 20260
Nov 19, 20260
Nov 18, 20260
Nov 17, 20260
Nov 16, 20260
Nov 15, 20260
Nov 14, 20260
Nov 13, 20260
Nov 12, 20260
Nov 11, 20260
Nov 10, 20260
Nov 9, 20260
Nov 8, 20260
npm weekly downloads

196+196 since Nov 11

Show data
npm weekly downloads by day (UTC)
DateWeekly downloads
Dec 6, 2026196
Dec 5, 2026392
Dec 4, 2026564
Dec 3, 2026596
Dec 2, 2026613
Dec 1, 2026620
Nov 30, 2026651
Nov 29, 2026718
Nov 28, 2026531
Nov 27, 2026364
Nov 26, 2026337
Nov 25, 2026313
Nov 24, 2026284
Nov 23, 2026248
Nov 22, 2026317
Nov 21, 2026287
Nov 20, 2026275
Nov 19, 2026243
Nov 18, 2026224
Nov 17, 2026196
Nov 16, 2026181
Nov 15, 20260
Nov 14, 2026703
Nov 13, 2026638
Nov 12, 20260
Nov 11, 20260

Each point is npm's rolling 7-day download count.

Health Score

74/100Good

Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.

Badge for your README

Payload Directory health badge
Markdown
[![Payload Directory](https://payloaddirectory.dev/badge/1451951315-root.svg)](https://payloaddirectory.dev/plugins/1451951315-root)
HTML
<a href="https://payloaddirectory.dev/plugins/1451951315-root"><img src="https://payloaddirectory.dev/badge/1451951315-root.svg" alt="Payload Directory"></a>
Updated Nov 29, 2026Created Nov 9, 2026Published Nov 26, 2026

README

payload-plugin-events

Events for Payload: events and their dates, with repeat rules in each event's own timezone, near-me search, appearances and drop-off, a duplicate check, merge and split, and calendar files.

Status: early, 0.x. The core passes 36 tests against a real Payload 3.92 and MongoDB with made-up events. The admin screens (live rule preview, the duplicate check, Arrange dates, organizer suggestions) were tried in a browser on a local copy of a real site with made-up events, with axe finding nothing in them. It isn't in use on any site yet.

What it does

  • Events and dates. An event is what people know by name. Its dates are what they search. An event is one-time (one date), reusable (dates added as announced) or recurring (dates made from a rule).
  • Repeat rules. You build them from plain choices: every n days, weeks, months or years; which weekdays; a day of the month or the nth weekday; a start time in 15-minute steps; ending never, on a date, or after a number of times. They're worked out in the event's timezone, so a 7 pm meeting stays at 7 pm across daylight saving.
    • Recurring events get dates for the next 12 months. Run topUpRecurring nightly to keep that topped up.
    • Changing the rule redoes only future dates that nobody edited. Past, hand-made, edited and protected dates are never touched.
  • Appearances (optional): a date can say "we'll be there", and only those dates take drop-offs. New dates of reusable and recurring events start ticked unless the event says otherwise.
  • Locations. Your geocode function turns a venue into a map point. nearbyDates and dropOffDates search by distance, and drop-off defaults to 150 miles and 2 weeks to 4 months ahead.
  • Duplicates. findSimilar matches a similar name, the same organizer or website, or the same venue within a day, and returns the question to ask. "Not a duplicate" is remembered.
  • Merge and split. arrangeDates splits dates into new events. mergeEvents folds events into one reusable event; their old addresses lead to it, through eventBySlug.
    • Both show a plan first, run in one transaction as the signed-in person, and refuse a protected date.
  • Calendar files. GET /api/events/:id/ics gives a recurring event as one entry with its rule, so calendars repeat it. GET /api/event-dates/:id/ics gives one date.

Not built here: the site's own pages, and anything about kits or orders. A site protects dates it depends on through protectDate.

On its own, and with others

On its own: Events needs only Payload. Give it a geocode function if you want near-me and drop-off searches, and a protectDate check if anything on your site depends on a date.

Needs: Payload ^3.80.0, @payloadcms/ui ^3.80.0 and React ^19.0.0 as peer dependencies. No other EXTANT APE plugin is required.

Works with:

  • Sample Kits: your site maps Events' dropOffDates onto Sample Kits' adapters.events.dropOffChoices, so buyers can hand kits in at an event, and protectDate can protect a date that has kits booked, as in Use. Events knows nothing about kits.

It doesn't need any other plugin, and nothing here is specific to one.

Color Theory: no direct link. Its duplicate check in the admin uses Payload's --theme-* colors, so it follows Color Theory's admin colors when its applyToAdmin option is on.

Family: Events has no family on purpose: it's meant to work with any plugin. The families are a working draft, and Fulfillment is due to be split.

Install

npm install @extantape/payload-plugin-events

Needs Payload 3.80 or later, React 19 and Node 22 or later.

Use

import { events } from '@extantape/payload-plugin-events'

events({
  copyToDates: ['tenant'],
  defaultTimezone: 'America/Phoenix',
  appearances: { label: 'We’ll be there' },
  geocode: async ({ venue }) => lookUpPostalCode(venue.postalCode),
  protectDate: async ({ date }) => ((await ordersFor(date.id)) ? 'Kits are booked for this date.' : null),
  access: { write: ({ req }) => isStaff(req.user) },
})
  • Who reads what. Visitors and signed-in people read published events and their dates. Drafts are for those access.write lets in, and only where it lets them (a write rule that returns a query limits draft reads the same way). Pass access.read to replace this.
  • Who writes. See Access.
  • Copied fields (copyToDates) always come from the event: a value sent with a date is replaced, on create, on every edit and when the date moves to another event. So a date can't claim another site.

Access

access.write is a Payload Access function. It decides who creates, edits and deletes events, who reads drafts, and who uses the admin endpoints (rule preview, duplicate check, "not a duplicate", Arrange dates, merge). It can answer three ways:

AnswerMeans
trueAny event
A query, such as { tenant: { in: [...] } }Only events inside it. The endpoints load every event a request names through the query, and answer 404 if one is outside it, so a curator of one site can't arrange, merge or mark events of another, and a merge that mixes sites is refused whole
Anything elseNo. That includes false, 1, 'yes', an empty {} (it would match every event), an array, and an error thrown or rejected. An error is a 403 (401 if nobody is signed in), never a 500

With no access.write, only users of your admin collection (admin.user in your Payload config, usually users) can write. Accounts from any other auth collection, such as site members, are refused.

Changed 2026-11-11 (unreleased): the default used to let any signed-in account write, members of other auth collections included, and the endpoints took any truthy answer from access.write as a yes. Sites relying on the old default must pass the option, for example access: { write: ({ req }) => Boolean(req.user) }.

Commands

npm test          # Vitest, in-memory MongoDB
npm run typecheck
npm run build

License

MIT

Similar plugins