Skip to content
Closed
Show file tree
Hide file tree
Changes from 150 commits
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
1126e73
feat: add Compass — schedule, goals & people PWA
claude Jul 21, 2026
45996ff
feat(map): add map tab with emoji/text pins and directions
claude Jul 21, 2026
a76767f
feat: reconnect nudges, recurring events, and pins from a contact
claude Jul 21, 2026
77bca8c
feat(planner): edit a single occurrence of a recurring event
claude Jul 21, 2026
3274d51
ci: deploy schedule-app to GitHub Pages
claude Jul 21, 2026
2c7443e
feat: daily goals, event types/colors, drag, reminders, logo & polish
claude Jul 21, 2026
8130078
feat: rebrand to Stewardly, haptics, custom Select, contact photos
claude Jul 21, 2026
297274c
feat: full-page editors, event detail/edit split, drag/select, month …
claude Jul 21, 2026
07f2351
feat: Home page, Tasks, Notes, and a Pricing page
claude Jul 21, 2026
ade9cef
feat: color themes, premium gating, .ics sync, profile, donation
claude Jul 21, 2026
09185c1
Fix map long-press, drag haptics, checkmarks, note color; expand Sett…
claude Jul 21, 2026
f94ad31
Fix block spacing and gate event-block opacity behind Pro
claude Jul 21, 2026
4bd1bf7
Add daily-goal weekday repeat, longer page transitions, task editor s…
claude Jul 21, 2026
f130bc2
Make back gesture close overlays instead of navigating away
claude Jul 21, 2026
9cbc23f
Icon-only nav bar, working emoji/pin size slider, haptics toggle
claude Jul 21, 2026
026aded
Replace timeline zoom buttons with pinch-to-zoom, hour pickers with d…
claude Jul 21, 2026
8c0a082
Auto-drop a map pin when a contact gets an address
claude Jul 21, 2026
8bda2b8
Add a launch splash screen
claude Jul 21, 2026
499de24
Add "Schedule from calendar" to the event editor
claude Jul 21, 2026
602bd29
Add customizable home screen bubbles (Pro)
claude Jul 21, 2026
e034da2
Replace event location minimap with full-page "Select location" picker
claude Jul 21, 2026
d08509c
Add multi-select drag-to-reschedule on the day timeline
claude Jul 21, 2026
065a8a8
Scaffold backend service: Express + Postgres/Prisma, Clerk auth, Stri…
claude Jul 22, 2026
b1e64aa
Wire up Clerk accounts and Stripe billing end to end
claude Jul 22, 2026
816d3b2
Rebrand Stewardly → Keystone with a new black/gold arch icon
claude Jul 22, 2026
d1839c9
feat: make gold the default color theme, move Emerald to Pro
claude Jul 22, 2026
5e3eea7
chore: gitignore Playwright test-results output
claude Jul 22, 2026
a6ccd6d
fix: event-detail spacing, settings tweak, drag left/right to change day
claude Jul 22, 2026
e3a6368
feat: page-by-page day drag, swipe navigation, full-page settings modals
claude Jul 22, 2026
9acaab4
fix: drag/swipe polish, reduce haptics; feat: free Contacts + timeline
claude Jul 22, 2026
2515e64
feat: add first-time-user tutorial
claude Jul 22, 2026
9d3386b
feat: sync app data to the backend when Cloud sync is enabled
claude Jul 22, 2026
fb85952
Fix long-press text selection, tutorial logo, and reminder contrast
claude Jul 22, 2026
a206943
Link events to goals/tasks, and swipe-down-to-close on event detail
claude Jul 22, 2026
9ffff26
Fix creation sheets not scrolling far enough past the keyboard
claude Jul 22, 2026
e08d112
Add Pro feature to reorder/hide navigation tabs
claude Jul 22, 2026
1006ba1
Make Home's sections reorderable/hideable, and dedupe the reorder UI
claude Jul 22, 2026
fca59ed
Add task due time, calendar placement, and multi-select reminders
claude Jul 22, 2026
53de0f0
Expandable quick-add FAB with Pro reorder/hide settings
claude Jul 22, 2026
5135401
Add vCard (.vcf) import for contacts
claude Jul 22, 2026
cb149f0
Live 1:1 finger-following swipe between calendar days
claude Jul 22, 2026
40dc565
Contact-scoped notes/timeline fade, dark PWA splash, haptics middle
claude Jul 23, 2026
b5f6fc2
Fix tap-to-create dead zones, scroll-through on event blocks, and
claude Jul 23, 2026
1be23d5
fix: quick-add Task action broke when Home's Tasks block is hidden
claude Jul 23, 2026
7178983
fix: multi-select drag showed a white pill and phantom cross-day ghosts
claude Jul 23, 2026
291c8ce
fix: calendar drag broken by touch-action pan-y regression
claude Jul 23, 2026
51e7d1d
fix: contact timeline notes were unreachable, fade was a hard on/off …
claude Jul 23, 2026
53f2c77
Move event "mark as done" checkbox beside the title, and reskin check…
claude Jul 23, 2026
9f0de36
Suppress mobile's default tap-highlight flash on checkboxes
claude Jul 23, 2026
3c633e9
Kill the mobile tap-highlight flash calendar-wide, add themed press f…
claude Jul 23, 2026
0b96c06
Give the calendar's block-initiated scroll momentum, so it's continuous
claude Jul 24, 2026
4488d4f
Restore haptic feedback on link taps — the missing middle ground
claude Jul 24, 2026
002f930
Fix drag handles on the home/settings reorder list to match the theme
claude Jul 24, 2026
4bb5d2c
Fix drag's arm haptic silently failing on real devices
claude Jul 24, 2026
af7987b
Fix zero-gap spacing between segmented controls and the toggle row af…
claude Jul 24, 2026
5e789d0
Fix remaining zero-gap spacing before section headers on More page
claude Jul 24, 2026
322a7ac
Rework haptic system: fix double-ticks, add richer state-aware feedback
claude Jul 24, 2026
ed021a0
Add temporary vibrate diagnostic button to track down no-haptics report
claude Jul 24, 2026
a84eef0
Remove temporary vibrate diagnostic button
claude Jul 24, 2026
6476128
UI/feel polish pass: dark-mode depth, Month view dead space, and 4 co…
claude Jul 24, 2026
aee69d6
Fix perceived double-haptic on task checkmarks and pin creation
claude Jul 24, 2026
f6f6b2a
Add global search across events, tasks, goals, people, and notes
claude Jul 24, 2026
e427bd5
Add goal streaks — a retention hook on the page people open every day
claude Jul 24, 2026
3468cb7
Badge the best goal streak onto the tab bar's Goals icon
claude Jul 24, 2026
f06bde8
Remove the tab bar streak badge, keep it on Home and Goals only
claude Jul 24, 2026
a9426d2
Give the pin editor the same checkmark-save sheet as calendar events
claude Jul 24, 2026
e1dce49
Press-and-hold auto-repeat on Goals +/- stepper buttons
claude Jul 24, 2026
fc4ce51
Only fire delegated haptics on an actual tap, not a scroll's starting…
claude Jul 24, 2026
027fe02
Add swipe-to-delete and undo toast for tasks, notes, events, and cont…
claude Jul 26, 2026
3a57611
Add animated counts, list-row animations, streak milestones, and them…
claude Jul 26, 2026
4dbfc4a
Add streak freezes and location-based arrival reminders
claude Jul 26, 2026
b3dc2cd
Add three Pro features: streak insurance, goal history, and smart qui…
claude Jul 26, 2026
d9affb8
Add recurring tasks, a weekly recap, and bulk contact actions
claude Jul 26, 2026
23c0c5e
Add plan-my-day route optimizer and proactive nudges
claude Jul 26, 2026
54ee3a2
Scaffold shared/collaborative calendars (backend + frontend, not depl…
claude Jul 26, 2026
3dc3a18
Fix chip rows fading at the edges even when nothing's scrollable
claude Jul 26, 2026
324e0a7
Rework the launch splash into a build-up animation
claude Jul 26, 2026
c6d92d9
feat(schedule-app): motion polish pass — press feedback, staggered li…
claude Jul 26, 2026
60439e6
fix(schedule-app): stop a failed boot from being a silent black screen
claude Jul 27, 2026
6905c26
feat(schedule-app): conflict detection, day/week templates, follow-up…
claude Jul 27, 2026
aaf8907
feat(schedule-app): put day/week templates behind Pro
claude Jul 27, 2026
3f57e79
fix(schedule-app): remove the black/white flashing during launch
claude Jul 27, 2026
9dc9214
feat(schedule-app): tapping the header logo goes Home
claude Jul 27, 2026
5b4c0bc
feat: sell Pro as a one-time purchase instead of a subscription
claude Jul 27, 2026
ec46d76
feat(schedule-app): add six pastel color themes
claude Jul 27, 2026
ea96c80
feat(schedule-app): add eight more standard color themes
claude Jul 27, 2026
17c0678
fix(schedule-app): open Google Maps correctly from the installed PWA
claude Jul 27, 2026
2c44b5a
fix(schedule-app): don't route Android maps links through the web
claude Jul 27, 2026
7a737a9
fix(schedule-app): contain the maps scheme handoff so a WebView can't…
claude Jul 27, 2026
89701f1
fix(schedule-app): wire Smart add up on the Planner
claude Jul 27, 2026
3fcffb5
feat(schedule-app): show the Pro lock on gated quick-add actions
claude Jul 27, 2026
268c610
fix(schedule-app): stop done tasks replaying the check animation on Home
claude Jul 27, 2026
272f0de
feat(schedule-app): make the planner's schedule warnings togglable
claude Jul 27, 2026
55224d5
feat(schedule-app): note colours, $40 price, centred icon, tour on Ho…
claude Jul 27, 2026
41281ea
feat(schedule-app): rework the launch animation; stop the FAB jumping…
claude Jul 27, 2026
87477ad
feat(schedule-app): address autocomplete; route events with locations
claude Jul 27, 2026
155812c
feat(schedule-app): fluid reorder handles; week-view drag and same-da…
claude Jul 27, 2026
26e6885
refactor(schedule-app): make the launch animation the loading screen
claude Jul 27, 2026
d92cb09
feat: cross-fade the launch screen's logo into the build animation
claude Jul 27, 2026
3728580
feat: rebuild the launch animation as one continuous upward gesture
claude Jul 27, 2026
1c4599b
feat: build the arch up and around its own path, keystone fades in an…
claude Jul 27, 2026
a5a9c25
feat: travel buffers, birthdays/anniversaries, task subitems, natural…
claude Jul 27, 2026
b38e4a2
feat: batch of planner, map, goals, contacts and settings work
claude Jul 28, 2026
2746664
feat: configurable swipe actions on the People list; Pro is $9.99
claude Jul 28, 2026
a95ad81
fix(schedule-app): correct route optimizer times, auto-name event pin…
claude Jul 28, 2026
4996d3c
feat(schedule-app): smarter quick-add, custom icon set, editor/calend…
claude Jul 28, 2026
6249215
feat(schedule-app): one launch mark with a short gold pulse
claude Jul 28, 2026
b17a8b9
feat(schedule-app): remove the launch splash entirely
claude Jul 28, 2026
84b3012
feat(schedule-app): group settings into sections and add search
claude Jul 28, 2026
308f99d
feat(schedule-app): stop text selection, home scroll reset, seed hist…
claude Jul 28, 2026
ef878ad
feat(schedule-app): drag auto-scroll, groups, device photos, address …
claude Jul 28, 2026
3db6cd4
fix(schedule-app): three real defects behind the route planner's wron…
claude Jul 28, 2026
25c4f29
feat(schedule-app): rework contact timelines, add insights, make sync…
claude Jul 28, 2026
3f6e433
fix(schedule-app): move the map style button clear of the zoom controls
claude Jul 28, 2026
07a7e11
feat: link Claude to the app with a chat bubble
claude Jul 28, 2026
9b0d3bb
feat: separate past from upcoming on a contact timeline, and make ent…
claude Jul 29, 2026
40b7b54
feat: file finished tasks away instead of resorting the list under yo…
claude Jul 29, 2026
3bbf474
fix: stop the floating + button flying to mid-screen on every page ch…
claude Jul 29, 2026
581d771
feat: simplify the Goals page
claude Jul 30, 2026
db48606
polish: give the Goals page more of a premium feel
claude Jul 30, 2026
65cfa97
fix: goal streak stuck at a low number for goals restricted to specif…
claude Jul 30, 2026
84b9154
polish: extend the Goals page's tactile depth to the count, badges, a…
claude Jul 30, 2026
45fbaeb
polish: extend the ring gradient to Home's mini rings
claude Jul 30, 2026
e413f98
Polish Pricing page to match the app's own Pro visual language
claude Jul 30, 2026
0abd78d
Fix route optimizer picking an arbitrary stop as its starting point
claude Jul 31, 2026
95d1121
Fix three Planner/event bugs: unreachable Done button, dead contact l…
claude Aug 2, 2026
af3aa6b
Bury the AI assistant behind a single AI_ENABLED flag, keep it as a stub
claude Aug 2, 2026
78f5447
Scroll every page to the top on navigation, except Map
claude Aug 5, 2026
220de02
Fix Goals page silently writing every tap to a stale day
claude Aug 7, 2026
8ddaa82
Fix Planner's cursor drifting stale across a real day change
claude Aug 7, 2026
de30b5e
Bury the route optimizer; move map style to the top of the right stack
claude Aug 7, 2026
cecdfd9
Add an interval fallback so the day-resync doesn't depend on one even…
claude Aug 7, 2026
68f67b4
Fix vCard import silently dropping map pins for most imported contacts
claude Aug 8, 2026
b974998
Fix address suggestions being discarded on add, and going stale while…
claude Aug 10, 2026
4d6f8b1
Let the undo toast be dragged away in any direction, not just waited out
claude Aug 10, 2026
fa46c7e
Fix the current-time line drawing over event/task titles on the calendar
claude Aug 10, 2026
d025d3e
Rework event types into interaction mediums (Call/Text/In Person/Email)
claude Aug 10, 2026
c71aadb
Remove the event-type text label from the event detail view
claude Aug 11, 2026
96940ff
Remove user-managed event types; make Kind a fixed selectable field o…
claude Aug 11, 2026
c68557f
Fix "Schedule from calendar" Done button: wrong color and floating po…
claude Aug 11, 2026
e95ebc5
Always show a linked contact's phone number on the event detail view
claude Aug 11, 2026
970eea7
Make event kind colors editable in Settings; fix a color-loss migrati…
claude Aug 11, 2026
af451db
Backfill colors for events stuck with an already-migrated empty kind
claude Aug 11, 2026
9c0fec4
Show start–end time range on day-timeline event blocks, not just start
claude Aug 11, 2026
d5a0f3a
Fix repeating events silently losing their repeat setting when edited
claude Aug 11, 2026
7dafb5a
Batch of UX improvements: contact pickers, pin-picker size, empty sta…
claude Aug 11, 2026
63ad306
Add animated desert scene to Home's empty state
claude Aug 11, 2026
78acaeb
Restyle Home empty state as a dino-game desert scene, cycle its message
claude Aug 11, 2026
cef06fa
Give the desert empty-state a springier, more flagship-feeling animation
claude Aug 11, 2026
13ff219
Bigger cacti, sun rays, wind trails, and a scripted tumbleweed crossing
claude Aug 11, 2026
ded3e5b
Revert the Home empty-state back to plain text, no animation
claude Aug 11, 2026
48f93d0
Extract the "resync to today across a real midnight" fix into a share…
claude Aug 11, 2026
1e15553
Generate the missing shared-calendars migration
claude Aug 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/deploy-schedule-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Deploy schedule app

# Builds schedule-app/ and publishes it to GitHub Pages. Once Pages is enabled
# (Settings → Pages → Source: "GitHub Actions"), every push that touches the app
# redeploys it to https://<owner>.github.io/<repo>/.

on:
push:
branches:
- main
- claude/missionary-calendar-app-ti6dr6
Comment on lines +9 to +11

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="$(gh repo view --json nameWithOwner --jq '.nameWithOwner')"
gh api "repos/${repo}/environments/github-pages" \
  --jq '{deployment_branch_policy, protection_rules}'

Repository: affaan-m/ECC

Length of output: 308


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- workflow ---'
cat -n .github/workflows/deploy-schedule-app.yml

printf '%s\n' '--- environment names ---'
repo="$(gh repo view --json nameWithOwner --jq '.nameWithOwner')"
gh api "repos/${repo}/environments" --paginate \
  --jq '.environments[] | {name, deployment_branch_policy, protection_rules}'

printf '%s\n' '--- workflow runs for the feature branch ---'
gh api "repos/${repo}/actions/workflows/deploy-schedule-app.yml/runs?branch=claude/missionary-calendar-app-ti6dr6&per_page=10" \
  --jq '.workflow_runs[] | {id, event, head_branch, status, conclusion, environment: .name, created_at}'

printf '%s\n' '--- repository Pages configuration ---'
gh api "repos/${repo}/pages" \
  --jq '{build_type, source, html_url, status}' 2>&1 || true

Repository: affaan-m/ECC

Length of output: 2671


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="$(gh repo view --json nameWithOwner,defaultBranchRef --jq '{repo:.nameWithOwner,default:.defaultBranchRef.name}')"
printf '%s\n' "$repo"

name="$(printf '%s' "$repo" | jq -r .repo)"
default="$(printf '%s' "$repo" | jq -r .default)"

printf '%s\n' '--- workflows ---'
gh api "repos/${name}/actions/workflows" \
  --jq '.workflows[] | {id, name, path, state}'

printf '%s\n' '--- workflow file on default branch ---'
gh api "repos/${name}/contents/.github/workflows/deploy-schedule-app.yml?ref=${default}" \
  --jq '{path, sha, html_url}' 2>&1 || true

printf '%s\n' '--- Pages configuration ---'
gh api "repos/${name}/pages" \
  --jq '{build_type, source, status, html_url}' 2>&1 || true

printf '%s\n' '--- environments ---'
gh api "repos/${name}/environments" --paginate \
  --jq '.environments[] | {name, deployment_branch_policy, protection_rules}'

Repository: affaan-m/ECC

Length of output: 3803


🌐 Web query:

GitHub Actions environments deployment branch policy environment does not exist auto-created deploy-pages github-pages

💡 Result:

When you run a GitHub Actions workflow that references an environment (such as github-pages) that does not yet exist, GitHub automatically creates the environment for you [1][2][3]. Key details regarding this behavior and deployment branch policies include: Environment Creation: If a workflow references a non-existent environment, it is created automatically upon the first run of that workflow [1][3]. Protection Rules: - Implicit Creation: If the environment is created as part of an implicit Pages build (e.g., from a branch or folder source), the source branch is automatically added as a deployment branch protection rule [1][3]. - Manual/Explicit Creation: If you create the environment via a workflow file or manually, it will not have any protection rules or secrets configured by default [1][3]. Deployment Policy Errors: You may encounter errors like "Invalid deployment branch" or "Branch is not allowed to deploy" if your repository's Pages source settings or environment protection rules are misaligned [4][5]. For example, if your Pages source is set to a specific branch, but your workflow attempts to deploy from a different branch without that branch being explicitly allowed in the github-pages environment protection rules, the deployment will fail [4][5]. To resolve deployment branch policy issues: 1. Navigate to your repository's Settings > Environments. 2. Select the github-pages environment (or the one you are targeting). 3. Review the Deployment branches section. Ensure that your intended deployment branches are included under Selected branches and tags or that the policy is set to All branches if you do not require restrictions [1][6][4]. 4. Verify your Pages source settings under Settings > Pages to ensure they align with your deployment strategy (if using Custom Workflows, it is recommended to set the source to GitHub Actions) [2][5].

Citations:


Restrict Pages deployments to main

Once Pages is enabled, this trigger allows claude/missionary-calendar-app-ti6dr6 to publish to the same Pages site. Configure github-pages to allow only main, or remove this branch from on.push.branches. GitHub creates a referenced environment without branch protection by default.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/deploy-schedule-app.yml around lines 9 - 11, Restrict the
deploy-schedule-app workflow’s on.push.branches configuration to main only by
removing claude/missionary-calendar-app-ti6dr6, so github-pages deployments
cannot originate from the feature branch.

Source: Path instructions

paths:
- 'schedule-app/**'
- '.github/workflows/deploy-schedule-app.yml'
workflow_dispatch:

# Least-privilege token, plus the scopes the Pages deploy needs.
permissions:
contents: read
pages: write
id-token: write
Comment on lines +18 to +21

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -eu

printf '%s\n' '--- workflow ---'
cat -n .github/workflows/deploy-schedule-app.yml

printf '%s\n' '--- related package metadata ---'
if [ -f schedule-app/package.json ]; then
  cat -n schedule-app/package.json
fi

printf '%s\n' '--- action references ---'
rg -n 'uses:|node-version|environment:|permissions:|npm (ci|run build)' .github/workflows/deploy-schedule-app.yml

Repository: affaan-m/ECC

Length of output: 3394


🏁 Script executed:

#!/bin/bash
set -eu

printf '%s\n' '--- Pages environment policy ---'
curl -fsSL https://api.github.com/repos/affaan-m/ECC/environments/github-pages \
  -H 'Accept: application/vnd.github+json' |
  jq '{name, protection_rules, deployment_branch_policy}'

printf '%s\n' '--- workflow and lockfile tracking ---'
git ls-files .github/workflows/deploy-schedule-app.yml schedule-app/package-lock.json

printf '%s\n' '--- workflow-level versus job-level permissions ---'
python3 - <<'PY'
from pathlib import Path
import re

text = Path(".github/workflows/deploy-schedule-app.yml").read_text()
workflow = re.search(r"(?ms)^permissions:\n(.*?)(?=^\S|\Z)", text)
build = re.search(r"(?ms)^  build:\n(.*?)(?=^  deploy:|\Z)", text)
deploy = re.search(r"(?ms)^  deploy:\n(.*)", text)

print("workflow_permissions:", workflow.group(1).strip().splitlines() if workflow else None)
print("build_has_job_permissions:", bool(build and re.search(r"(?m)^    permissions:", build.group(1))))
print("deploy_has_job_permissions:", bool(deploy and re.search(r"(?m)^    permissions:", deploy.group(1))))
PY

Repository: affaan-m/ECC

Length of output: 543


🌐 Web query:

Node.js release schedule Node.js 20 end of life April 2026 official

💡 Result:

Node.js 20 (codenamed "Iron") reached its official end-of-life (EOL) on April 30, 2026 [1][2]. As of today, August 11, 2026, this version is no longer supported by the Node.js project, meaning it does not receive security patches, bug fixes, or any other updates [3][4]. Users still running applications on Node.js 20 are advised to migrate to a currently supported version of Node.js to ensure the security and stability of their environments [3][5].

Citations:


🌐 Web query:

GitHub Actions job-level permissions workflow-level permissions GitHub Pages deployment pages write id-token write official documentation

💡 Result:

In GitHub Actions, the permissions key is used to configure the access levels granted to the GITHUB_TOKEN for either an entire workflow or individual jobs [1][2][3]. Workflow-Level vs. Job-Level Permissions The permissions setting can be defined at the top level of a workflow file, in which case it applies to all jobs in the workflow [1][2][4]. Alternatively, it can be defined within a specific job, which overrides any workflow-level settings for that job [2][4][5]. When defining permissions for a job, you must explicitly declare all required permissions, as job-level configurations do not merge with workflow-level settings; they entirely replace them [4]. GitHub Pages Deployment Requirements To successfully deploy to GitHub Pages, the job performing the deployment must be granted specific write permissions to the GITHUB_TOKEN [6][7][8]. Specifically, you must configure the following [6][7]: pages: write: This grants the GITHUB_TOKEN the necessary access to create a deployment via the GitHub API [6][9]. id-token: write: This allows the workflow to request an OpenID Connect (OIDC) token, which is used to verify that the deployment request originates from an authorized source (i.e., a GitHub workflow running in a specific repository and environment) [6][9][10]. If these permissions are omitted, you will typically encounter a 403 error, such as "Resource not accessible by integration" or "missing 'pages: write' permission," when the deployment step executes [8]. Configuration Example The following snippet demonstrates how to apply these permissions at the job level [6][7]: jobs: deploy: runs-on: ubuntu-latest permissions: pages: write # Required for deployment id-token: write # Required for OIDC verification steps: - name: Deploy to GitHub Pages uses: actions/deploy-pages@v4

Citations:


Scope deployment permissions to the deploy job and harden the workflow.

  • Keep only contents: read at workflow level. Add pages: write and id-token: write under deploy.permissions. The build job runs npm ci and must not inherit deployment credentials.
  • Pin actions/checkout, actions/setup-node, actions/upload-pages-artifact, and actions/deploy-pages to full commit SHAs.
  • Replace Node.js 20 with a supported LTS release.
🧰 Tools
🪛 zizmor (1.29.0)

[error] 20-20: overly broad permissions (excessive-permissions): pages: write is overly broad at the workflow level

(excessive-permissions)


[error] 21-21: overly broad permissions (excessive-permissions): id-token: write is overly broad at the workflow level

(excessive-permissions)


[warning] 20-20: permissions without explanatory comments (undocumented-permissions): needs an explanatory comment

(undocumented-permissions)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/deploy-schedule-app.yml around lines 18 - 21, Update the
workflow permissions so the top-level block retains only contents: read, while
the deploy job declares pages: write and id-token: write; keep deployment
credentials out of build. Pin checkout, setup-node, upload-pages-artifact, and
deploy-pages to full commit SHAs, and change the setup-node configuration from
Node.js 20 to a supported LTS release.

Sources: Path instructions, Linters/SAST tools


# Allow one Pages deploy at a time; don't cancel an in-flight publish.
concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

for action in \
  actions/checkout@v4 \
  actions/setup-node@v4 \
  actions/upload-pages-artifact@v3 \
  actions/deploy-pages@v4
do
  repo="${action%@*}"
  tag="${action#*@}"
  sha="$(git ls-remote "https://github.com/${repo}.git" "refs/tags/${tag}^{}" \
    | awk 'NR == 1 { print $1 }')"
  sha="${sha:-$(git ls-remote "https://github.com/${repo}.git" "refs/tags/${tag}" \
    | awk 'NR == 1 { print $1 }')}"
  printf '%s@%s # %s\n' "$repo" "$sha" "$tag"
