Jimoo collects feedback on events: talks, meetings, workshops. An organiser creates an event and gets a 5-character PIN. Attendees enter the PIN, rate the event on six 1–5 scales and can leave a comment. The organiser then sees the averages and every response.
Built with Node.js, Express, EJS and MongoDB (Mongoose). It's a small personal project and learning tool, not a hardened production app; read Security notes before exposing it to a network.
| Sidebar | What | Route |
|---|---|---|
| Give feedback | Enter a PIN, rate the event, optional comment, name and email | GET /?view=feedback&pin=…, POST /feedback |
| Events | Events in a date range (default: this month and next), 20 per page, with PIN, response count and average | GET /?view=events&from=…&to=… |
| (event page) | PIN, details, average per rating, every response | GET /?view=event&id=… |
| New event | Create an event; a unique PIN is generated | POST /admin/events |
| (edit) | Change the details. PIN and existing feedback are kept | POST /admin/events/update |
| (delete) | Soft delete, with a confirm dialog: hidden from lists, PIN stops working | POST /admin/events/delete |
| Setup | Seed four sample events, or purge the collection | POST /admin/setup/seed, POST /admin/setup/purge |
PINs use A–Z and 2–9 without I, O, 0 and 1, so they're easy to read out, and they're unique among live events (enforced by a partial unique index). Attendees can type them in lower case.
Attendees only see an event's name, presenter, location and time: never the organiser's email, the event notes or other people's feedback.
Organiser pages also show a response panel with the HTTP status, highlighted JSON, a copy button and a footer with a request ID (generated by the app, for matching against its logs), duration and timestamp. Forms use post/redirect/get: the result is stored briefly and the browser is 303-redirected to a page that shows it, so refreshing never re-submits.
The badge in the header shows which database you're pointed at and whether the app is connected:
- green / Local: loopback only (
localhost,127.0.0.1,::1) - red / Atlas:
mongodb+srv://or*.mongodb.net, i.e. probably real data - amber / Custom host: anything else
Dark mode follows your OS setting, and the layout works on phones (the sidebar becomes a strip of tabs and tables become stacked cards).
- Node.js 20.19 or later
- A MongoDB server: local install, Docker, or Atlas
git clone https://github.com/ajyounguk/jimoo
cd jimoo
npm install
npm startThen open http://127.0.0.1:3000. Use Setup → Seed data for some sample events.
| Env var | Default | Purpose |
|---|---|---|
MONGODB_URI |
(see below) | Connection string; overrides the config file |
HOST |
127.0.0.1 |
Interface to listen on |
PORT |
3000 |
Port to listen on |
If MongoDB is down at startup, the app keeps running, retries every 5 seconds and returns 503 in the meantime.
Dates and times are entered and shown in the server's local time zone.
The connection string comes from, in order:
- the
MONGODB_URIenvironment variable config/mongo-config.json: copyconfig/mongo-config-sample.jsonand edit"mongourl"("uri"also works). The sample's_helpblock explains each part of the connection string and is ignored by the app- the default,
mongodb://127.0.0.1:27017/jimoo(no auth)
config/mongo-config.json is git-ignored. Keep it that way: it's where the password lives.
Events are stored in the jimoo_events collection of the database named in the connection string, in the same document shape as v1, so existing data still loads.
The simplest option is Docker, bound to loopback only:
docker run -d --name jimoo-mongo -p 127.0.0.1:27017:27017 mongo:8
npm startThe app needs find, insert, update, remove and createIndex on one database. The built-in readWrite role on that database covers all of these; don't use an admin or dbOwner user. In mongosh, as an admin:
use jimoo
db.createUser({
user: "jimoo_user",
pwd: passwordPrompt(),
roles: [{ role: "readWrite", db: "jimoo" }]
}){ "mongourl": "mongodb://jimoo_user:<password>@127.0.0.1:27017/jimoo?authSource=jimoo" }A password in a JSON file is fine for a local setup. For anything real, use Atlas with one of the passwordless options that the MongoDB driver supports in the connection string:
- AWS IAM (
authMechanism=MONGODB-AWS): uses the standard AWS credential provider chain (SSO, profiles, instance or task roles), so there's no long-lived secret in the repo or on disk. - OIDC / workload identity (
authMechanism=MONGODB-OIDC) - X.509 client certificates
- No authentication. Anyone who can reach the app can see every event and its feedback (including attendees' optional names and emails), create, edit and delete events, and purge the whole collection. That's why it binds to
127.0.0.1by default. - Using it at a real event. Attendees need to reach the app from their phones, which means
HOST=0.0.0.0or a reverse proxy, and that exposes the organiser pages too. They share the/URL with the attendee pages (only?view=differs), so a proxy can't easily protect them separately; only the organisers' POSTs live under/admin/. Only do this on a network you trust, for the duration of the event. Separating the two with a login is a known gap. - PINs are not secrets. A PIN only lets someone submit feedback. There's no rate limiting, so with no authentication a determined person could guess PINs or submit lots of feedback.
- CSRF. POSTs are rejected with
403unless theOrigin(or, failing that,Referer) header matches the app's host, so a malicious page can't make your browser delete events. Requests with neither header (e.g.curl) are allowed. The app sendsReferrer-Policy: same-origin; don't change it tono-referrer, or browsers sendOrigin: nulland every form gets a 403. - Output escaping. All data is HTML-escaped in templates, and the JSON highlighter builds DOM nodes with
textContent. A strict Content-Security-Policy (default-src 'self', no inline script or styles) is set as a second layer. - Query injection. Only known fields are taken from form bodies, always as strings; dates, times, ratings, PINs and IDs are validated; URL-encoded bodies are parsed without nested objects; Mongoose
sanitizeFilteris on. - Errors. Error responses show the error name, message and MongoDB code with any
user:password@in URIs masked. The connection string itself is never logged or rendered.
v2 (2026) is a rewrite of the 2018 app. The data format is unchanged, but:
- No shared server state. v1 kept the "current" event in one object shared by every request, so two people using the app at once could see each other's data, and feedback could be saved against whichever event someone else had last opened. Everything now travels in the URL or the form.
- Editing no longer wipes feedback, and edit forms show the event's own date and time (v1 reset them to now).
- Routes changed. Deletes, seed and purge are POSTs with confirm dialogs; the old GET routes (
/event/seed,/event/purge,/admin/event/...) are gone./adminredirects to the event list. - Purge now empties
jimoo_events(v1 dropped a collection calledevents, which the app doesn't use). - Feedback must rate all six areas with a whole number from 1 to 5. Event notes are optional.
- The create flow has no separate confirmation step: creating takes you to the event page with its PIN.
- The event list defaults to this month and next (computed per request, not at server start), and is paginated.
v1 could give two live events the same PIN (its collision check looked at the wrong field), and seeding twice always did. v2 adds a unique index on the PIN of live events; if your data has duplicates, the index can't be built and the app logs index build failed on jimoo_events ... E11000 duplicate key at startup. Everything still works, but PIN uniqueness then relies on a lookup before each insert rather than the database.
To fix it, find the duplicates in mongosh:
db.jimoo_events.aggregate([
{ $match: { "event.deleted": false } },
{ $group: { _id: "$event.pin", n: { $sum: 1 }, ids: { $push: "$_id" } } },
{ $match: { n: { $gt: 1 } } }
])Delete the ones you don't need in the app (or Setup → Purge if it's only old seed data), then restart: the index is built on startup.
npm testUses node:test and supertest. Route tests inject a fake repository; repository tests and an end-to-end test run against a throwaway mongod started by mongodb-memory-server on a random loopback port. The first run downloads a MongoDB binary into node_modules/.cache/mongodb-binaries.
app.js createApp() factory; connects and listens only when run directly
lib/config.js connection string loading, badge description, credential redaction
lib/events.js data access (the only code that talks to Mongoose), PINs, validation
lib/dates.js local date/time parsing and formatting
lib/errors.js maps Mongoose/driver errors to HTTP statuses
lib/run.js runs one operation and packages the result for the response panel
lib/results.js short-lived store for post/redirect/get results
lib/security.js security headers and same-origin check
controllers/ routes: pages, feedback, event admin, setup
models/eventModel.js event + feedback schema, validation and indexes
views/ EJS templates (index.ejs + partials/)
public/ stylesheet, client script, logo
test/ node:test suites
flowchart LR
subgraph Clients["Browsers"]
direction TB
Attendee["Attendee<br/>PIN, feedback"]
Organiser["Organiser<br/>events, setup"]
end
subgraph App["Express app (createApp)"]
direction TB
Sec["security.js<br/>headers + same-origin check"]
Ctrl["controllers/<br/>pages, feedback, admin, setup"]
Run["run.js<br/>result + status mapping"]
Store["results.js<br/>PRG result store"]
Views["views/ (EJS)"]
Repo["events.js<br/>repository, PINs, validation"]
Model["eventModel.js<br/>schema + indexes"]
end
Config["config.js<br/>MONGODB_URI / config file / default"]
Mongo[("MongoDB<br/>jimoo_events")]
Clients -- "HTTP" --> Sec --> Ctrl
Ctrl --> Run --> Repo --> Model --> Mongo
Ctrl --> Store
Ctrl --> Views -- "HTML" --> Clients
Config -. "URI at startup" .-> Mongo
Config -. "badge info" .-> Views
Giving feedback, end to end:
sequenceDiagram
autonumber
actor U as Attendee
participant B as Browser
participant A as Express app
participant R as events.js
participant M as MongoDB
U->>B: Enter PIN
B->>A: GET /?view=feedback&pin=abc23
A->>R: findByPin("abc23")
R->>M: findOne {event.pin: "ABC23", event.deleted: false}
M-->>R: event
R-->>A: name, presenter, location, time only
A-->>B: 200 feedback form (PIN in a hidden field)
U->>B: Pick ratings, click Send feedback
B->>A: POST /feedback (Origin: http://127.0.0.1:3000)
A->>A: Same-origin check
A->>R: addFeedback(pin, form)
R->>R: Validate six ratings (1-5)
R->>M: findOneAndUpdate $push feedback
M-->>R: updated event
A->>A: Store result {status 201, requestId}
A-->>B: 303 See Other, Location: /?view=thanks&result=<id>
B->>A: GET /?view=thanks&result=<id>
A-->>B: 200 "Thanks for your feedback!"
- MongoDB: https://www.mongodb.com/docs/
- Mongoose: https://mongoosejs.com/docs/
- Express: https://expressjs.com/




