# Project plan — filmspace (Everyspace)

Evidence date: 2026-10-15.

Source repository: `git@bitbucket.org:overdrive/filmspace.git`.

Inspected revision: `main` at `f19c1dc` (2024-11-14 06:54:10 +0200, "first commit"). Parent commit `ce3afce` (2024-11-14, "Initial commit"). The scan-host path `~/projects/sonar_scan/repos/filmspace` was not on this machine. The tree was read from a clone of that git revision. Committed secrets are named in the security section and are not reproduced.

This plan describes what the repository contains. It does not decide what the product should become.

## Product

The repository is a Meteor 2.4 and React marketplace for booking spaces in South Africa. Guests search for a space, message the host, and pay a booking request. Hosts list a space, accept or decline requests, and receive a payout after platform fees.

Two product names are in active use:

| Name | Where |
|---|---|
| filmspace | Repository, npm package `filmspace-meteor_react`, Meteor Galaxy hostname in `deploy.bat`, several deploy commands in `README.md`, booking reference prefix `FS`, object bucket `filmspace-assets`, ActiveCampaign host `filmspace.api-us1.com` |
| Everyspace / everyspace | Landing page, contact meta description, PM2 app name, Docker image tag in the README, email sender `Everyspace <hello@everyspace.co.za>`, SMS copy, `pm2.json` `ROOT_URL` `https://everyspace.co.za/` |

Provenance: **Implemented** strings. The README still titles deploy steps as Filmspace and also documents an Everyspace Docker image. **Unknown / Requires Confirmation:** which name is the current public brand, and whether `filmspace.co.za`, `filmspace.codeswop.com`, and `everyspace.co.za` are all still live.

The landing page (`imports/ui/pages/general/EveryspaceLandingPage.tsx`) tells guests to discover spaces, book, then meet, create, or celebrate. It tells hosts to list for free, accept bookings, and receive payouts. One host sentence claims "fuss-free R1 000 000 liability insurance". No insurance policy, premium, or claim workflow exists in the application code. Provenance of the sentence: **Documented** UI copy. Insurance as a system feature: **Unknown / Requires Confirmation**.

## Branch reality

| Line | Tip | Date | What it is |
|---|---|---|---|
| `main` (default; `origin/HEAD`) | `f19c1dc` | 2024-11-14 | Current tree. Message: "first commit" |
| parent of `main` | `ce3afce` | 2024-11-14 | "Initial commit" |

No other branches were inspected. The README describes development and deploy notes dated June 2022 and an upgrade plan dated January–March 2021. Those notes are older than both git commits. Provenance of the notes: **Documented** in `README.md`. Provenance of the missing earlier history: **Unknown** — the history looks squashed into two commits on the same day.

## Scope that is in the repository

In scope of the code that runs:

- Public marketing home, legal page, and contact page.
- Accounts: email and password, Google, Facebook, email verification, mobile verification, password reset, ban flag.
- Host listing wizard, listing review, search, and listing detail.
- Guest favourites, host and guest dashboards, messages, booking requests, Peach Payments pre-authorisation, capture, reversal, and refund.
- Reviews, VAT receipts, invoices, and a booking-agreement PDF.
- Admin screens for users, listings, bookings, category forms, space tags, and locations.
- Email (Meteor mail / Gmail SMTP in settings), SMS (Twilio), ActiveCampaign, Intercom, Google Tag Manager, Facebook page view, Google Maps.
- A Mongo-backed job queue for booking timeouts, reminders, calendar cleanup, and message notifications.

Present in the tree and not the running product, or only partly wired:

- `src/` plus `gulpfile.babel.js` and `config.yml`: a ZURB Foundation static-site pipeline. The Meteor client imports `/dist/assets/css/app.css`. Whether anyone still builds that CSS with gulp is **Unknown / Requires Confirmation**.
- `chart/`: a GitLab auto-deploy Helm chart. `postgresql.enabled` is false. The app uses MongoDB. Postgres instance and worker templates are in the chart and are not referenced by application code.
- `imports/api/ServerRender/server` is commented out in `server/main.js`.
- Routes `/testing` and `/dev-test` mount development pages with no role check.
- `tests/main.js` asserts the package name and that client and server flags differ. It does not exercise bookings, search, or payments.