done

Repository: affaan-m/ECC

Length of output: 421


🏁 Script executed:

#!/bin/bash
set -euo pipefail

file=".github/workflows/deploy-schedule-app.yml"
sed -n '25,78p' "$file"

python3 - <<'PY'
from pathlib import Path
p = Path(".github/workflows/deploy-schedule-app.yml")
text = p.read_text()
expected = [
    "actions/checkout@v4",
    "actions/setup-node@v4",
    "actions/upload-pages-artifact@v3",
    "actions/deploy-pages@v4",
]
for ref in expected:
    print(f"{ref}: {text.count(ref)} occurrence(s)")
PY

if command -v gh >/dev/null 2>&1; then
  for item in \
    "actions/checkout v4 11d5960a326750d5838078e36cf38b85af677262" \
    "actions/setup-node v4 49933ea5288caeca8642d1e84afbd3f7d6820020" \
    "actions/upload-pages-artifact v3 56afc609e74202658d3ffba0e8f6dda462b719fa" \
    "actions/deploy-pages v4 d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e"
  do
    set -- $item
    repo="$1/$2"
    tag="$3"
    sha="$4"
    printf '%s tag: ' "$repo"
    gh api "repos/$repo/git/ref/tags/$tag" --jq '.object.type + " " + .object.sha'
    printf '%s commit: ' "$repo"
    gh api "repos/$repo/commits/$sha" --jq '.sha'
  done
