File Structure Overview

Here is a map of the most important files and folders:

excelcare-webapp/
β”‚
β”œβ”€β”€ client/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”‚   └── siteData.ts        ← ⭐ Main content file (phone, email, addresses)
β”‚   β”‚   β”œβ”€β”€ pages/                 ← Each website page is a file here
β”‚   β”‚   β”‚   β”œβ”€β”€ Home.tsx           ← Home page
β”‚   β”‚   β”‚   β”œβ”€β”€ About.tsx          ← About Us page
β”‚   β”‚   β”‚   β”œβ”€β”€ Services.tsx       ← Services listing page
β”‚   β”‚   β”‚   β”œβ”€β”€ Contact.tsx        ← Contact page
β”‚   β”‚   β”‚   └── ...
β”‚   β”‚   β”œβ”€β”€ components/            ← Reusable parts (header, footer, etc.)
β”‚   β”‚   └── index.css              ← Global styles
β”‚   └── public/                    ← Images, logos, PDFs
β”‚       β”œβ”€β”€ logo1.png
β”‚       └── flags/
β”‚
β”œβ”€β”€ functions/
β”‚   └── src/
β”‚       └── index.ts               ← Email Cloud Function
β”‚
β”œβ”€β”€ .github/
β”‚   └── workflows/
β”‚       └── firebase-deploy.yml    ← Deployment automation
β”‚
β”œβ”€β”€ .firebaserc                    ← Firebase project aliases (dev/prod)
β”œβ”€β”€ firebase.json                  ← Firebase hosting configuration
└── .env                           ← Local environment variables (not in Git)

The Most Important File β€” siteData.ts

Most text content on the website (phone numbers, email addresses, office addresses, opening hours) is stored in one central file:

client/src/lib/siteData.ts

βœ…
For most updates β€” changing phone numbers, addresses, opening hours, social media links β€” you only need to edit this one file. No other changes needed.

Here is what it currently contains (key fields):

export const SITE = {
  name: "Excel Care Group",
  phone: "1300 392 352",
  email: "admin@excelcaregroup.com.au",
  address: "40 Futures Road, Cranbourne West VIC 3977",
  // ... more fields
};

How to Edit Content

Example 1: Change the phone number

  1. Open VS Code and open the project folder.
  2. Navigate to client/src/lib/siteData.ts.
  3. Find the line with phone: "1300 392 352" and change the number.
  4. Save the file (Cmd+S on Mac, Ctrl+S on Windows).
  5. The browser at http://localhost:5173 will automatically refresh and show the new number.

Example 2: Change an address

In siteData.ts, update the address field:

address: "123 New Street, Suburb VIC 3000",

Example 3: Update opening hours

In siteData.ts, update the hours array:

hours: [
  { day: "Mon – Fri", time: "9:00 AM – 5:00 PM" },
  { day: "Saturday",  time: "10:00 AM – 2:00 PM" },
],

Example 4: Replace an image

  1. Prepare your new image (JPG or PNG, ideally under 500 KB for fast loading).
  2. Copy the image file into client/public/ folder.
  3. If you're replacing the logo, name the file logo1.png (it will overwrite the old one).
  4. For other images, find where the old image filename is referenced in the page files (client/src/pages/) and update the filename.

Understanding Git β€” Save Your Changes

Git tracks every change you make. Think of each "commit" as a saved snapshot you can return to.

The Basic Git Workflow

Every time you finish a set of changes, follow these steps in Terminal:

  1. Check what you changed:
    git status
    This lists all the files you've modified.
  2. Stage your changes (mark them for saving):
    git add .
    The . means "add everything I changed".
  3. Commit (save a snapshot) with a description:
    git commit -m "Update phone number and opening hours"
    Write a short, clear message describing what you changed.
  4. Push to GitHub (upload your saved snapshot):
    git push origin develop
⚠️
Always push to the develop branch. Do not push directly to main. The develop branch is used for testing before the live website is updated.

Keeping Your Code Up To Date

Before making any changes, always download the latest code from GitHub first. This prevents conflicts.

git checkout develop
git pull origin develop

What To Do If You Make a Mistake

Undo changes to a single file (before committing)

git checkout -- client/src/lib/siteData.ts

Replace client/src/lib/siteData.ts with the file you want to undo.

Undo all changes (before committing)

git checkout -- .
🚨
Once you run git checkout -- . you cannot undo it. Only use this if you are sure you want to throw away all unsaved changes.

Undo the last commit (already committed, not yet pushed)

git reset --soft HEAD~1

This removes the commit but keeps your changes so you can re-edit and re-commit.

Common Editing Tasks

TaskFile to Edit
Change phone number, email, address, hoursclient/src/lib/siteData.ts
Change home page banner textclient/src/pages/Home.tsx
Change About Us page contentclient/src/pages/About.tsx
Change Services page contentclient/src/pages/Services.tsx or siteData.ts
Change Contact pageclient/src/pages/Contact.tsx
Replace logoclient/public/logo1.png (replace the file)
Change header/footerclient/src/components/Layout.tsx
Change email recipient for contact formsGoogle Cloud Secret Manager β†’ RECIPIENT_EMAIL (see GCP guide)

Building and Previewing a Production Build

To preview exactly how the site will look when deployed (useful before deploying):

pnpm build
pnpm preview

Then open http://localhost:4173 in your browser.