Making Changes
How to edit website content, understand the file structure, and work with Git branches.
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
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
- Open VS Code and open the project folder.
- Navigate to
client/src/lib/siteData.ts. - Find the line with
phone: "1300 392 352"and change the number. - Save the file (Cmd+S on Mac, Ctrl+S on Windows).
- The browser at
http://localhost:5173will 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
- Prepare your new image (JPG or PNG, ideally under 500 KB for fast loading).
- Copy the image file into
client/public/folder. - If you're replacing the logo, name the file
logo1.png(it will overwrite the old one). - 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:
- Check what you changed:
git status
This lists all the files you've modified. - Stage your changes (mark them for saving):
git add .
The.means "add everything I changed". - 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. - Push to GitHub (upload your saved snapshot):
git push origin develop
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 -- .
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
| Task | File to Edit |
|---|---|
| Change phone number, email, address, hours | client/src/lib/siteData.ts |
| Change home page banner text | client/src/pages/Home.tsx |
| Change About Us page content | client/src/pages/About.tsx |
| Change Services page content | client/src/pages/Services.tsx or siteData.ts |
| Change Contact page | client/src/pages/Contact.tsx |
| Replace logo | client/public/logo1.png (replace the file) |
| Change header/footer | client/src/components/Layout.tsx |
| Change email recipient for contact forms | Google 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.