Running the Development Server
The Adosa Real Estate website is built with Astro. Here’s how to get started:Install Dependencies
First, navigate to the source directory and install all required packages:This will install:
- Astro 5.16.5
- GSAP 3.14.2 for animations
- Lenis 1.3.16 for smooth scrolling
- Leaflet for maps
- QRCode generation library
Start Development Server
Run the development server with hot reload:The site will be available at
http://localhost:4321The dev server supports hot module replacement (HMR) - changes to
.astro, .ts, and .css files will automatically reload in your browser.Development Workflow Best Practices
File Organization
The project follows Astro’s standard structure:Hot Reload Behavior
What triggers hot reload:.astrocomponent changes- TypeScript/JavaScript file updates
- CSS modifications
- Changes to files in
src/
- Changes to
astro.config.mjs - Environment variable updates
- New package installations
- Changes to
public/directory assets
Debugging Tips
Browser DevTools
The project includes specific debugging hooks:Common Issues
Animations not working
Animations not working
Check that GSAP ScrollTrigger is properly initialized:Verify that the element has the correct class (
.text-reveal or .text-swipe).Smooth scrolling not enabled
Smooth scrolling not enabled
Lenis is only active on desktop (>1024px). On mobile/tablet, native scroll is used for better performance.Check:
src/layouts/BaseLayout.astro:85-108Property data not loading
Property data not loading
The API integration fetches from eGO API. Check:
- API credentials are configured
- Network connectivity
- Console for error messages
src/services/api/properties.ts:18-71for rate limiting delays
Build fails with empty properties
Build fails with empty properties
The build includes a safety guard at This prevents deploying an empty site. Check API connectivity.
src/services/api/properties.ts:59-61:TypeScript Type Checking
Run type checking separately:Environment Configuration
The project usesastro.config.mjs for configuration:
Performance Monitoring
During development, monitor:- Bundle size: Check the build output for file sizes
- Animation performance: Open Chrome DevTools > Performance tab
- Scroll performance: Enable “Paint flashing” in DevTools to see repaints
- API response times: Check Network tab for
/v1/Propertiesrequests
Next Steps
Adding Components
Learn how to create new Astro components
Working with Properties
Understand the property data structure
Customizing Animations
Modify GSAP animations and scroll effects
API Reference
Explore the PropertyService API