Skip to content

Commit 642a363

Browse files
Merge pull request #782 from decentraland/feat/re-discovery-changes
feat: add SDK version support to places and destinations
2 parents 5132fa9 + 2828d76 commit 642a363

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1715
-76
lines changed

README.md

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -132,26 +132,27 @@ Create a `.env.development` file in the project root with the following variable
132132

133133
#### Optional Environment Variables
134134

135-
| Variable | Description | Default | Example |
136-
| ---------------------------------- | --------------------------------------------- | ------------------------------------ | ----------------------------------------- |
137-
| `AWS_ENDPOINT` | AWS endpoint override (for LocalStack) | - | `http://localhost:4566` |
138-
| `AWS_ACCESS_KEY` | AWS access key for S3 report uploads | - | `AKIA...` |
139-
| `AWS_ACCESS_SECRET` | AWS secret key for S3 report uploads | - | `xxx...` |
140-
| `AWS_BUCKET_NAME` | S3 bucket name for content moderation reports | - | `content-moderation-bucket` |
141-
| `BOOTSTRAP_USER` | Initial admin user wallet address | - | `0x...` |
142-
| `BOOTSTRAP_CATALYST` | Default Catalyst server URL | - | `https://peer.decentraland.org` |
143-
| `PLACES_URL` | Places API base URL | - | `https://localhost:8000/api` |
144-
| `PLACES_ROOT_URL` | Places frontend base URL | - | `https://localhost:8000` |
145-
| `PLACES_BASE_URL` | Public-facing places URL | `https://decentraland.org/places` | - |
146-
| `DECENTRALAND_URL` | Decentraland play URL | - | `https://play.decentraland.org` |
147-
| `PROFILE_URL` | Content server URL for profiles | `https://peer.decentraland.org` | - |
148-
| `REALM_PROVIDER_URL` | Realm provider API for hot scenes data | - | `https://realm-provider.decentraland.org` |
149-
| `DATA_TEAM_URL` | Data team CDN URL for stats | `https://cdn-data.decentraland.org/` | - |
150-
| `CATALYST_URL` | Default Catalyst API URL | - | `https://peer.decentraland.org` |
151-
| `SLACK_WEBHOOK` | Slack webhook for notifications | - | `https://hooks.slack.com/...` |
152-
| `CONTENT_MODERATION_SLACK_WEBHOOK` | Slack webhook for moderation alerts | - | `https://hooks.slack.com/...` |
153-
| `ADMIN_ADDRESSES` | Comma-separated admin wallet addresses | - | `0x...,0x...` |
154-
| `NEW_ROLLOUT` | Enable new features rollout | `false` | `true` |
135+
| Variable | Description | Default | Example |
136+
| ---------------------------------- | --------------------------------------------- | ------------------------------------------- | -------------------------------------------- |
137+
| `AWS_ENDPOINT` | AWS endpoint override (for LocalStack) | - | `http://localhost:4566` |
138+
| `AWS_ACCESS_KEY` | AWS access key for S3 report uploads | - | `AKIA...` |
139+
| `AWS_ACCESS_SECRET` | AWS secret key for S3 report uploads | - | `xxx...` |
140+
| `AWS_BUCKET_NAME` | S3 bucket name for content moderation reports | - | `content-moderation-bucket` |
141+
| `BOOTSTRAP_USER` | Initial admin user wallet address | - | `0x...` |
142+
| `BOOTSTRAP_CATALYST` | Default Catalyst server URL | - | `https://peer.decentraland.org` |
143+
| `PLACES_URL` | Places API base URL | - | `https://localhost:8000/api` |
144+
| `PLACES_ROOT_URL` | Places frontend base URL | - | `https://localhost:8000` |
145+
| `PLACES_BASE_URL` | Public-facing places URL | `https://decentraland.org/places` | - |
146+
| `DECENTRALAND_URL` | Decentraland play URL | - | `https://play.decentraland.org` |
147+
| `PROFILE_URL` | Content server URL for profiles | `https://peer.decentraland.org` | - |
148+
| `REALM_PROVIDER_URL` | Realm provider API for hot scenes data | - | `https://realm-provider.decentraland.org` |
149+
| `DATA_TEAM_URL` | Data team CDN URL for stats | `https://cdn-data.decentraland.org/` | - |
150+
| `CATALYST_URL` | Default Catalyst API URL | - | `https://peer.decentraland.org` |
151+
| `COMMS_GATEKEEPER_URL` | Comms Gatekeeper API for connected users | `https://comms-gatekeeper.decentraland.org` | `https://comms-gatekeeper.decentraland.zone` |
152+
| `SLACK_WEBHOOK` | Slack webhook for notifications | - | `https://hooks.slack.com/...` |
153+
| `CONTENT_MODERATION_SLACK_WEBHOOK` | Slack webhook for moderation alerts | - | `https://hooks.slack.com/...` |
154+
| `ADMIN_ADDRESSES` | Comma-separated admin wallet addresses | - | `0x...,0x...` |
155+
| `NEW_ROLLOUT` | Enable new features rollout | `false` | `true` |
155156

