-
Notifications
You must be signed in to change notification settings - Fork 76
Closed
Labels
Description
📘 Issue: Implement Search & Filter Results Page (/search/page.tsx)
🎯 Objectives
Design and implement a fully functional search results page where users can explore properties based on filters like price, amenities, type, and rating. This page should also include an interactive map showing the locations of properties.
🔍 Technical Steps
- Create the
/search/page.tsxfile under the appropriate route in the Next.js app. - Implement a pre-filled search bar showing the user's selected location, dates, and guests.
- Add a sidebar with filters:
- Price range (e.g., slider)
- Property type (dropdown or checkboxes)
- Amenities (wifi, pool, pets, etc.)
- Rating (stars)
- Availability calendar (optional)
- Implement sorting options:
- Price (low to high, high to low)
- Rating
- Distance
- Newest
- Create a property card grid to show search results:
- Title, image, price in USDC, rating, location
- CTA: "View Details"
- Implement infinite scroll or lazy loading for better UX.
- Integrate Mapbox or Google Maps for location-based visual filtering:
- Show pins for each property
- Zoom/drag interaction filters visible results
- Make the layout fully responsive.
✅ Acceptance Criteria
Functionality
- Search page accessible via
/search - Results show based on query params (location, guests, dates)
- Sidebar filters update the grid in real-time (or with Apply button)
- Sorting works and is visible
- Clicking on a property redirects to its detail page
- Map interaction dynamically affects the property list (if enabled)
Security
- Sanitize and validate all search inputs
- Prevent injection or malformed query parameters
- Ensure map data and API keys are securely handled
UX/UI
- Fully responsive layout
- Mobile-first design
- Smooth, subtle animations
- Clear visual hierarchy and consistent spacing
- Dark/Light Mode Support:
- Font: Quicksand used across all sections
- In light mode:
- Background:
#CFF0FF - Text color:
#182A47 - CTA buttons should contrast well with the background (e.g., deep blue or dark teal)
- Background:
- In dark mode:
- Background:
#0B1D39 - Text color:
#C2F2FF - Components (search bar, cards, filters) must adapt using
dark:variants in Tailwind
- Background:
- Theme switching handled via
next-themes
Code Quality
- Proper use of TypeScript with strict types
- Use of reusable components (
PropertyCard,SearchBar,FilterSidebar) - Clean separation of concerns: logic vs UI
- Follows ESLint and Prettier rules
🧪 Test Scenarios
- User enters
/search?location=BuenosAires&guests=2&dates=...and sees pre-filled fields - User filters by price and sees grid update
- User selects a property and gets redirected to
/properties/:id - Dark mode renders properly
- Infinite scroll loads more results as user scrolls
- Map interaction updates visible properties
🌎 References
- Airbnb search page UX
- Mapbox GL JS docs
- Tailwind dark mode best practices
🔒 Security Requirements
- Sanitize all query strings and filter inputs
- Limit max results per fetch to avoid DoS
- Secure map API keys via env variables
🛠️ Technologies Used
- Next.js (next)
- TailwindCSS (tailwindcss, @tailwindcss/postcss, tailwind-merge)
- tw-animate-css (extension for animations in TailwindCSS)
- Lucide-react (icons)
- Next-themes (dark/light mode in Next.js)
- Zod (validation)
- @simplewebauthn/browser (WebAuthn authentication)
- @stellar/stellar-sdk (interaction with the Stellar blockchain)
- base64url, bigint-conversion, cbor-x (utilities for handling cryptographic data)
- clsx, class-variance-authority (helpers for conditional CSS classes)
- TypeScript (typescript, React and Node types)
- ESLint (eslint, eslint-config-next, @eslint/eslintrc) (linter for best practices)
- shadcn/ui (UI components built with Tailwind and Radix UI)
I’ve attached an example of the expected appearance, followed by a visual guide. This document is not purely textual, suggestions for design improvements and creative input are encouraged and appreciated.

Reactions are currently unavailable