else
  echo "gh is not available; no API commit-resolution check was run" >&2
fi

Repository: affaan-m/ECC

Length of output: 1403


Pin all four actions to full commit SHAs.

Replace the mutable version tags at lines 35, 40, 55, and 70 with immutable commit SHA references.

🧰 Tools
🪛 zizmor (1.29.0)

[error] 35-35: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

📍 Affects 1 file
  • .github/workflows/deploy-schedule-app.yml#L35-L35 (this comment)
  • .github/workflows/deploy-schedule-app.yml#L40-L40
  • .github/workflows/deploy-schedule-app.yml#L55-L55
  • .github/workflows/deploy-schedule-app.yml#L70-L70
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/deploy-schedule-app.yml at line 35, Pin all four GitHub
Actions in .github/workflows/deploy-schedule-app.yml at lines 35, 40, 55, and 70
to immutable full commit SHA references, replacing their mutable version tags
while preserving the existing actions and workflow behavior.

Sources: Path instructions, Linters/SAST tools

with:
persist-credentials: false

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
cache-dependency-path: schedule-app/package-lock.json

- name: Install dependencies
working-directory: schedule-app
run: npm ci

- name: Build
working-directory: schedule-app
run: npm run build

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: schedule-app/dist

deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ build/
*.tsbuildinfo
.cache/

