Skip to content

feat(apps): create example apps for demo #597

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: 07-28-feat_add_intent_resolution
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ stats
docs
.vitest-reports

.auth
.auth
.sanity
29 changes: 29 additions & 0 deletions apps/property-detail-app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# Dependencies
/node_modules
/.pnp
.pnp.js

# Compiled Sanity Studio
/dist

# Temporary Sanity runtime, generated by the CLI on every dev server start
/.sanity

# Logs
/logs
*.log

# Coverage directory used by testing tools
/coverage

# Misc
.DS_Store
*.pem

# Typescript
*.tsbuildinfo

# Dotenv and similar local-only files
*.local
4 changes: 4 additions & 0 deletions apps/property-detail-app/.lintstagedrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// @ts-check
import baseConfig from '../../.lintstagedrc.mjs'

export default baseConfig
16 changes: 16 additions & 0 deletions apps/property-detail-app/_intents/completeAllTasks.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// import { defineIntent } from "@sanity/sdk";

// some .cjs and esm issues with the old CLI, but we do have this helper
// export default defineIntent({

export default {
id: 'completeAllTasks',
action: 'edit',
title: 'Complete All Maintenance Tasks',
filters: [
{
types: ['property', 'maintenanceSchedule'],
},
],
description: 'Bulk complete all tasks for a maintenance schedule without loading the main app',
}
16 changes: 16 additions & 0 deletions apps/property-detail-app/_intents/maintenanceList.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// import { defineIntent } from "@sanity/sdk";

// some .cjs and esm issues with the old CLI, but we do have this helper
// export default defineIntent({

export default {
id: 'maintenanceList',
action: 'edit',
title: 'Maintenance List',
filters: [
{
types: ['property'],
},
],
description: 'View and update the maintenance list for a property',
}
27 changes: 27 additions & 0 deletions apps/property-detail-app/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// @ts-check
import baseESLintConfig from '@repo/config-eslint'
import reactConfig from '@repo/config-eslint/react'

export default [
{
ignores: [
'.DS_Store',
'**/node_modules',
'**/build',
'**/dist',
'.env',
'.env.*',
'!.env.example',

// Ignore files for PNPM, NPM and YARN
'pnpm-lock.yaml',
'package-lock.json',
'yarn.lock',

// Ignore files for Sanity TypeGen
'sanity.types.ts',
],
},
...baseESLintConfig,
...reactConfig,
]
39 changes: 39 additions & 0 deletions apps/property-detail-app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "property-detail-app",
"version": "1.0.0",
"private": true,
"keywords": [
"sanity"
],
"license": "UNLICENSED",
"type": "module",
"main": "package.json",
"scripts": {
"build": "sanity build",
"dev": "sanity dev",
"lint": "eslint .",
"start": "sanity start",
"tsc": "tsc --noEmit"
},
"prettier": "@sanity/prettier-config",
"dependencies": {
"@sanity/sdk-react": "workspace:*",
"react": "^19",
"react-dom": "^19",
"react-router": "^7.5.2",
"styled-components": "^6.1.15"
},
"devDependencies": {
"@repo/config-eslint": "workspace:*",
"@repo/tsconfig": "workspace:*",
"@sanity/prettier-config": "^1.0.3",
"@sanity/sdk": "workspace:*",
"@types/react": "^19",
"@types/react-dom": "^19.1.2",
"eslint": "^9.25.1",
"prettier": "^3.5.3",
"sanity": "^3",
"typescript": "^5.1.6",
"vite": "^6.3.3"
}
}
9 changes: 9 additions & 0 deletions apps/property-detail-app/sanity.cli.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import {defineCliConfig} from 'sanity/cli'

export default defineCliConfig({
app: {
organizationId: 'oF5P8QpKU',
entry: './src/App.tsx',
id: 'uxq5o822rvrg62hyxu16l800',
},
})
Loading
Loading