> ## Documentation Index
> Fetch the complete documentation index at: https://memberpulseptyltd.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Directory Management

> Manage business directory listings and company profiles

Manage the business directory where member companies can list their services and connect with other members.

## Capabilities

| Action            | ROLE\_CLIENT\_ADMIN | ROLE\_CLIENT\_USER |
| ----------------- | ------------------- | ------------------ |
| View listings     | ✅                   | ✅                  |
| Approve listings  | ✅                   | ❌                  |
| Edit listings     | ✅                   | ❌                  |
| Manage categories | ✅                   | ❌                  |
| Feature listings  | ✅                   | ❌                  |

## Features

### Listing Approval Workflow

```
Submitted → Pending Review → Approved/Rejected → Published
```

#### Acceptance Criteria

##### Frontend

* [ ] UI supports the workflows described in this feature.

##### Backend / API

* [ ] Backend behavior supports this feature as documented.

##### Permissions

* [ ] Access is restricted per the Capabilities matrix on this page (or equivalent role rules).

##### Business Rules

* [ ] All business rules for this feature are enforced.

##### Error Handling

* [ ] Error states return clear messages and appropriate HTTP status codes.

### Directory Categories

* Industry verticals
* Service types
* Geographic regions
* Company size

#### Acceptance Criteria

##### Frontend

* [ ] UI supports the workflows described in this feature.

##### Backend / API

* [ ] Backend behavior supports this feature as documented.

##### Permissions

* [ ] Access is restricted per the Capabilities matrix on this page (or equivalent role rules).

##### Business Rules

* [ ] All business rules for this feature are enforced.

##### Error Handling

* [ ] Error states return clear messages and appropriate HTTP status codes.

### Featured Listings

* Promote select companies
* Homepage placement
* Priority in search results

#### Acceptance Criteria

##### Frontend

* [ ] UI supports the workflows described in this feature.

##### Backend / API

* [ ] Backend behavior supports this feature as documented.

##### Permissions

* [ ] Access is restricted per the Capabilities matrix on this page (or equivalent role rules).

##### Business Rules

* [ ] All business rules for this feature are enforced.

##### Error Handling

* [ ] Error states return clear messages and appropriate HTTP status codes.

### Map & Location Search

The directory can support Google Maps-style browsing and store-locator searches.

Expected configuration:

* Enable/disable map view in the Directory
* Ensure listings capture a valid address and store geocoded coordinates (lat/lng)
* Optionally configure default radius options and map zoom behavior

#### Acceptance Criteria

##### Frontend

* [ ] Admin UI can see whether a listing has valid geocoding (lat/lng) and prompt for address fixes.

##### Backend / API

* [ ] Listings persist geocoded location data and expose it to member directory search.

##### Permissions

* [ ] Only `ROLE_CLIENT_ADMIN` can configure map/search settings.

##### Business Rules

* [ ] Listings without valid geocoding can still appear in list search but are excluded from map pins.

##### Error Handling

* [ ] Geocoding failures are surfaced clearly and retriable.

## Implementation Contracts

### Backend (API)

```
GET    /api/directory/listings               # List all
GET    /api/directory/listings/pending       # Pending approval
PUT    /api/directory/listings/{id}/approve  # Approve
PUT    /api/directory/listings/{id}/reject   # Reject
PUT    /api/directory/listings/{id}/feature  # Feature listing

GET    /api/directory/categories             # List categories
POST   /api/directory/categories             # Create category
```