# Playwright
test-results/
playwright-report/
blob-report/

# Test coverage
coverage/
.nyc_output/
Expand Down
31 changes: 31 additions & 0 deletions backend/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Postgres connection string. In production this comes from Render/Railway's
# managed Postgres add-on. For local dev, see backend/README.md.
DATABASE_URL="postgresql://user:password@localhost:5432/keystone_dev?schema=public"

# Clerk Dashboard -> your app -> API Keys
CLERK_PUBLISHABLE_KEY="pk_test_..."
CLERK_SECRET_KEY="sk_test_..."
# Clerk Dashboard -> Webhooks -> your endpoint -> Signing Secret
CLERK_WEBHOOK_SIGNING_SECRET="whsec_..."

# Stripe Dashboard -> Developers -> API keys (use test-mode keys until launch)
STRIPE_SECRET_KEY="sk_test_..."
# Stripe Dashboard -> Developers -> Webhooks -> your endpoint -> Signing secret
STRIPE_WEBHOOK_SECRET="whsec_..."
# Price ID for the one-time Pro purchase (Stripe Dashboard -> Product
# catalog). This must be a **one-time** price, not a recurring one —
# checkout runs in `payment` mode and a recurring price will be rejected.
# STRIPE_PRICE_ID is accepted as a fallback name.
STRIPE_PRICE_ID_LIFETIME="price_..."

