Skip to content

Display List of Available Properties #9

@respp

Description

@respp

📘 Issue Description

Create a /properties page in the frontend to display all available properties by fetching them from the backend’s GET /properties endpoint, respecting the StellarRent monorepo structure.

🔍 Steps

  1. In apps/web/src/pages/properties.tsx, create a /properties page.
  2. In apps/web/src/components/features/, create a PropertyList.tsx component to display a list of properties.
  3. In apps/web/src/services/api.ts, create a getProperties function that makes a GET request to the /properties endpoint using fetch.
  4. In apps/web/src/pages/properties.tsx, use the PropertyList component and the getProperties function to display the properties.

✅ Acceptance Criteria

  • The user can navigate to /properties and see a list of all available properties.
  • Each property displays its title, description, price, and the owner’s name.
  • If there are no properties, an empty list or a message like "No properties available" is shown.
  • The design uses TailwindCSS for a clear and readable layout.
  • If there’s an error fetching properties, an error message is displayed.

🌎 References

📜 Additional Notes

  • This page does not require authentication since it’s a public listing.
  • In the future, add a link on each property to a /properties/[id] page for more details or to initiate a rental request.
  • Document the component in apps/web/docs/.

🛠️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.

Image

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions