# RSVP capacity review — local source

Save `rsvp-review.mjs` beside this README. Import
`buildRsvpReview(csv, capacity, eventTitle)` in a local JavaScript ES-module
environment. All arguments are strings. The result contains `text`, numeric
`recipients`, `accepted`, `waitlisted`, and an ordered `drafts` array with
row, email, name, status, waitlistPosition, subject and body.

Prepare a comma-delimited export with exactly the unique lowercase `email,name`
headers, in either order, and 1–25 recipient rows. Native Forms exports have
extra columns: manually select and rename these two columns first. Put rows in
the received order you intend to use. The tool does not verify timestamps or
response chronology. It assigns the first capacity rows accepted and the rest
waitlisted, preserving your supplied order. Nothing is silently sorted or
promoted. Quoted commas, escaped quotes and normal CSV record separators work.

Capacity is an explicit decimal integer from 1 to 25, without leading zeroes,
spaces, fractions or signs. Each recipient must have a unique valid email;
case-insensitive duplicates fail before any packet is returned. Event titles,
names and email fields must be single-line literal values. Input bounds and
address rules match the complete browser job and its shared CSV/mail cores.
Unsupported headers, malformed records or an invalid recipient fail the entire
input; no partial accepted list is returned. Check the browser’s stated limits
before entering private response data.

## Runnable fictional example

Save this as `example.mjs` beside the module, then run `node example.mjs`
(Node.js 18 or newer):

```js
import { buildRsvpReview } from './rsvp-review.mjs';
const csv = 'email,name\nalex@example.test,Alex\nsam@example.test,Sam';
const result = buildRsvpReview(csv, '1', 'Fictional workshop');
if (result.recipients !== 2 || result.accepted !== 1 || result.waitlisted !== 1) {
  throw new Error('Unexpected capacity allocation');
}
if (result.drafts[0].status !== 'accepted' || result.drafts[1].status !== 'waitlist') {
  throw new Error('Unexpected received-order allocation');
}
console.log(`Recipients: ${result.recipients}; accepted: ${result.accepted}; waitlisted: ${result.waitlisted}`);
// result.text is the complete review packet. Review every draft manually.
```

Expected exact output:

```text
Recipients: 2; accepted: 1; waitlisted: 1
```

## Manual finish and privacy

Manual Sheet row ordering and individual Gmail messages are the alternative.
Verify consent, source completeness, duplicates, received order, event details
and capacity policy. Review each recipient, subject and body before copying
into your normal mail workflow. Send yourself through your usual account; keep
your actual delivery record. Waitlisted people need a later manual decision if
places become available. This initial packet does not send, reserve seats,
confirm attendance, promote waitlisted people or validate a business niche.

The pure module has no network, filesystem, secret access, storage, telemetry,
Google connection or sending. Your surrounding app or agent controls logging
and transmission; choose a suitable local environment for private responses.
Source retrieval, local execution, useful independent completion, normal repeat
use and paid delivery are separate evidence. This fictional example is QA.

## License

MIT License

Copyright (c) 2026 QuasiLife

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