# Anthropic Console -> API keys. Powers the in-app assistant (the chat
# bubble). Optional: leave it unset and the bubble simply doesn't appear.
# This key must never be copied into the frontend's own .env — anything in
# the PWA bundle is public.
ANTHROPIC_API_KEY="sk-ant-..."

# The deployed frontend's origin (CORS + redirect URLs). Use your Vite dev
# server URL (e.g. http://localhost:5173) while developing locally.
FRONTEND_URL="http://localhost:5173"

PORT=4000
3 changes: 3 additions & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
.env

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

Ignore all .env variants, not only .env.

The pattern .env does not match .env.local, .env.development, or .env.production. A developer who creates one of those files can commit live Clerk, Stripe, and Anthropic credentials. Keep .env.example tracked.

🔒 Proposed fix
 node_modules/
-.env
+.env
+.env.*
+!.env.example
 generated/

As per coding guidelines: "NEVER hardcode secrets in source code - ALWAYS use environment variables or a secret manager".

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.env
node_modules/
.env
.env.*
!.env.example
generated/
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@backend/.gitignore` at line 2, Update the backend ignore pattern so all .env
variants, including .env.local, .env.development, and .env.production, are
ignored while preserving tracking for .env.example.

Source: Coding guidelines

generated/
191 changes: 191 additions & 0 deletions backend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
# Keystone backend

Accounts + billing for Keystone. This service does **not** yet store your
calendar/contacts data — that still lives in the browser's `localStorage`,
same as before. This is just the foundation: who you are (Clerk) and
whether you're paying (Stripe). Syncing the actual app data to the server
is separate follow-up work.
Comment on lines +3 to +7

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Correct the data-storage description.

Lines 3-7 state that calendar and contact data remains only in localStorage. Lines 105-106 and 184-188 document /api/data as persisted server-side data. Update this introduction so operators and users understand the current data-storage behavior.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@backend/README.md` around lines 3 - 7, Update the introductory data-storage
description in the README to reflect that calendar and contact data is now
persisted server-side through the /api/data endpoints, rather than remaining
only in browser localStorage. Preserve the existing distinction between
account/billing foundations and application-data syncing while removing the
outdated claim.


