This guide is for someone who may need to change the website in code, but does not normally work with code.
It does not try to teach programming from scratch. Its job is to explain:
- where each page lives
- which files control what
- what is safe to edit
- what should be left alone unless there is a very specific reason
If you only need to change:
- text
- people
- partner logos
- testimonials
- blog tags / featured
- homepage metrics
- tennis lesson videos
use /admin, not code.
This guide is only for changes that truly need code.
Good workflow:
- Change one file.
- Save it.
- Run the site locally.
- Check the page.
- Then do the next change.
Do not change many unrelated files at once unless you know exactly why.
The route list lives in:
- [src/App.tsx]
Current main routes:
/= Home/team= Team/sports= Sports overview/sports/tennis/sports/basketball/sports/football/sports/golf/blog/blog/:slug/experiences/get-involved/contact/partners/admin
If you need to add, remove, or rename a route, start in src/App.tsx.
- [src/pages/Index.tsx]
This controls:
- homepage hero
- mission section
- what we stand for
- sports CTA
- testimonials
- impact metrics placement
- second serve section
- location
- donation CTA
If you want to:
- move homepage sections
- change homepage wording in code
- change homepage shapes / animations / visual layout
this is the file.
- [src/pages/AboutPage.tsx]
This controls:
- team hero
- team card layout
- founder/staff/coaches display
- hover/tap description behavior
If a team card looks wrong on the page, this is the file to inspect.
- [src/pages/SportsPage.tsx]
This controls:
- sports hero
- sports page section below the hero
- [src/pages/SportDetailPage.tsx]
This one file controls all sport detail pages using the route parameter.
It handles:
- each sport hero
- sport descriptions
- tennis live USTA sessions
- tennis lesson videos
- waitlist CTA
- second serve section on tennis
If tennis, basketball, football, or golf pages need layout or text changes in code, start here.
- [src/pages/BlogPage.tsx]
This controls:
- blog hero
- featured post layout
- blog card layout
- empty state
- [src/pages/BlogPostPage.tsx]
This controls:
- single article layout
- article header
- article body display
- [src/pages/ExperiencesPage.tsx]
This controls:
- experiences hero
- moments captured
- athlete quotes
- parent quotes
- video section
- [src/pages/PartnersPage.tsx]
This controls:
- partners title / top section
- conveyor belt
- why partner with us
- partner CTA
- [src/pages/GetInvolvedPage.tsx]
This controls:
- get involved hero/title
- donate / volunteer / partner cards
- card icons
- action button links
- [src/pages/ContactPage.tsx]
This controls:
- contact page hero
- form layout
- logo image panel
- submit success message in the page UI
These affect many pages at once.
- [src/components/Navbar.tsx]
This controls:
- top navigation
- dropdown under Home
- mobile menu
- logo placement
- nav link order
- Get Involved button in the header
If you want to change the header, start here.
- [src/components/Footer.tsx]
This controls:
- footer columns
- footer links
- footer logo
- social icons
- nonprofit/legal line
- [src/components/Layout.tsx]
This wraps pages with:
- header
- footer
- edit mode button logic
- [src/components/ScrollToTop.tsx]
This makes route changes go back to the top of the page.
- [src/lib/editable-content.tsx]
This is one of the most important files in the whole project.
It controls:
- loading saved content from Supabase
- saving
/adminedits - image uploads
- auth state
- live blog merging
- preview draft behavior
If this file breaks, Edit Mode usually breaks too.
Do not change it casually.
- [src/lib/editable-content-format.ts]
This defines the editable content structure.
Change this only if you are intentionally adding a new editable content type.
- [src/data/editableContentSeed.ts]
This is the built-in fallback/default content.
If something is not yet in Supabase, this file may still affect what shows.
- [src/pages/AdminPage.tsx]
This controls:
/admin- all admin tabs
- all admin form fields
- limits like max characters, max social links, etc.
If you need to add a new field to Edit Mode, you usually need to change:
src/pages/AdminPage.tsxsrc/lib/editable-content-format.tssrc/lib/editable-content.tsxsrc/data/editableContentSeed.ts- the actual page that displays the content
- [api/blog-posts.ts]
This is very important.
It controls:
- live Substack fetching
- cached blog persistence in Supabase
- protection against temporary Substack feed regressions
If the blog stops updating or older posts disappear unexpectedly, check this file first.
- [scripts/substack-feed.mjs]
This parses the Substack RSS feed.
If the feed format changes, this file may need updates.
- [src/data/blogPosts.ts]
This is fallback/default data only.
It is not the main live blog source anymore.
- [api/usta-sessions.ts]
- [src/lib/usta-sessions.ts]
These control:
- live USTA session fetching
- session formatting
If the tennis live section breaks, check these two.
- [api/contact.ts]
- [src/lib/contact-form.ts]
These control:
- contact form validation
- Resend email sending
- server-side spam protection / checks
If the contact form stops sending messages, inspect these files.
- [src/components/Seo.tsx]
This controls:
- page titles
- meta descriptions
- Open Graph
- Twitter tags
- structured data
- favicon/head tags at runtime
- [index.html]
This controls:
- base HTML shell
- static icon links
- static fallback SEO tags
- [scripts/generate-seo-assets.mjs]
- [public/sitemap.xml]
- [public/robots.txt]
- [public/site.webmanifest]
These are SEO/search/share related.
If you touch them, do it carefully.
- [src/index.css]
This controls global styles like:
- fonts
- utility classes
- scrollbar
- shared visuals
- some custom highlight/shape behavior
If many pages suddenly look different, this file may be why.
These are usually safe if done carefully:
- changing text inside page files
- changing button labels
- changing links
- swapping images
- changing section order inside one page
- changing colors/classes in one page file
- changing footer or header link labels
These need more care:
src/lib/editable-content.tsxsrc/lib/editable-content-format.tsapi/blog-posts.tsapi/usta-sessions.tsapi/contact.tssrc/components/Seo.tsxsrc/App.tsxsrc/index.css
Change these only when you know why.
Avoid editing these unless there is a specific reason:
dist/- built JS files in
dist/assets/ package-lock.jsonnode_modules/- generated SEO files unless you mean to change SEO behavior
- anything in
api/unless you are changing backend behavior
Important:
dist/is build output, not source code- changes there are temporary and should not be used as real edits
Check:
- Supabase env vars
- [src/lib/supabase.ts]
- [src/lib/editable-content.tsx]
- [src/pages/AdminPage.tsx]
Check:
https://togethersports.org/api/blog-postshttps://togethersports.substack.com/feed- [api/blog-posts.ts]
- [scripts/substack-feed.mjs]
Check:
https://togethersports.org/api/usta-sessions- [api/usta-sessions.ts]
- [src/lib/usta-sessions.ts]
Check:
- Resend env vars
- [api/contact.ts]
- [src/lib/contact-form.ts]
Install:
npm installNormal local site:
npm run devBuild test:
npm run buildIf you need the Vercel serverless routes locally too:
npx vercel devIf the goal is:
- “change wording”
- “swap image”
- “change title”
- “move a section a little”
then edit the relevant page file.
If the goal is:
- “Edit Mode should save a new type of content”
- “blog live logic changed”
- “USTA is broken”
- “contact email stopped sending”
- “SEO / sitemap / icons changed”
then use extra caution, because those are system-level files.