## Architecture

One Meteor application.

| Piece | Role |
|---|---|
| `client/main.js` | Client entry. Loads API client modules and compiled CSS |
| `server/main.js` | Server entry. Loads API server modules |
| `imports/api/*` | Collections, methods, publications, jobs, integrations |
| `imports/routes/*` | Flow Router routes |
| `imports/ui/*` | React pages, layouts, and components |
| MongoDB | Users, listings, bookings, messages, reviews, job queue, counters |
| Object storage | Listing images, watermarked versions, and generated PDFs in bucket `filmspace-assets` |
| Peach Payments (OPPWA) | Card pre-authorisation, capture, reversal, refund. Currency ZAR |
| Job queue | `job_queue` collection, `node-cron` at 08:00, plus `Meteor.setTimeout` for due jobs |

Deployment evidence points at three different targets. See Discrepancies.

## Major components

1. **Identity.** `accounts-password`, `accounts-google`, `accounts-facebook`, `alanning:roles`. Roles in code: `admin` (global), `host` (global), `editor` (scoped to a listing id).
2. **Listings.** Wizard under `/listing`, status `inactive` → `in-review` → `active`, search limited to `status: "active"` and `published: true`.
3. **Bookings and money.** Pre-booking document, Peach pre-authorisation, then a `bookings` document. Host has three days to accept. Accept captures the payment. Decline or timeout reverses it.
4. **Messaging.** Threads tied to a listing. Hosts can set a custom rate on a thread. That rate replaces the tier price when a booking is created from the thread.
5. **Admin.** `/admin/*` requires the global `admin` role.
6. **Notifications.** Email templates under `private/email-templates/`, Twilio SMS, Intercom events, ActiveCampaign contact fields.

## Milestones visible in the README

The README section "Upgrades Jan 2021" lists six weeks of user stories. Those lines are a historical plan, not a tracker with status fields.

| Week (as written) | Stories |
|---|---|
| 10–15 Feb | US-5 Filepull overhaul / download image |
| 16–22 Feb | US-2 Spaces tags |
| 23 Feb–3 Mar | US-3 Search page mapping — CPT, JHB, DRB, GR |
| 4–8 Mar | US-4 Back-end user content override |
| 9–11 Mar | US-11 Host and filmmaker message notifications, US-8 Zero service fees |
| 12–15 Mar | US-7 Keep all comms on Filmspace, US-6 Minimum hours tooltip, US-10 Listing process remove items, US-9 User feedback modal, US-12 Intercom chatbot |

What the current tree shows for those stories is recorded in `features.md`. The README does not say they were all finished.

## Implementation plan

There is no separate project plan, backlog, or milestone file in the repository. The only forward-looking text is the README upgrade list and the deploy notes.

GitLab CI (`.gitlab-ci.yml`) builds a Docker image, publishes `app.tar.gz`, deploys staging on the default branch, and deploys production only when a person starts that job. The staging URL pattern is `http://filmspace-staging.$KUBE_INGRESS_BASE_DOMAIN`. The production URL pattern is `http://filmspace.$KUBE_INGRESS_BASE_DOMAIN`.

## Known dependencies

Runtime (from `package.json` and `.meteor/packages`):

- Meteor 2.4, Node image `node:14.18.1-alpine` in the Dockerfile, React 16, Flow Router (`ostrio:flow-router-extra`).
- MongoDB. Local restore command in the README uses port 3001 and database `meteor`.
- Foundation Sites, jQuery, lodash, moment, SimpleSchema, sharp, puppeteer, Twilio, ActiveCampaign client, Intercom client, AWS SDK, Peach Payments over HTTPS.

Dev notes in the README say developers install dependencies on Node 12.13.0 and run gulp on Node 10.16.0, and the first line says "node version: 10.x". The Docker file uses Node 14.18.1 and comments that this matches Meteor 1.11.1, while `.meteor/release` is `METEOR@2.4`. Provenance: **Documented** versus **Implemented**. Which Node version production uses is **Unknown / Requires Confirmation**.

## Current project status

| Item | Evidence | Status |
|---|---|---|
| Application code | `main` at `f19c1dc` | **Implemented** in git |
| Production deploy target | README SCP/PM2, `deploy.bat` Galaxy, `.gitlab-ci.yml` Kubernetes | **Requires Confirmation** which path is current |
| Automated tests | `tests/main.js` only | Smoke assertions only |
| Silicon Ark docs before this change | No `filmspace/` directory | This set is the first |

## Security notes (values omitted)

Live credentials are committed in more than one file. This document does not copy them. They should be treated as exposed and rotated. Files:

- `settings.json`, `dev.settings.json`, `pm2.json`, the Docker `docker run` example in `README.md` (Mongo, mail, ActiveCampaign, object-storage keys).
- `chart/values.yaml` (`application.mongo_url`).
- `imports/api/PeachPayments/server/services/PeachPaymentsService.js` (live OPPWA token and entity id; sandbox values are commented above them).
- `imports/api/Users/server/init/authentication_services.js` (Google and Facebook app secrets).
- `imports/api/Users/server/methods/users.js` (`recaptchaVerify` secret).
- `imports/api/Users/server/init/sms.js` (Twilio account sid, token, and sending number).
- `imports/api/Admin/server/init/create_admin.js` creates three admin users with the password `admin` when those emails do not already exist.
- `server/main.js` contains a commented SMTP URL and a call that would send a reset email for a hard-coded user id. The block is commented out.

`dev.settings.json` sets `public.DISABLE_RECAPTCHA` to `1`.

## Discrepancies

1. **Filmspace and Everyspace** are both used as the product name. Requires confirmation of the public name and live domains.
2. **Three deploy paths:** Meteor Galaxy (`deploy.bat`), SSH plus PM2 (`README.md`, `pm2.json`), GitLab Kubernetes (`.gitlab-ci.yml`, `chart/`). Requires confirmation of the path that production uses.
3. **Object storage naming.** Environment variables are `DO_ACCESS_KEY` / `DO_SECRET` and a DigitalOcean endpoint is commented out in `digital-ocean-spaces-client.js`. The S3 client sets `region: 'af-south-1'` and uploads to bucket `filmspace-assets`. A client comment mentions `filmspace-assets.fra1.cdn.digitaloceanspaces.com`. Requires confirmation of the live bucket provider.
4. **Node and Meteor versions** disagree across README, Dockerfile comments, and `.meteor/release`.
5. **Helm chart** includes Postgres templates. Postgres is disabled. The application database is MongoDB.
6. **Host listing status events** in `listing.status.set` log `host_deactivated_listing` when status becomes `active`, and `host_requested_publish` when status becomes `inactive`. That pairing looks reversed. Requires confirmation before anyone treats those Intercom events as accurate.
7. **Chat SMS preference** `settings.send_chat_messages_to_cellphone` is applied to the daily unread summary job only. The 5-minute and follow-up thread notifications do not read that flag.
8. **README history versus git history.** Upgrade notes from 2021 and 2022 sit in a repository whose only commits are from 2024-11-14.

## Human confirmation

- Which brand and which hostnames are live.
- Which deploy path is production, and whether Galaxy, PM2, and the GitLab cluster are all still used.
- Whether the committed credential files are still valid, and that they will be rotated.
- Whether the R1 000 000 insurance line is a real offering.
- Whether the category BSON dump under `db/meteor/` is still the production category tree.
- Whether the filmmaker fee waiver (see business rules) is still the intended commercial rule.
