Welcome to RealEstatePortal! This is a modern, visually appealing real estate website built with React, TypeScript, Tailwind CSS, and Google Apps Script for backendless form submissions. This README will guide you through every step, from understanding the project to deploying it live with your own custom domain. No technical background required!
- Project Overview
- Features
- How the Project Works
- Folder Structure Explained
- How to Run the Project Locally
- How to Set Up the Contact Form Backend (Google Apps Script)
- How to Deploy the Website on Railway
- How to Connect Your Domain from GoDaddy
- How to Customize the Website
- Troubleshooting & FAQ
- Credits & Contact
RealEstatePortal is a website for real estate businesses to showcase their projects, amenities, and receive inquiries from potential customers. It is designed to be easy to use, beautiful, and works on all devices (mobile, tablet, desktop).
- Modern UI: Built with React, TypeScript, and Tailwind CSS for a fast and beautiful experience.
- Project Showcase: Display your real estate projects with images, floor plans, and details.
- Contact Form: Visitors can send their details and messages directly to your Google Sheet and email.
- No Backend Server Needed: Uses Google Apps Script for form submissions (no server hosting required for backend).
- Multi-language Support: Easily add more languages.
- Easy Hosting: Deploy on Railway with a few clicks.
- Custom Domain: Connect your own domain from GoDaddy.
- Frontend: Built with React (using Vite for fast development), styled with Tailwind CSS.
- Contact Form: When a user submits the form, the data is sent to a Google Apps Script Web App. This script saves the data to a Google Sheet and sends you an email notification.
- No backend server is needed!
RealEstatePortal/
βββ client/ # The main website (React app)
β βββ src/
β β βββ components/ # All UI components (navbar, contact form, etc.)
β β βββ pages/ # Main pages (home, not-found, etc.)
β β βββ contexts/ # App-wide state (theme, language)
β β βββ hooks/ # Custom React hooks
β β βββ lib/ # Utilities (API helpers, etc.)
β β βββ ...
β βββ public/ # Static files (favicon, videos)
β βββ index.html # Main HTML file
βββ attached_assets/ # Images, floorplans, and other assets
βββ server/ # (Optional) Node backend (not used for contact form)
βββ shared/ # Shared types and schemas
βββ README.md # This file
βββ ... # Config files (package.json, etc.)
- Download and install Node.js from nodejs.org. (Choose the LTS version.)
- Click the green "Code" button on GitHub, then "Download ZIP". Unzip it on your computer.
- Or, if you know Git, run:
git clone <repo-url>
- Open a terminal/command prompt in the project folder.
- Run:
npm install # or if you have pnpm: pnpm install
- Run:
npm run dev # or pnpm dev - Open the link shown in the terminal (usually http://localhost:5173) in your browser.
You can now see and edit the website locally!
This lets you collect form submissions in a Google Sheet and get email notifications, without any backend server.
- Go to Google Sheets and create a new sheet (e.g., "Contact Submissions").
- In your sheet, click
Extensions>Apps Script. - Delete any code and paste the provided Apps Script code (see below).
- Use the code you already have (with
doGet,doPost, andsetCorsHeaders). - Save the script.
- Click
Deploy>New deployment. - For "Select type", choose
Web app. - Set access to
Anyone. - Click
Deployand copy the Web App URL.
- In
client/src/components/contact.tsx, update the URL to your new Web App URL.
- Fill out and submit the form on your website.
- Check your Google Sheet and email for the submission.
Railway is a platform that lets you host your website for free (with some limits) or paid.
- Go to railway.app and sign up.
- Click
New Project>Deploy from GitHub repo. - Select your RealEstatePortal repository.
- Railway usually detects everything automatically.
- If needed, set:
- Build command:
npm run build(orpnpm build) - Start command:
npm run preview(orpnpm preview)
- Build command:
- Click
Deploy. - After a few minutes, your site will be live at a Railway-provided URL (e.g.,
https://yourproject.up.railway.app).
- Go to GoDaddy and purchase your desired domain.
- In your Railway project, go to
Domains>Add Domain. - Enter your domain (e.g.,
yourdomain.com). - Railway will show you DNS records to add (CNAME or A record).
- Go to GoDaddy >
My Products>DNSfor your domain. - Add the DNS records provided by Railway.
- Save changes.
- This can take a few minutes to a few hours.
- Once done, Railway will show your domain as
Active. - Your site is now live at your custom domain!
- Change Project Info: Edit the
projectsarray inclient/src/components/projects.tsx. - Change Images: Replace or add images in
attached_assets/and update imports. - Change Contact Email: Update the email in your Google Apps Script code.
- Change Text/Content: Edit the relevant files in
client/src/components/andclient/src/pages/. - Add More Languages: Update the language context and translation files.
Q: The contact form doesn't work!
- Make sure your Google Apps Script is deployed as a Web App with
Anyoneaccess. - Double-check the URL in your React code.
- Check your browser's console for errors.
- Make sure CORS headers are set in your Apps Script.
Q: My domain isn't working!
- Wait for DNS propagation (can take up to 24 hours).
- Double-check DNS records in GoDaddy.
- Make sure the domain is added in Railway.
Q: How do I update the site?
- Make changes locally, commit and push to GitHub. Railway will auto-deploy.
- UI: React, Tailwind CSS
- Hosting: Railway
- Domain: GoDaddy
- Backendless forms: Google Apps Script