156157
#### Gatsby-Specific Variables
157158

docs/ai-agent-context.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,22 @@ The Decentraland Places service is a comprehensive API solution for discovering,
6262
- **User Visits**: Unique users who visited a place in the last 30 days
6363
- **Highlighted Places**: Featured places with special promotion status
6464
- **Creator Address**: Ethereum address of the scene creator, extracted from scene metadata during deployment processing, indexed for efficient creator-based queries (used by tipping systems)
65+
- **SDK Version**: Runtime version extracted from `runtimeVersion` in scene.json during deployment, used for filtering scenes by SDK version (e.g., SDK7 vs legacy)
6566

6667
## API Specification
6768

6869
The service exposes a REST API under `/api` with comprehensive documentation in [OpenAPI 3.0 format](openapi.yaml). Key endpoint categories:
6970

7071
- **Places**: `/api/places`, `/api/places/:id`, `/api/places/status`, `/api/places/:id/categories`, `/api/places/:id/rating`
7172
- **Worlds**: `/api/worlds`, `/api/world_names`
73+
- **Destinations**: `/api/destinations` (combined places + worlds with enhanced filtering including SDK version and LIKE name matching; highlighted items are always returned first, followed by ranking value, then by specified sort order)
7274
- **Map**: `/api/map`, `/api/map/places` (coordinate-based queries with higher limits)
7375
- **Categories**: `/api/categories` (with optional `target` filter for places/worlds/all)
7476
- **Interactions**: `/api/places/:id/likes`, `/api/places/:id/favorites` (authentication required)
7577
- **Reports**: `/api/report` (authentication required, returns S3 signed URL)
7678
- **Social**: `/places/place/`, `/places/world/` (metadata injection for social sharing)
7779
- **Creator Queries**: `/api/places?creator_address=0x...` (lookup places by scene creator for tipping integration)
80+
- **SDK Filtering**: `/api/places?sdk=7` (filter by SDK version, exact match)
7881

7982
**Authentication**: Bearer token authentication using Decentraland wallet signatures. Admin endpoints require additional permissions.
8083

@@ -93,7 +96,7 @@ The service exposes a REST API under `/api` with comprehensive documentation in
9396

9497
**Key Tables**:
9598

96-
- `places`: Main table with UUID, title, description, positions[], base_position, owner, creator_address, content_rating, disabled, user_count, user_visits, like metrics
99+
- `places`: Main table with UUID, title, description, positions[], base_position, owner, creator_address, sdk, content_rating, disabled, user_count, user_visits, like metrics
97100
- `users`: Registered users with Ethereum addresses and permissions
98101
- `categories`: Place categories with name, active status, i18n translations
99102
- `place_categories`: Many-to-many relationships between places and categories

docs/database-schemas.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ erDiagram
3434
timestamptz deployed_at
3535
tsvector textsearch
3636
numeric like_score
37+
text sdk
3738
}
3839
3940
users {
@@ -131,6 +132,7 @@ Main table containing all places (scenes in Genesis City and Decentraland Worlds
131132
| favorites | INTEGER | NO | 0 | Count of user favorites |
132133
| like_rate | NUMERIC | YES | NULL | Computed like rate percentage (not VP-weighted) |
133134
| like_score | NUMERIC | YES | NULL | Computed VP-weighted like score for ranking (0-1) |
135+
| ranking | FLOAT | YES | 0 | External ranking value for custom ordering |
134136
| highlighted | BOOLEAN | NO | false | Featured place flag for promotion |
135137
| disabled | BOOLEAN | NO | false | Soft delete flag (hidden from public listing) |
136138
| disabled_at | TIMESTAMPTZ | YES | NULL | When the place was disabled |
@@ -139,6 +141,7 @@ Main table containing all places (scenes in Genesis City and Decentraland Worlds
139141
| deployed_at | TIMESTAMPTZ | NO | now() | When the place was last deployed |
140142
| textsearch | TSVECTOR | YES | NULL | Full-text search vector for title, description, owner |
141143
| categories | VARCHAR(50)[] | NO | {} | Array of category names (denormalized for performance) |
144+
| sdk | TEXT | YES | NULL | SDK/runtime version from scene.json runtimeVersion field (e.g., "7") |
142145
| created_at | TIMESTAMPTZ | NO | now() | Record creation timestamp |
143146
| updated_at | TIMESTAMPTZ | NO | now() | Last update timestamp |
144147

@@ -171,6 +174,7 @@ Main table containing all places (scenes in Genesis City and Decentraland Worlds
171174
- **Categories Denormalization**: The `categories` array is denormalized from `place_categories` for query performance
172175
- **World vs Scene**: `world=true` places use `world_name` for identification, `world=false` places use `positions` and `base_position`
173176
- **Creator Address**: Extracted from scene metadata during deployment processing, used for creator-based queries (e.g., tipping system integration)
177+
- **SDK Version**: Extracted from `runtimeVersion` in scene.json during deployment, used for filtering by SDK version (e.g., SDK7 scenes)
174178

175179
---
176180

0 commit comments

Comments
 (0)