Getting Started
This guide will help you get the Adosa Real Estate website up and running locally, and make your first customization.Start the Development Server
Launch the local development server using your preferred package manager:You should see output similar to:
The development server runs on port 4321 by default. Your site will be available at
http://localhost:4321.Open Your Browser
Navigate to
http://localhost:4321 in your web browser. You should see the Adosa Real Estate homepage with:- A video hero section with beach footage
- Navigation menu at the top
- Smooth scroll animations (on desktop)
- Team member profiles
- Properties section
The site supports both Spanish (
/) and English (/en) routes. The default language is Spanish.Your First Customization
Let’s make a simple change to the theme colors to see how easy it is to customize the site.Modify the Color Scheme
The Adosa brand uses a premium color palette defined in CSS custom properties. Let’s change the accent color:Original colors:Try changing the accent color (
src/styles/theme.css
--color-3) to a different shade:src/styles/theme.css
See the Changes
Save the file and check your browser. Astro’s hot module replacement (HMR) will automatically reload the page with your new color scheme.The accent color (
--color-3) is used throughout the site for:- Hover states on navigation links
- Team member role labels
- Interactive elements
Changes to CSS files trigger instant updates without a full page reload, making styling iterations very fast.
Customize the Hero Section
Let’s make a more substantial change by customizing the hero section text.Update the Hero Text
Find the hero title and subtitle around line 18-23:Change it to something more specific:
src/pages/[...lang]/index.astro
src/pages/[...lang]/index.astro
Understanding the Tech Stack
Astro Framework
Modern static site generator with optimal performance and zero JS by default
GSAP Animations
Professional-grade animations with ScrollTrigger for scroll-based effects
Lenis Smooth Scroll
Premium smooth scrolling experience (desktop only)
TypeScript
Type-safe development with full IDE support
Available Commands
Here are all the commands you can run from the project root:| Command | Action |
|---|---|
npm run dev | Starts development server at localhost:4321 |
npm run build | Builds production site to ./dist/ |
npm run preview | Previews your build locally before deploying |
npm run astro | Run Astro CLI commands |
npm run astro -- --help | Get help using the Astro CLI |
The project uses Astro 5 with the strict TypeScript configuration. Type checking is performed automatically during builds.
Common Development Tasks
Adding a New Page
Pages are automatically routed based on their file location insrc/pages/[...lang]/:
Working with Components
Reusable components are insrc/components/. For example, the Navigation component:
src/components/Navigation.astro
Modifying Styles
Global styles are organized insrc/styles/:
theme.css- Color palette and typography variablesglobal.css- Base styles and resetsanimations.css- Animation keyframes and utilities
Performance Features
Smooth Scrolling
Smooth Scrolling
Lenis smooth scroll is only enabled on desktop (>1024px) to preserve native touch scrolling performance on mobile devices.
src/layouts/BaseLayout.astro
Animation System
Animation System
GSAP ScrollTrigger animations are conditionally applied based on viewport size using
matchMedia:Image Optimization
Image Optimization
Static assets in
public/ are served directly. Consider using Astro’s Image component for automatic optimization:Page Transitions
Page Transitions
Custom fade transitions between pages using a white overlay animation (600ms duration).
Troubleshooting
Port 4321 already in use
Port 4321 already in use
If you see an error about the port being in use:
GSAP animations not working
GSAP animations not working
GSAP must be processed during SSR. Verify your
astro.config.mjs includes:TypeScript errors
TypeScript errors
Run type checking manually:
Styles not updating
Styles not updating
Clear Astro’s cache:
Next Steps
Components
Explore the available UI components
Theme Configuration
Deep dive into customizing the theme
Internationalization
Learn about the Spanish/English translation system
Deployment
Deploy your site to production