Property Listing Management
The Kenya Estates platform empowers registered users, particularly real estate agents and property owners, to manage their property listings effectively. This section details the functionalities available for creating, viewing, updating, and deleting property listings.
1. Accessing Listing Management
Users typically access their property listing management tools through a dedicated section in their user dashboard.
- Dashboard Link: A navigation item like "My Properties," "Listings," or "Manage Listings" within the user dashboard.
Relevant files: app/dashboard/properties/page.tsx
, components/dashboard/dashboard-nav.tsx
.
2. Creating a New Property Listing
The platform provides a comprehensive form for users to submit new property details.
- Create Listing Page/Modal: Accessed via a "Create New Listing," "Add Property," or similar button. (See
app/properties/create/page.tsx
orapp/dashboard/properties/create/page.tsx
if it exists). - Property Details Form: A multi-step or single-page form to input all necessary information. (See
components/dashboard/property-create-form.tsx
). This typically includes:- Basic Information: Title, Description, Property Type (e.g., Apartment, House), Transaction Type (Sale/Rent), Price.
- Location: Address, City, County, Neighborhood, Map coordinates.
- Property Specifics: Number of bedrooms, bathrooms, total area (sq ft/sq m), plot size.
- Features & Amenities: Selection of available features like parking, swimming pool, security, etc. (See
components/dashboard/property-features-select.tsx
). - Media Upload: Photos, videos, virtual tours, floor plans. (See
components/dashboard/property-media-upload.tsx
). - Contact Information: How interested parties can get in touch.
- Brochure Text Extraction (AI Feature): Users might be able to upload a property brochure (PDF/DOCX), and the system uses AI to extract relevant text to pre-fill parts of the form. (See
app/api/brochure-extract-text/route.ts
,components/dashboard/brochure-data-refinement-modal.tsx
). - Submission & Validation: Upon submission, data is validated, and the new listing is created in the database.
Relevant files: app/properties/create/page.tsx
, components/dashboard/property-create-form.tsx
, app/actions/property-actions.ts
(handles creation logic).
3. Viewing and Managing Existing Listings
Users can view a list of their own properties and perform actions on them.
- My Properties Page: A dashboard page listing all properties created by the user. (See
app/dashboard/properties/page.tsx
). - Listing Overview: Each property in the list typically shows key details (name, price, status) and provides options to edit or delete.
- Listing Status: Properties might have statuses like "Active," "Pending Review," "Sold," "Rented," or "Inactive."
4. Updating a Property Listing
Users can modify the details of their existing listings.
- Edit Option: An "Edit" button or link associated with each listing.
- Edit Form: Similar to the creation form, pre-filled with the existing property data, allowing users to make changes.
- Saving Changes: Updated information is saved to the database.
Relevant files: The edit form might reuse components/dashboard/property-create-form.tsx
or a similar component. Update logic is in app/actions/property-actions.ts
.
5. Deleting a Property Listing
Users can remove their listings from the platform.
- Delete Option: A "Delete" button or link, often with a confirmation step to prevent accidental deletion. (See
components/property-delete-button.tsx
). - Data Handling: Deletion might involve soft-deleting (marking as inactive) or hard-deleting the record from the database, depending on the platform's data retention policies.
Relevant files: components/property-delete-button.tsx
, app/actions/property-actions.ts
(handles deletion logic).
6. Technical Implementation Highlights
- User Authorization: Ensures that only the owner of a listing (or an admin) can edit or delete it. This is typically enforced via Row Level Security (RLS) in Supabase and server-side checks in actions.
- Data Validation: Both client-side and server-side validation (e.g., using Zod schemas) ensure data integrity.
- Image/Media Handling: Uploaded media files are usually stored in a cloud storage service (like Supabase Storage), and references (URLs) are saved in the database.
- Database Schema: The
properties
table in the database holds all listing information, linked to theusers
table (for ownership) and potentially other tables for features, types, etc. (Seetypes/property.ts
,types/supabase.ts
).
Effective property listing management is crucial for a real estate platform, providing the tools necessary for users to showcase their properties to potential buyers or renters.