## Stack

- Node.js + Express (ESM)
- Postgres via Prisma 7 (`@prisma/client` + `@prisma/adapter-pg`)
- [Clerk](https://clerk.com) for accounts/sessions
- [Stripe](https://stripe.com) for subscription billing

## 1. Local development

### Database

You need a local Postgres instance. Quickest path with Postgres already
installed:

```bash
sudo -u postgres psql -c "CREATE USER keystone WITH PASSWORD 'keystone_dev' CREATEDB;"
sudo -u postgres psql -c "CREATE DATABASE keystone_dev OWNER keystone;"
```

Or use Docker: `docker run -d -p 5432:5432 -e POSTGRES_PASSWORD=keystone_dev -e POSTGRES_USER=keystone -e POSTGRES_DB=keystone_dev postgres:16`.
Comment on lines +23 to +28

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Do not publish PostgreSQL with a documented password.

Lines 23-28 use keystone_dev as a fixed database password. The Docker command also publishes port 5432 on all host interfaces by default. This can expose a database with known credentials to the local network. (docs.docker.com)

Require a user-provided local password and bind the development database to 127.0.0.1:5432:5432.

As per coding guidelines: "Never hardcode API keys, passwords, tokens, or other secrets; use environment variables or a secret manager."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@backend/README.md` around lines 23 - 28, Update the PostgreSQL setup examples
in the README to require a user-provided password via an environment variable or
prompt instead of the hardcoded keystone_dev credential, and change the Docker
port mapping to bind explicitly to 127.0.0.1:5432:5432. Keep the database and
user names unchanged.

Source: Coding guidelines


### Install + configure

```bash
cd backend
npm install
cp .env.example .env # fill in DATABASE_URL at minimum to start
npm run db:migrate # applies prisma/migrations, generates the client
npm run dev # http://localhost:4000
```

`GET /api/health` should return `{"ok":true}` even before Clerk/Stripe are
configured — auth-gated routes will 500 until those env vars are real.
Comment on lines +40 to +41

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

ast-grep outline backend/src/app.js --items all
ast-grep outline backend/src/server.js --items all

rg -n -C 4 \
  'process\.env|CLERK_|STRIPE_|ANTHROPIC_|DATABASE_URL|listen\(|throw new Error' \
  backend/src/app.js backend/src/server.js

Repository: affaan-m/ECC

Length of output: 2677


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- backend/src/server.js ---'
cat -n backend/src/server.js

printf '%s\n' '--- backend/src/app.js ---'
cat -n backend/src/app.js

printf '%s\n' '--- route configuration usage ---'
rg -n -C 3 \
  'CLERK_|STRIPE_|process\.env|clerkMiddleware|auth\(|requireAuth|new Stripe|DATABASE_URL' \
  backend/src backend/package.json

Repository: affaan-m/ECC

Length of output: 9259


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- package metadata ---'
cat -n backend/package.json
rg -n -C 2 \
  'requireAuth|auth\(|clerkMiddleware|STRIPE_SECRET_KEY|STRIPE_PRICE_ID|CLERK_SECRET_KEY|CLERK_PUBLISHABLE_KEY' \
  backend/src backend/package-lock.json backend/pnpm-lock.yaml backend/yarn.lock 2>/dev/null || true

printf '%s\n' '--- route entry points ---'
for file in backend/src/routes/me.js backend/src/routes/billing.js backend/src/routes/data.js backend/src/routes/calendars.js backend/src/routes/assistant.js; do
  if [ -f "$file" ]; then
    echo "--- $file ---"
    cat -n "$file"
  fi
done

Repository: affaan-m/ECC

Length of output: 37845


Fail fast when required route configuration is missing.

backend/src/server.js only logs a warning and still calls app.listen() when REQUIRED_ENV is incomplete. Exit before accepting traffic when required variables are missing, or disable unavailable routes with a controlled response.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@backend/README.md` around lines 40 - 41, Update the startup flow in server.js
around REQUIRED_ENV validation so missing required configuration prevents
unavailable routes from serving traffic: exit before app.listen() when required
variables are absent, while preserving the unauthenticated /api/health response
of {"ok":true} if health must remain available before configuration.

Source: Coding guidelines


## 2. Set up Clerk

1. Create an app at [dashboard.clerk.com](https://dashboard.clerk.com).
2. **API Keys** page → copy the Publishable key and Secret key into `.env`
(`CLERK_PUBLISHABLE_KEY`, `CLERK_SECRET_KEY`) and into the frontend's
`.env` as `VITE_CLERK_PUBLISHABLE_KEY` (see `../schedule-app/.env.example`).
3. **Webhooks** page → add an endpoint pointing at
`https://<your-backend-domain>/api/webhooks/clerk` (for local dev, use a
tunnel like `ngrok http 4000` and point it at the tunnel URL). Subscribe
to at least `user.created` and `user.deleted`. Copy the **Signing
Secret** into `CLERK_WEBHOOK_SIGNING_SECRET`.

This webhook keeps a `User` row in our database in sync with Clerk. (The
backend also lazily creates the row on first authenticated request, so
things still work if the webhook hasn't fired yet — but the webhook is
what keeps emails in sync and cleans up on account deletion.)

## 3. Set up Stripe

1. Create/use a [Stripe](https://dashboard.stripe.com) account. Use
**test mode** until you're ready to charge real cards.
2. **Product catalog** → create a "Keystone Pro" product with a **one-time**
price (Stripe calls this "One off" / non-recurring). Copy its Price ID
into `STRIPE_PRICE_ID_LIFETIME`. It must not be a recurring price —
checkout runs in `payment` mode and Stripe rejects recurring prices there.
3. **Developers → API keys** → copy the Secret key into `STRIPE_SECRET_KEY`.
4. **Developers → Webhooks** → add an endpoint at
`https://<your-backend-domain>/api/webhooks/stripe`. Subscribe to
`checkout.session.completed` — that is what grants Pro. If you have
subscribers from before the switch, also keep
`customer.subscription.created`, `customer.subscription.updated`, and
`customer.subscription.deleted` so their access stays accurate. Copy the
**Signing secret** into `STRIPE_WEBHOOK_SECRET`.
5. **Customer portal** (Settings → Billing → Customer portal) → only needed
if you have pre-switch subscribers; it is how they cancel. New buyers
never see it, since a one-time purchase has nothing to manage.

Test the whole loop with Stripe's test card `4242 4242 4242 4242`, any
future expiry, any CVC.

## 4. Deploy (Render or Railway)

Both work the same way for this service:

1. Create a Postgres database on the platform; it gives you a
`DATABASE_URL` — put that in the service's env vars.
2. Create a Node web service pointed at this `backend/` directory.
- Build command: `npm install && npm run db:deploy` (applies migrations
without the interactive prompts `migrate dev` uses).
- Start command: `npm start`.
3. Set every var from `.env.example` in the platform's environment
settings — `FRONTEND_URL` should be your deployed frontend's real URL
(not localhost), which also feeds the Stripe redirect URLs.
4. Re-point the Clerk and Stripe webhook endpoints (steps 2.3 / 3.4 above)
at the deployed URL once you have it.

## API surface

| Route | Auth | Notes |
| --- | --- | --- |
| `GET /api/health` | none | liveness probe |
| `GET /api/me` | Clerk session | `{ id, email, isPro, subscriptionStatus, currentPeriodEnd }` |
| `GET /api/data` | Clerk session | `{ data, updatedAt }` — the whole synced app data blob, or `{ data: null }` if nothing's been pushed yet |
| `PUT /api/data` | Clerk session | body `{ data: <object> }`, upserts the whole blob, returns `{ updatedAt }` |
| `POST /api/billing/checkout` | Clerk session | body `{ plan: "monthly" \| "annual" }`, returns `{ url }` — redirect the browser there |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Document the lifetime checkout request.

The API table documents "monthly" | "annual" plans. Lines 64-67 require a one-time Stripe price and payment checkout mode. Document the lifetime purchase payload and remove obsolete subscription-plan values.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@backend/README.md` at line 107, Update the POST /api/billing/checkout entry
in the API table to document the lifetime purchase payload, remove the obsolete
monthly and annual subscription-plan values, and retain the existing response
and redirect behavior.

| `POST /api/billing/portal` | Clerk session | returns `{ url }` for Stripe's hosted subscription-management page |
| `POST /api/assistant` | Clerk session, Pro | body `{ messages, context? }`, returns one Claude reply as `{ content, stop_reason, usage }` — see below |
| `POST /api/webhooks/clerk` | Clerk webhook signature | keeps `User.email` in sync |
| `POST /api/webhooks/stripe` | Stripe webhook signature | keeps subscription status in sync |
| `GET /api/calendars` | Clerk session | calendars you're a member of, with your role on each |
| `POST /api/calendars` | Clerk session | body `{ name, color? }`, creates a calendar with you as owner |
| `GET /api/calendars/:id` | Clerk session, member | `{ calendar, role, members, events }` |
| `PATCH /api/calendars/:id` | Clerk session, owner | body `{ name?, color? }` |
| `DELETE /api/calendars/:id` | Clerk session, owner | |
| `DELETE /api/calendars/:id/members/:memberId` | Clerk session, self or owner | can't remove the owner |
| `GET /api/calendars/:id/invites` | Clerk session, owner | pending invites |
| `POST /api/calendars/:id/invites` | Clerk session, owner/editor | body `{ email, role? }`, returns `{ invite }` (send the `token` yourself — no email is sent) |
| `DELETE /api/calendars/:id/invites/:inviteId` | Clerk session, owner | revoke a pending invite |
| `POST /api/calendars/invites/:token/accept` | Clerk session | joins the calendar the token was issued for |
| `POST /api/calendars/:id/events` | Clerk session, owner/editor | body `{ title, date, start, end, notes? }` |
| `PATCH /api/calendars/:id/events/:eventId` | Clerk session, owner/editor | |
| `DELETE /api/calendars/:id/events/:eventId` | Clerk session, owner/editor | |

Authenticated routes expect `Authorization: Bearer <clerk session token>` —
the frontend gets this from Clerk's `useAuth().getToken()`.

### The assistant (`POST /api/assistant`)

The chat bubble in the app talks to Claude through this route. It exists so
the `ANTHROPIC_API_KEY` stays on the server: a key in the PWA bundle is a
public key.

The route holds the system prompt and the tool definitions and relays a
single turn. It never executes a tool. The user's data lives in their
browser (this server only ever sees it as an opaque blob), so the agent loop
runs client-side: the browser posts the conversation, gets back an assistant
message that may contain `tool_use` blocks, runs those against the app's own
reducer, appends the results and posts again. That keeps every write on the
normal undo/sync path and means a dropped connection can't leave a change
half-applied.

- `messages` is the Anthropic Messages-API array, echoed back verbatim by
the client (including `thinking` blocks, which must be preserved across
tool-result turns).
- `context` is a plain-text digest of the user's schedule and contacts,
built in the browser and capped at 24k characters.
- Set `ANTHROPIC_API_KEY` to turn the feature on. Leave it unset and the
route answers `503 not_configured`, which the app treats as "hide the
bubble" rather than as an error.
- Requests are throttled to 60 per user per 10 minutes, in memory. That's
per process — if you ever run more than one instance, move it to the
database or a shared cache.

## Known gaps / next steps

- **The lifetime-purchase migration hasn't been run.** Pro switched from a
subscription to a one-time purchase;
`prisma/migrations/20260727010000_lifetime_purchase` adds the
`lifetimePurchasedAt` / `lifetimeSessionId` columns that grant it. Until
it's applied, `/api/me` will error on the missing columns. Run
`npm run db:migrate` locally or `npm run db:deploy` in production. The
migration is additive and leaves the old subscription columns alone, so
anyone who subscribed before the switch keeps working — `isPro` is true
for a lifetime purchase *or* an still-active legacy subscription, and the
pricing page offers those users a "Manage billing" link to cancel. Don't
forget to swap the Stripe price (see §3) — the old recurring price will be
rejected in `payment` mode.

- **Shared calendars are scaffolded but not migrated.** The
`SharedCalendar` / `SharedCalendarMember` / `SharedCalendarInvite` /
`SharedEvent` models exist in `prisma/schema.prisma` and the routes in
`src/routes/calendars.js` are wired up, but no migration has been run
against any database — run `npm run db:migrate` (creates one against
your local dev DB) or `npm run db:deploy` (applies pending migrations,
for CI/production) once you're ready to turn this on. Invites don't send

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Commit a shared-calendar migration before enabling these routes.

This README states that the shared-calendar models and routes exist but no migration creates their tables. A fresh deployment runs npm run db:deploy, which only applies committed migrations. The calendar endpoints will fail against that database.

Generate and commit the migration with the schema change. Validate it against an empty database before release.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@backend/README.md` around lines 171 - 177, Commit a Prisma migration for the
shared-calendar schema models SharedCalendar, SharedCalendarMember,
SharedCalendarInvite, and SharedEvent so npm run db:deploy creates their tables.
Validate the migration against an empty database and update the README’s
migration status to reflect that the migration is committed before enabling the
calendar routes.

an email; `POST /api/calendars/:id/invites` just returns the invite
(with its `token`) for you to deliver however you like (a `mailto:`
link, copy-to-clipboard, etc.) — see `schedule-app/src/pages/
SharedCalendarsPage.jsx` for the frontend that already expects this
shape. Shared events are intentionally simple (no recurrence) — see the
schema comment for why.
- Data sync (`/api/data`) stores the whole app state as one JSON blob per
user — simple last-write-wins across a person's own devices, not a
conflict-resolving multi-editor sync. It's a real prerequisite for any
server-side feature that needs a user's history (e.g. an AI assistant),
but that feature itself still needs to be built.
- `subscriptionStatus` treats `active` and `trialing` as Pro; adjust
`PRO_STATUSES` in `src/routes/me.js` if you add a trial or grace-period
policy.
Loading