create-sidekick-app 0.0.1 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +202 -0
- package/NOTICE +27 -0
- package/README.md +29 -2
- package/dist/index.js +59 -0
- package/package.json +65 -4
- package/template/base/ai-chat/.env.example +6 -0
- package/template/base/ai-chat/.prettierignore +2 -0
- package/template/base/ai-chat/.prettierrc.json +5 -0
- package/template/base/ai-chat/README.md +38 -0
- package/template/base/ai-chat/_gitignore +41 -0
- package/template/base/ai-chat/components.json +23 -0
- package/template/base/ai-chat/next.config.ts +5 -0
- package/template/base/ai-chat/package.json +61 -0
- package/template/base/ai-chat/postcss.config.mjs +5 -0
- package/template/base/ai-chat/src/app/api/chat/route.ts +141 -0
- package/template/base/ai-chat/src/app/api/instant/route.ts +5 -0
- package/template/base/ai-chat/src/app/chat/[id]/page.tsx +20 -0
- package/template/base/ai-chat/src/app/globals.css +124 -0
- package/template/base/ai-chat/src/app/layout.tsx +34 -0
- package/template/base/ai-chat/src/app/page.tsx +6 -0
- package/template/base/ai-chat/src/components/AuthGate.tsx +15 -0
- package/template/base/ai-chat/src/components/Chat.tsx +228 -0
- package/template/base/ai-chat/src/components/InstantProvider.tsx +18 -0
- package/template/base/ai-chat/src/components/Login.tsx +163 -0
- package/template/base/ai-chat/src/components/Sidebar.tsx +100 -0
- package/template/base/ai-chat/src/components/ai-elements/agent.tsx +142 -0
- package/template/base/ai-chat/src/components/ai-elements/artifact.tsx +149 -0
- package/template/base/ai-chat/src/components/ai-elements/attachments.tsx +427 -0
- package/template/base/ai-chat/src/components/ai-elements/audio-player.tsx +229 -0
- package/template/base/ai-chat/src/components/ai-elements/canvas.tsx +26 -0
- package/template/base/ai-chat/src/components/ai-elements/chain-of-thought.tsx +223 -0
- package/template/base/ai-chat/src/components/ai-elements/checkpoint.tsx +72 -0
- package/template/base/ai-chat/src/components/ai-elements/code-block.tsx +556 -0
- package/template/base/ai-chat/src/components/ai-elements/commit.tsx +449 -0
- package/template/base/ai-chat/src/components/ai-elements/confirmation.tsx +173 -0
- package/template/base/ai-chat/src/components/ai-elements/connection.tsx +28 -0
- package/template/base/ai-chat/src/components/ai-elements/context.tsx +410 -0
- package/template/base/ai-chat/src/components/ai-elements/controls.tsx +19 -0
- package/template/base/ai-chat/src/components/ai-elements/conversation.tsx +167 -0
- package/template/base/ai-chat/src/components/ai-elements/edge.tsx +144 -0
- package/template/base/ai-chat/src/components/ai-elements/environment-variables.tsx +325 -0
- package/template/base/ai-chat/src/components/ai-elements/file-tree.tsx +298 -0
- package/template/base/ai-chat/src/components/ai-elements/image.tsx +25 -0
- package/template/base/ai-chat/src/components/ai-elements/inline-citation.tsx +294 -0
- package/template/base/ai-chat/src/components/ai-elements/jsx-preview.tsx +250 -0
- package/template/base/ai-chat/src/components/ai-elements/message.tsx +356 -0
- package/template/base/ai-chat/src/components/ai-elements/mic-selector.tsx +372 -0
- package/template/base/ai-chat/src/components/ai-elements/model-selector.tsx +214 -0
- package/template/base/ai-chat/src/components/ai-elements/node.tsx +72 -0
- package/template/base/ai-chat/src/components/ai-elements/open-in-chat.tsx +367 -0
- package/template/base/ai-chat/src/components/ai-elements/package-info.tsx +235 -0
- package/template/base/ai-chat/src/components/ai-elements/panel.tsx +16 -0
- package/template/base/ai-chat/src/components/ai-elements/persona.tsx +280 -0
- package/template/base/ai-chat/src/components/ai-elements/plan.tsx +144 -0
- package/template/base/ai-chat/src/components/ai-elements/prompt-input.tsx +1341 -0
- package/template/base/ai-chat/src/components/ai-elements/queue.tsx +275 -0
- package/template/base/ai-chat/src/components/ai-elements/reasoning.tsx +229 -0
- package/template/base/ai-chat/src/components/ai-elements/sandbox.tsx +128 -0
- package/template/base/ai-chat/src/components/ai-elements/schema-display.tsx +473 -0
- package/template/base/ai-chat/src/components/ai-elements/shimmer.tsx +78 -0
- package/template/base/ai-chat/src/components/ai-elements/snippet.tsx +141 -0
- package/template/base/ai-chat/src/components/ai-elements/sources.tsx +78 -0
- package/template/base/ai-chat/src/components/ai-elements/speech-input.tsx +324 -0
- package/template/base/ai-chat/src/components/ai-elements/stack-trace.tsx +531 -0
- package/template/base/ai-chat/src/components/ai-elements/suggestion.tsx +55 -0
- package/template/base/ai-chat/src/components/ai-elements/task.tsx +88 -0
- package/template/base/ai-chat/src/components/ai-elements/terminal.tsx +277 -0
- package/template/base/ai-chat/src/components/ai-elements/test-results.tsx +497 -0
- package/template/base/ai-chat/src/components/ai-elements/tool.tsx +174 -0
- package/template/base/ai-chat/src/components/ai-elements/toolbar.tsx +17 -0
- package/template/base/ai-chat/src/components/ai-elements/transcription.tsx +126 -0
- package/template/base/ai-chat/src/components/ai-elements/voice-selector.tsx +525 -0
- package/template/base/ai-chat/src/components/ai-elements/web-preview.tsx +282 -0
- package/template/base/ai-chat/src/components/ui/accordion.tsx +66 -0
- package/template/base/ai-chat/src/components/ui/alert.tsx +66 -0
- package/template/base/ai-chat/src/components/ui/avatar.tsx +109 -0
- package/template/base/ai-chat/src/components/ui/badge.tsx +48 -0
- package/template/base/ai-chat/src/components/ui/button-group.tsx +83 -0
- package/template/base/ai-chat/src/components/ui/button.tsx +64 -0
- package/template/base/ai-chat/src/components/ui/card.tsx +92 -0
- package/template/base/ai-chat/src/components/ui/carousel.tsx +241 -0
- package/template/base/ai-chat/src/components/ui/collapsible.tsx +33 -0
- package/template/base/ai-chat/src/components/ui/command.tsx +184 -0
- package/template/base/ai-chat/src/components/ui/dialog.tsx +158 -0
- package/template/base/ai-chat/src/components/ui/dropdown-menu.tsx +257 -0
- package/template/base/ai-chat/src/components/ui/hover-card.tsx +44 -0
- package/template/base/ai-chat/src/components/ui/input-group.tsx +170 -0
- package/template/base/ai-chat/src/components/ui/input.tsx +21 -0
- package/template/base/ai-chat/src/components/ui/popover.tsx +89 -0
- package/template/base/ai-chat/src/components/ui/progress.tsx +31 -0
- package/template/base/ai-chat/src/components/ui/scroll-area.tsx +58 -0
- package/template/base/ai-chat/src/components/ui/select.tsx +190 -0
- package/template/base/ai-chat/src/components/ui/separator.tsx +28 -0
- package/template/base/ai-chat/src/components/ui/spinner.tsx +16 -0
- package/template/base/ai-chat/src/components/ui/switch.tsx +35 -0
- package/template/base/ai-chat/src/components/ui/tabs.tsx +91 -0
- package/template/base/ai-chat/src/components/ui/textarea.tsx +18 -0
- package/template/base/ai-chat/src/components/ui/tooltip.tsx +57 -0
- package/template/base/ai-chat/src/instant.perms.ts +34 -0
- package/template/base/ai-chat/src/instant.schema.ts +107 -0
- package/template/base/ai-chat/src/lib/adminDb.ts +8 -0
- package/template/base/ai-chat/src/lib/db.ts +8 -0
- package/template/base/ai-chat/src/lib/mockModel.ts +119 -0
- package/template/base/ai-chat/src/lib/utils.ts +6 -0
- package/template/base/ai-chat/tsconfig.json +33 -0
- package/template/base/bun-react/.env.example +2 -0
- package/template/base/bun-react/README.md +12 -0
- package/template/base/bun-react/_gitignore +34 -0
- package/template/base/bun-react/bun-env.d.ts +17 -0
- package/template/base/bun-react/bunfig.toml +4 -0
- package/template/base/bun-react/package.json +22 -0
- package/template/base/bun-react/src/App.tsx +168 -0
- package/template/base/bun-react/src/frontend.tsx +20 -0
- package/template/base/bun-react/src/getUnusedPort.ts +32 -0
- package/template/base/bun-react/src/index.css +25 -0
- package/template/base/bun-react/src/index.html +13 -0
- package/template/base/bun-react/src/index.ts +21 -0
- package/template/base/bun-react/src/instant.perms.ts +24 -0
- package/template/base/bun-react/src/instant.schema.ts +46 -0
- package/template/base/bun-react/src/lib/db.ts +8 -0
- package/template/base/bun-react/src/logo.svg +1 -0
- package/template/base/bun-react/tsconfig.json +36 -0
- package/template/base/expo/.env.example +2 -0
- package/template/base/expo/README.md +18 -0
- package/template/base/expo/_gitignore +41 -0
- package/template/base/expo/app/+not-found.tsx +16 -0
- package/template/base/expo/app/_layout.tsx +37 -0
- package/template/base/expo/app/index.tsx +64 -0
- package/template/base/expo/app.json +42 -0
- package/template/base/expo/assets/fonts/SpaceMono-Regular.ttf +0 -0
- package/template/base/expo/assets/images/adaptive-icon.png +0 -0
- package/template/base/expo/assets/images/favicon.png +0 -0
- package/template/base/expo/assets/images/icon.png +0 -0
- package/template/base/expo/assets/images/partial-react-logo.png +0 -0
- package/template/base/expo/assets/images/react-logo.png +0 -0
- package/template/base/expo/assets/images/react-logo@2x.png +0 -0
- package/template/base/expo/assets/images/react-logo@3x.png +0 -0
- package/template/base/expo/assets/images/splash-icon.png +0 -0
- package/template/base/expo/babel.config.js +12 -0
- package/template/base/expo/constants/Colors.ts +26 -0
- package/template/base/expo/eslint.config.js +10 -0
- package/template/base/expo/global.css +3 -0
- package/template/base/expo/hooks/useColorScheme.ts +1 -0
- package/template/base/expo/hooks/useColorScheme.web.ts +21 -0
- package/template/base/expo/hooks/useThemeColor.ts +21 -0
- package/template/base/expo/instant.perms.ts +24 -0
- package/template/base/expo/instant.schema.ts +44 -0
- package/template/base/expo/lib/db.ts +7 -0
- package/template/base/expo/metro.config.js +6 -0
- package/template/base/expo/nativewind-env.d.ts +1 -0
- package/template/base/expo/package.json +57 -0
- package/template/base/expo/scripts/reset-project.js +112 -0
- package/template/base/expo/tailwind.config.js +9 -0
- package/template/base/expo/tsconfig.json +18 -0
- package/template/base/next-js-app-dir/.env.example +2 -0
- package/template/base/next-js-app-dir/README.md +18 -0
- package/template/base/next-js-app-dir/_gitignore +41 -0
- package/template/base/next-js-app-dir/next.config.ts +7 -0
- package/template/base/next-js-app-dir/package.json +27 -0
- package/template/base/next-js-app-dir/postcss.config.mjs +5 -0
- package/template/base/next-js-app-dir/public/file.svg +1 -0
- package/template/base/next-js-app-dir/public/globe.svg +1 -0
- package/template/base/next-js-app-dir/public/next.svg +1 -0
- package/template/base/next-js-app-dir/public/vercel.svg +1 -0
- package/template/base/next-js-app-dir/public/window.svg +1 -0
- package/template/base/next-js-app-dir/src/app/favicon.ico +0 -0
- package/template/base/next-js-app-dir/src/app/globals.css +26 -0
- package/template/base/next-js-app-dir/src/app/layout.tsx +34 -0
- package/template/base/next-js-app-dir/src/app/page.tsx +169 -0
- package/template/base/next-js-app-dir/src/instant.perms.ts +24 -0
- package/template/base/next-js-app-dir/src/instant.schema.ts +50 -0
- package/template/base/next-js-app-dir/src/lib/db.ts +8 -0
- package/template/base/next-js-app-dir/tsconfig.json +41 -0
- package/template/base/solidjs-vite/README.md +15 -0
- package/template/base/solidjs-vite/_gitignore +25 -0
- package/template/base/solidjs-vite/index.html +15 -0
- package/template/base/solidjs-vite/package.json +25 -0
- package/template/base/solidjs-vite/src/App.tsx +171 -0
- package/template/base/solidjs-vite/src/index.css +25 -0
- package/template/base/solidjs-vite/src/index.tsx +16 -0
- package/template/base/solidjs-vite/src/instant.perms.ts +24 -0
- package/template/base/solidjs-vite/src/instant.schema.ts +46 -0
- package/template/base/solidjs-vite/src/lib/db.ts +8 -0
- package/template/base/solidjs-vite/tsconfig.json +20 -0
- package/template/base/solidjs-vite/vite.config.ts +11 -0
- package/template/base/sveltekit/README.md +15 -0
- package/template/base/sveltekit/_gitignore +26 -0
- package/template/base/sveltekit/package.json +25 -0
- package/template/base/sveltekit/src/app.css +25 -0
- package/template/base/sveltekit/src/app.html +11 -0
- package/template/base/sveltekit/src/instant.perms.ts +24 -0
- package/template/base/sveltekit/src/instant.schema.ts +46 -0
- package/template/base/sveltekit/src/lib/db.ts +8 -0
- package/template/base/sveltekit/src/routes/+layout.svelte +6 -0
- package/template/base/sveltekit/src/routes/+page.svelte +236 -0
- package/template/base/sveltekit/src/routes/+page.ts +1 -0
- package/template/base/sveltekit/svelte.config.js +10 -0
- package/template/base/sveltekit/tsconfig.json +14 -0
- package/template/base/sveltekit/vite.config.ts +7 -0
- package/template/base/tanstack-start/.cta.json +12 -0
- package/template/base/tanstack-start/README.md +17 -0
- package/template/base/tanstack-start/_gitignore +13 -0
- package/template/base/tanstack-start/package.json +43 -0
- package/template/base/tanstack-start/public/favicon.ico +0 -0
- package/template/base/tanstack-start/public/logo192.png +0 -0
- package/template/base/tanstack-start/public/logo512.png +0 -0
- package/template/base/tanstack-start/public/manifest.json +25 -0
- package/template/base/tanstack-start/public/robots.txt +3 -0
- package/template/base/tanstack-start/public/tanstack-circle-logo.png +0 -0
- package/template/base/tanstack-start/public/tanstack-word-logo-white.svg +1 -0
- package/template/base/tanstack-start/src/components/Header.tsx +21 -0
- package/template/base/tanstack-start/src/instant.perms.ts +24 -0
- package/template/base/tanstack-start/src/instant.schema.ts +50 -0
- package/template/base/tanstack-start/src/lib/adminDb.ts +12 -0
- package/template/base/tanstack-start/src/lib/db.ts +9 -0
- package/template/base/tanstack-start/src/logo.svg +12 -0
- package/template/base/tanstack-start/src/routeTree.gen.ts +104 -0
- package/template/base/tanstack-start/src/router.tsx +22 -0
- package/template/base/tanstack-start/src/routes/__root.tsx +70 -0
- package/template/base/tanstack-start/src/routes/api/instant.ts +18 -0
- package/template/base/tanstack-start/src/routes/index.tsx +238 -0
- package/template/base/tanstack-start/src/routes/login.tsx +140 -0
- package/template/base/tanstack-start/src/styles.css +18 -0
- package/template/base/tanstack-start/tsconfig.json +28 -0
- package/template/base/tanstack-start/vite.config.ts +33 -0
- package/template/base/tanstack-start-with-tanstack-query/.cta.json +12 -0
- package/template/base/tanstack-start-with-tanstack-query/README.md +18 -0
- package/template/base/tanstack-start-with-tanstack-query/_gitignore +13 -0
- package/template/base/tanstack-start-with-tanstack-query/package.json +46 -0
- package/template/base/tanstack-start-with-tanstack-query/public/favicon.ico +0 -0
- package/template/base/tanstack-start-with-tanstack-query/public/logo192.png +0 -0
- package/template/base/tanstack-start-with-tanstack-query/public/logo512.png +0 -0
- package/template/base/tanstack-start-with-tanstack-query/public/manifest.json +25 -0
- package/template/base/tanstack-start-with-tanstack-query/public/robots.txt +3 -0
- package/template/base/tanstack-start-with-tanstack-query/public/tanstack-circle-logo.png +0 -0
- package/template/base/tanstack-start-with-tanstack-query/public/tanstack-word-logo-white.svg +1 -0
- package/template/base/tanstack-start-with-tanstack-query/src/components/Header.tsx +21 -0
- package/template/base/tanstack-start-with-tanstack-query/src/instant.perms.ts +24 -0
- package/template/base/tanstack-start-with-tanstack-query/src/instant.schema.ts +50 -0
- package/template/base/tanstack-start-with-tanstack-query/src/lib/adminDb.ts +9 -0
- package/template/base/tanstack-start-with-tanstack-query/src/lib/db.ts +11 -0
- package/template/base/tanstack-start-with-tanstack-query/src/lib/instantQuery.ts +93 -0
- package/template/base/tanstack-start-with-tanstack-query/src/logo.svg +12 -0
- package/template/base/tanstack-start-with-tanstack-query/src/routeTree.gen.ts +104 -0
- package/template/base/tanstack-start-with-tanstack-query/src/router.tsx +108 -0
- package/template/base/tanstack-start-with-tanstack-query/src/routes/__root.tsx +76 -0
- package/template/base/tanstack-start-with-tanstack-query/src/routes/api/instant.ts +16 -0
- package/template/base/tanstack-start-with-tanstack-query/src/routes/index.tsx +231 -0
- package/template/base/tanstack-start-with-tanstack-query/src/routes/login.tsx +140 -0
- package/template/base/tanstack-start-with-tanstack-query/src/styles.css +17 -0
- package/template/base/tanstack-start-with-tanstack-query/tsconfig.json +28 -0
- package/template/base/tanstack-start-with-tanstack-query/vite.config.ts +33 -0
- package/template/base/vite-react/README.md +16 -0
- package/template/base/vite-react/_gitignore +26 -0
- package/template/base/vite-react/eslint.config.js +23 -0
- package/template/base/vite-react/index.html +13 -0
- package/template/base/vite-react/package.json +35 -0
- package/template/base/vite-react/public/favicon.svg +1 -0
- package/template/base/vite-react/src/App.tsx +167 -0
- package/template/base/vite-react/src/index.css +1 -0
- package/template/base/vite-react/src/instant.perms.ts +24 -0
- package/template/base/vite-react/src/instant.schema.ts +51 -0
- package/template/base/vite-react/src/lib/db.ts +8 -0
- package/template/base/vite-react/src/main.tsx +10 -0
- package/template/base/vite-react/tsconfig.app.json +25 -0
- package/template/base/vite-react/tsconfig.json +7 -0
- package/template/base/vite-react/tsconfig.node.json +24 -0
- package/template/base/vite-react/vite.config.ts +8 -0
- package/template/base/vite-vanilla/.env.example +2 -0
- package/template/base/vite-vanilla/README.md +17 -0
- package/template/base/vite-vanilla/_gitignore +25 -0
- package/template/base/vite-vanilla/index.html +13 -0
- package/template/base/vite-vanilla/package.json +20 -0
- package/template/base/vite-vanilla/pnpm-lock.yaml +707 -0
- package/template/base/vite-vanilla/public/vite.svg +1 -0
- package/template/base/vite-vanilla/src/instant.perms.ts +24 -0
- package/template/base/vite-vanilla/src/instant.schema.ts +50 -0
- package/template/base/vite-vanilla/src/lib/db.ts +11 -0
- package/template/base/vite-vanilla/src/main.ts +242 -0
- package/template/base/vite-vanilla/src/style.css +96 -0
- package/template/base/vite-vanilla/src/typescript.svg +1 -0
- package/template/base/vite-vanilla/src/vite-env.d.ts +1 -0
- package/template/base/vite-vanilla/tsconfig.json +24 -0
- package/template/base/vue-vite/README.md +15 -0
- package/template/base/vue-vite/_gitignore +43 -0
- package/template/base/vue-vite/env.d.ts +1 -0
- package/template/base/vue-vite/index.html +12 -0
- package/template/base/vue-vite/package.json +34 -0
- package/template/base/vue-vite/src/App.vue +238 -0
- package/template/base/vue-vite/src/assets/main.css +25 -0
- package/template/base/vue-vite/src/instant.perms.ts +24 -0
- package/template/base/vue-vite/src/instant.schema.ts +46 -0
- package/template/base/vue-vite/src/lib/db.ts +8 -0
- package/template/base/vue-vite/src/main.ts +6 -0
- package/template/base/vue-vite/tsconfig.app.json +15 -0
- package/template/base/vue-vite/tsconfig.json +11 -0
- package/template/base/vue-vite/tsconfig.node.json +27 -0
- package/template/base/vue-vite/vite.config.ts +16 -0
- package/template/rules/AGENTS.md +450 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Docs: https://sidekickdb.co/docs/permissions
|
|
2
|
+
|
|
3
|
+
import type { InstantRules } from "@sidekickdb/react";
|
|
4
|
+
|
|
5
|
+
const rules = {
|
|
6
|
+
/**
|
|
7
|
+
* Welcome to SidekickDB's permission system!
|
|
8
|
+
* Right now your rules are empty. To start filling them in, check out the docs:
|
|
9
|
+
* https://sidekickdb.co/docs/permissions
|
|
10
|
+
*
|
|
11
|
+
* Here's an example to give you a feel:
|
|
12
|
+
* posts: {
|
|
13
|
+
* allow: {
|
|
14
|
+
* view: "true",
|
|
15
|
+
* create: "isOwner",
|
|
16
|
+
* update: "isOwner",
|
|
17
|
+
* delete: "isOwner",
|
|
18
|
+
* },
|
|
19
|
+
* bind: {"isOwner": "auth.id != null && auth.id == data.ownerId"},
|
|
20
|
+
* },
|
|
21
|
+
*/
|
|
22
|
+
} satisfies InstantRules;
|
|
23
|
+
|
|
24
|
+
export default rules;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// Docs: https://sidekickdb.co/docs/modeling-data
|
|
2
|
+
|
|
3
|
+
import { i } from "@sidekickdb/react";
|
|
4
|
+
|
|
5
|
+
const _schema = i.schema({
|
|
6
|
+
entities: {
|
|
7
|
+
$files: i.entity({
|
|
8
|
+
path: i.string().unique().indexed(),
|
|
9
|
+
url: i.string(),
|
|
10
|
+
}),
|
|
11
|
+
$users: i.entity({
|
|
12
|
+
email: i.string().unique().indexed().optional(),
|
|
13
|
+
imageURL: i.string().optional(),
|
|
14
|
+
type: i.string().optional(),
|
|
15
|
+
}),
|
|
16
|
+
todos: i.entity({
|
|
17
|
+
createdAt: i.number(),
|
|
18
|
+
done: i.boolean(),
|
|
19
|
+
text: i.string(),
|
|
20
|
+
}),
|
|
21
|
+
},
|
|
22
|
+
links: {
|
|
23
|
+
$usersLinkedPrimaryUser: {
|
|
24
|
+
forward: {
|
|
25
|
+
on: "$users",
|
|
26
|
+
has: "one",
|
|
27
|
+
label: "linkedPrimaryUser",
|
|
28
|
+
onDelete: "cascade",
|
|
29
|
+
},
|
|
30
|
+
reverse: {
|
|
31
|
+
on: "$users",
|
|
32
|
+
has: "many",
|
|
33
|
+
label: "linkedGuestUsers",
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
rooms: {},
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// This helps TypeScript display nicer intellisense
|
|
41
|
+
type _AppSchema = typeof _schema;
|
|
42
|
+
interface AppSchema extends _AppSchema {}
|
|
43
|
+
const schema: AppSchema = _schema;
|
|
44
|
+
|
|
45
|
+
export type { AppSchema };
|
|
46
|
+
export default schema;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg id="Bun" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 70"><title>Bun Logo</title><path id="Shadow" d="M71.09,20.74c-.16-.17-.33-.34-.5-.5s-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5A26.46,26.46,0,0,1,75.5,35.7c0,16.57-16.82,30.05-37.5,30.05-11.58,0-21.94-4.23-28.83-10.86l.5.5.5.5.5.5.5.5.5.5.5.5.5.5C19.55,65.3,30.14,69.75,42,69.75c20.68,0,37.5-13.48,37.5-30C79.5,32.69,76.46,26,71.09,20.74Z"/><g id="Body"><path id="Background" d="M73,35.7c0,15.21-15.67,27.54-35,27.54S3,50.91,3,35.7C3,26.27,9,17.94,18.22,13S33.18,3,38,3s8.94,4.13,19.78,10C67,17.94,73,26.27,73,35.7Z" style="fill:#fbf0df"/><path id="Bottom_Shadow" data-name="Bottom Shadow" d="M73,35.7a21.67,21.67,0,0,0-.8-5.78c-2.73,33.3-43.35,34.9-59.32,24.94A40,40,0,0,0,38,63.24C57.3,63.24,73,50.89,73,35.7Z" style="fill:#f6dece"/><path id="Light_Shine" data-name="Light Shine" d="M24.53,11.17C29,8.49,34.94,3.46,40.78,3.45A9.29,9.29,0,0,0,38,3c-2.42,0-5,1.25-8.25,3.13-1.13.66-2.3,1.39-3.54,2.15-2.33,1.44-5,3.07-8,4.7C8.69,18.13,3,26.62,3,35.7c0,.4,0,.8,0,1.19C9.06,15.48,20.07,13.85,24.53,11.17Z" style="fill:#fffefc"/><path id="Top" d="M35.12,5.53A16.41,16.41,0,0,1,29.49,18c-.28.25-.06.73.3.59,3.37-1.31,7.92-5.23,6-13.14C35.71,5,35.12,5.12,35.12,5.53Zm2.27,0A16.24,16.24,0,0,1,39,19c-.12.35.31.65.55.36C41.74,16.56,43.65,11,37.93,5,37.64,4.74,37.19,5.14,37.39,5.49Zm2.76-.17A16.42,16.42,0,0,1,47,17.12a.33.33,0,0,0,.65.11c.92-3.49.4-9.44-7.17-12.53C40.08,4.54,39.82,5.08,40.15,5.32ZM21.69,15.76a16.94,16.94,0,0,0,10.47-9c.18-.36.75-.22.66.18-1.73,8-7.52,9.67-11.12,9.45C21.32,16.4,21.33,15.87,21.69,15.76Z" style="fill:#ccbea7;fill-rule:evenodd"/><path id="Outline" d="M38,65.75C17.32,65.75.5,52.27.5,35.7c0-10,6.18-19.33,16.53-24.92,3-1.6,5.57-3.21,7.86-4.62,1.26-.78,2.45-1.51,3.6-2.19C32,1.89,35,.5,38,.5s5.62,1.2,8.9,3.14c1,.57,2,1.19,3.07,1.87,2.49,1.54,5.3,3.28,9,5.27C69.32,16.37,75.5,25.69,75.5,35.7,75.5,52.27,58.68,65.75,38,65.75ZM38,3c-2.42,0-5,1.25-8.25,3.13-1.13.66-2.3,1.39-3.54,2.15-2.33,1.44-5,3.07-8,4.7C8.69,18.13,3,26.62,3,35.7,3,50.89,18.7,63.25,38,63.25S73,50.89,73,35.7C73,26.62,67.31,18.13,57.78,13,54,11,51.05,9.12,48.66,7.64c-1.09-.67-2.09-1.29-3-1.84C42.63,4,40.42,3,38,3Z"/></g><g id="Mouth"><g id="Background-2" data-name="Background"><path d="M45.05,43a8.93,8.93,0,0,1-2.92,4.71,6.81,6.81,0,0,1-4,1.88A6.84,6.84,0,0,1,34,47.71,8.93,8.93,0,0,1,31.12,43a.72.72,0,0,1,.8-.81H44.26A.72.72,0,0,1,45.05,43Z" style="fill:#b71422"/></g><g id="Tongue"><path id="Background-3" data-name="Background" d="M34,47.79a6.91,6.91,0,0,0,4.12,1.9,6.91,6.91,0,0,0,4.11-1.9,10.63,10.63,0,0,0,1-1.07,6.83,6.83,0,0,0-4.9-2.31,6.15,6.15,0,0,0-5,2.78C33.56,47.4,33.76,47.6,34,47.79Z" style="fill:#ff6164"/><path id="Outline-2" data-name="Outline" d="M34.16,47a5.36,5.36,0,0,1,4.19-2.08,6,6,0,0,1,4,1.69c.23-.25.45-.51.66-.77a7,7,0,0,0-4.71-1.93,6.36,6.36,0,0,0-4.89,2.36A9.53,9.53,0,0,0,34.16,47Z"/></g><path id="Outline-3" data-name="Outline" d="M38.09,50.19a7.42,7.42,0,0,1-4.45-2,9.52,9.52,0,0,1-3.11-5.05,1.2,1.2,0,0,1,.26-1,1.41,1.41,0,0,1,1.13-.51H44.26a1.44,1.44,0,0,1,1.13.51,1.19,1.19,0,0,1,.25,1h0a9.52,9.52,0,0,1-3.11,5.05A7.42,7.42,0,0,1,38.09,50.19Zm-6.17-7.4c-.16,0-.2.07-.21.09a8.29,8.29,0,0,0,2.73,4.37A6.23,6.23,0,0,0,38.09,49a6.28,6.28,0,0,0,3.65-1.73,8.3,8.3,0,0,0,2.72-4.37.21.21,0,0,0-.2-.09Z"/></g><g id="Face"><ellipse id="Right_Blush" data-name="Right Blush" cx="53.22" cy="40.18" rx="5.85" ry="3.44" style="fill:#febbd0"/><ellipse id="Left_Bluch" data-name="Left Bluch" cx="22.95" cy="40.18" rx="5.85" ry="3.44" style="fill:#febbd0"/><path id="Eyes" d="M25.7,38.8a5.51,5.51,0,1,0-5.5-5.51A5.51,5.51,0,0,0,25.7,38.8Zm24.77,0A5.51,5.51,0,1,0,45,33.29,5.5,5.5,0,0,0,50.47,38.8Z" style="fill-rule:evenodd"/><path id="Iris" d="M24,33.64a2.07,2.07,0,1,0-2.06-2.07A2.07,2.07,0,0,0,24,33.64Zm24.77,0a2.07,2.07,0,1,0-2.06-2.07A2.07,2.07,0,0,0,48.75,33.64Z" style="fill:#fff;fill-rule:evenodd"/></g></svg>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
// Environment setup & latest features
|
|
4
|
+
"lib": ["ESNext", "DOM"],
|
|
5
|
+
"target": "ESNext",
|
|
6
|
+
"module": "Preserve",
|
|
7
|
+
"moduleDetection": "force",
|
|
8
|
+
"jsx": "react-jsx",
|
|
9
|
+
"allowJs": true,
|
|
10
|
+
|
|
11
|
+
// Bundler mode
|
|
12
|
+
"moduleResolution": "bundler",
|
|
13
|
+
"allowImportingTsExtensions": true,
|
|
14
|
+
"verbatimModuleSyntax": true,
|
|
15
|
+
"noEmit": true,
|
|
16
|
+
|
|
17
|
+
// Best practices
|
|
18
|
+
"strict": true,
|
|
19
|
+
"skipLibCheck": true,
|
|
20
|
+
"noFallthroughCasesInSwitch": true,
|
|
21
|
+
"noUncheckedIndexedAccess": false, // Disabled to hide errors on SidekickDB transaction syntax.
|
|
22
|
+
"noImplicitOverride": true,
|
|
23
|
+
|
|
24
|
+
"baseUrl": ".",
|
|
25
|
+
"paths": {
|
|
26
|
+
"@/*": ["./src/*"],
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
// Some stricter flags (disabled by default)
|
|
30
|
+
"noUnusedLocals": false,
|
|
31
|
+
"noUnusedParameters": false,
|
|
32
|
+
"noPropertyAccessFromIndexSignature": false,
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
"exclude": ["dist", "node_modules"],
|
|
36
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Welcome to your SidekickDB Expo app 👋
|
|
2
|
+
|
|
3
|
+
[SidekickDB Docs](https://sidekickdb.co/docs)
|
|
4
|
+
[Expo Docs](https://docs.expo.dev/)
|
|
5
|
+
|
|
6
|
+
This is an Expo project scaffolded with create-sidekick-app.
|
|
7
|
+
|
|
8
|
+
To run the development server:
|
|
9
|
+
`npm run start`
|
|
10
|
+
|
|
11
|
+
To push schema changes:
|
|
12
|
+
`npx @sidekickdb/cli push`
|
|
13
|
+
|
|
14
|
+
To pull schema changes:
|
|
15
|
+
`npx @sidekickdb/cli pull`
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
Got any feedback or questions? Open an issue on [GitHub](https://github.com/SidekickDB/sidekick/issues)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
|
|
2
|
+
|
|
3
|
+
# dependencies
|
|
4
|
+
node_modules/
|
|
5
|
+
|
|
6
|
+
# Expo
|
|
7
|
+
.expo/
|
|
8
|
+
dist/
|
|
9
|
+
web-build/
|
|
10
|
+
expo-env.d.ts
|
|
11
|
+
|
|
12
|
+
# Native
|
|
13
|
+
.kotlin/
|
|
14
|
+
*.orig.*
|
|
15
|
+
*.jks
|
|
16
|
+
*.p8
|
|
17
|
+
*.p12
|
|
18
|
+
*.key
|
|
19
|
+
*.mobileprovision
|
|
20
|
+
|
|
21
|
+
# Metro
|
|
22
|
+
.metro-health-check*
|
|
23
|
+
|
|
24
|
+
# debug
|
|
25
|
+
npm-debug.*
|
|
26
|
+
yarn-debug.*
|
|
27
|
+
yarn-error.*
|
|
28
|
+
|
|
29
|
+
# macOS
|
|
30
|
+
.DS_Store
|
|
31
|
+
*.pem
|
|
32
|
+
|
|
33
|
+
# local env files
|
|
34
|
+
.env*.local
|
|
35
|
+
|
|
36
|
+
# typescript
|
|
37
|
+
*.tsbuildinfo
|
|
38
|
+
|
|
39
|
+
app-example
|
|
40
|
+
|
|
41
|
+
.env
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Link, Stack } from "expo-router";
|
|
2
|
+
import { View, Text } from "react-native";
|
|
3
|
+
|
|
4
|
+
export default function NotFoundScreen() {
|
|
5
|
+
return (
|
|
6
|
+
<>
|
|
7
|
+
<Stack.Screen options={{ title: "Oops!" }} />
|
|
8
|
+
<View className="flex flex-1 items-center justify-center p-5">
|
|
9
|
+
<Text>This screen does not exist.</Text>
|
|
10
|
+
<Link href="/" className="mt-[15px] py-[15px]">
|
|
11
|
+
<Text>Go to home screen!</Text>
|
|
12
|
+
</Link>
|
|
13
|
+
</View>
|
|
14
|
+
</>
|
|
15
|
+
);
|
|
16
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DarkTheme,
|
|
3
|
+
DefaultTheme,
|
|
4
|
+
ThemeProvider,
|
|
5
|
+
} from "@react-navigation/native";
|
|
6
|
+
import "../global.css";
|
|
7
|
+
import { useFonts } from "expo-font";
|
|
8
|
+
import { Stack } from "expo-router";
|
|
9
|
+
import { StatusBar } from "expo-status-bar";
|
|
10
|
+
import "react-native-reanimated";
|
|
11
|
+
|
|
12
|
+
import { useColorScheme } from "@/hooks/useColorScheme";
|
|
13
|
+
|
|
14
|
+
export default function RootLayout() {
|
|
15
|
+
const colorScheme = useColorScheme();
|
|
16
|
+
const [loaded] = useFonts({
|
|
17
|
+
SpaceMono: require("../assets/fonts/SpaceMono-Regular.ttf"),
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
if (!loaded) {
|
|
21
|
+
// Async font loading only occurs in development.
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<ThemeProvider value={colorScheme === "dark" ? DarkTheme : DefaultTheme}>
|
|
27
|
+
<Stack>
|
|
28
|
+
<Stack.Screen
|
|
29
|
+
name="index"
|
|
30
|
+
options={{ headerShown: true, headerTitle: "My SidekickDB App" }}
|
|
31
|
+
/>
|
|
32
|
+
<Stack.Screen name="+not-found" />
|
|
33
|
+
</Stack>
|
|
34
|
+
<StatusBar style="auto" />
|
|
35
|
+
</ThemeProvider>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { db } from "@/lib/db";
|
|
2
|
+
import { AppSchema } from "@/instant.schema";
|
|
3
|
+
import { InstaQLEntity } from "@sidekickdb/react-native";
|
|
4
|
+
import { View, Text, Button } from "react-native";
|
|
5
|
+
|
|
6
|
+
type Color = InstaQLEntity<AppSchema, "colors">;
|
|
7
|
+
|
|
8
|
+
const selectId = "4d39508b-9ee2-48a3-b70d-8192d9c5a059";
|
|
9
|
+
|
|
10
|
+
function App() {
|
|
11
|
+
const { isLoading, error, data } = db.useQuery({
|
|
12
|
+
colors: {
|
|
13
|
+
$: { where: { id: selectId } },
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
if (isLoading) {
|
|
17
|
+
return (
|
|
18
|
+
<View>
|
|
19
|
+
<Text>Loading...</Text>
|
|
20
|
+
</View>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
if (error) {
|
|
24
|
+
return (
|
|
25
|
+
<View>
|
|
26
|
+
<Text>Error: {error.message}</Text>
|
|
27
|
+
</View>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return <Main color={data.colors[0]} />;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function Main(props: { color?: Color }) {
|
|
35
|
+
const { value } = props.color || { value: "lightgray" };
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<View
|
|
39
|
+
className="flex flex-1 items-center justify-center"
|
|
40
|
+
style={[{ backgroundColor: value }]}
|
|
41
|
+
>
|
|
42
|
+
<View className="bg-white opacity-80 p-3 rounded-lg">
|
|
43
|
+
<Text className="text-[24px] font-bold mb-4">
|
|
44
|
+
Hi! pick your favorite color
|
|
45
|
+
</Text>
|
|
46
|
+
<View className="my-4">
|
|
47
|
+
{["green", "blue", "purple"].map((c) => {
|
|
48
|
+
return (
|
|
49
|
+
<Button
|
|
50
|
+
title={c}
|
|
51
|
+
onPress={() => {
|
|
52
|
+
db.transact(db.tx.colors[selectId].update({ value: c }));
|
|
53
|
+
}}
|
|
54
|
+
key={c}
|
|
55
|
+
/>
|
|
56
|
+
);
|
|
57
|
+
})}
|
|
58
|
+
</View>
|
|
59
|
+
</View>
|
|
60
|
+
</View>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export default App;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"expo": {
|
|
3
|
+
"name": "expo-template",
|
|
4
|
+
"slug": "expo-template",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"orientation": "portrait",
|
|
7
|
+
"icon": "./assets/images/icon.png",
|
|
8
|
+
"scheme": "expotemplate",
|
|
9
|
+
"userInterfaceStyle": "automatic",
|
|
10
|
+
"newArchEnabled": true,
|
|
11
|
+
"ios": {
|
|
12
|
+
"supportsTablet": true
|
|
13
|
+
},
|
|
14
|
+
"android": {
|
|
15
|
+
"adaptiveIcon": {
|
|
16
|
+
"foregroundImage": "./assets/images/adaptive-icon.png",
|
|
17
|
+
"backgroundColor": "#ffffff"
|
|
18
|
+
},
|
|
19
|
+
"edgeToEdgeEnabled": true
|
|
20
|
+
},
|
|
21
|
+
"web": {
|
|
22
|
+
"bundler": "metro",
|
|
23
|
+
"output": "static",
|
|
24
|
+
"favicon": "./assets/images/favicon.png"
|
|
25
|
+
},
|
|
26
|
+
"plugins": [
|
|
27
|
+
"expo-router",
|
|
28
|
+
[
|
|
29
|
+
"expo-splash-screen",
|
|
30
|
+
{
|
|
31
|
+
"image": "./assets/images/splash-icon.png",
|
|
32
|
+
"imageWidth": 200,
|
|
33
|
+
"resizeMode": "contain",
|
|
34
|
+
"backgroundColor": "#ffffff"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
],
|
|
38
|
+
"experiments": {
|
|
39
|
+
"typedRoutes": true
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Below are the colors that are used in the app. The colors are defined in the light and dark mode.
|
|
3
|
+
* There are many other ways to style your app. For example, [Nativewind](https://www.nativewind.dev/), [Tamagui](https://tamagui.dev/), [unistyles](https://reactnativeunistyles.vercel.app), etc.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
const tintColorLight = '#0a7ea4';
|
|
7
|
+
const tintColorDark = '#fff';
|
|
8
|
+
|
|
9
|
+
export const Colors = {
|
|
10
|
+
light: {
|
|
11
|
+
text: '#11181C',
|
|
12
|
+
background: '#fff',
|
|
13
|
+
tint: tintColorLight,
|
|
14
|
+
icon: '#687076',
|
|
15
|
+
tabIconDefault: '#687076',
|
|
16
|
+
tabIconSelected: tintColorLight,
|
|
17
|
+
},
|
|
18
|
+
dark: {
|
|
19
|
+
text: '#ECEDEE',
|
|
20
|
+
background: '#151718',
|
|
21
|
+
tint: tintColorDark,
|
|
22
|
+
icon: '#9BA1A6',
|
|
23
|
+
tabIconDefault: '#9BA1A6',
|
|
24
|
+
tabIconSelected: tintColorDark,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useColorScheme } from 'react-native';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import { useColorScheme as useRNColorScheme } from 'react-native';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* To support static rendering, this value needs to be re-calculated on the client side for web
|
|
6
|
+
*/
|
|
7
|
+
export function useColorScheme() {
|
|
8
|
+
const [hasHydrated, setHasHydrated] = useState(false);
|
|
9
|
+
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
setHasHydrated(true);
|
|
12
|
+
}, []);
|
|
13
|
+
|
|
14
|
+
const colorScheme = useRNColorScheme();
|
|
15
|
+
|
|
16
|
+
if (hasHydrated) {
|
|
17
|
+
return colorScheme;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return 'light';
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Learn more about light and dark modes:
|
|
3
|
+
* https://docs.expo.dev/guides/color-schemes/
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { Colors } from '@/constants/Colors';
|
|
7
|
+
import { useColorScheme } from '@/hooks/useColorScheme';
|
|
8
|
+
|
|
9
|
+
export function useThemeColor(
|
|
10
|
+
props: { light?: string; dark?: string },
|
|
11
|
+
colorName: keyof typeof Colors.light & keyof typeof Colors.dark
|
|
12
|
+
) {
|
|
13
|
+
const theme = useColorScheme() ?? 'light';
|
|
14
|
+
const colorFromProps = props[theme];
|
|
15
|
+
|
|
16
|
+
if (colorFromProps) {
|
|
17
|
+
return colorFromProps;
|
|
18
|
+
} else {
|
|
19
|
+
return Colors[theme][colorName];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Docs: https://sidekickdb.co/docs/permissions
|
|
2
|
+
|
|
3
|
+
import type { InstantRules } from "@sidekickdb/react-native";
|
|
4
|
+
|
|
5
|
+
const rules = {
|
|
6
|
+
/**
|
|
7
|
+
* Welcome to SidekickDB's permission system!
|
|
8
|
+
* Right now your rules are empty. To start filling them in, check out the docs:
|
|
9
|
+
* https://sidekickdb.co/docs/permissions
|
|
10
|
+
*
|
|
11
|
+
* Here's an example to give you a feel:
|
|
12
|
+
* posts: {
|
|
13
|
+
* allow: {
|
|
14
|
+
* view: "true",
|
|
15
|
+
* create: "isOwner",
|
|
16
|
+
* update: "isOwner",
|
|
17
|
+
* delete: "isOwner",
|
|
18
|
+
* },
|
|
19
|
+
* bind: ["isOwner", "auth.id != null && auth.id == data.ownerId"],
|
|
20
|
+
* },
|
|
21
|
+
*/
|
|
22
|
+
} satisfies InstantRules;
|
|
23
|
+
|
|
24
|
+
export default rules;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Docs: https://sidekickdb.co/docs/modeling-data
|
|
2
|
+
|
|
3
|
+
import { i } from "@sidekickdb/react-native";
|
|
4
|
+
|
|
5
|
+
const _schema = i.schema({
|
|
6
|
+
entities: {
|
|
7
|
+
$files: i.entity({
|
|
8
|
+
path: i.string().unique().indexed(),
|
|
9
|
+
url: i.string(),
|
|
10
|
+
}),
|
|
11
|
+
$users: i.entity({
|
|
12
|
+
email: i.string().unique().indexed().optional(),
|
|
13
|
+
imageURL: i.string().optional(),
|
|
14
|
+
type: i.string().optional(),
|
|
15
|
+
}),
|
|
16
|
+
colors: i.entity({
|
|
17
|
+
value: i.string(),
|
|
18
|
+
}),
|
|
19
|
+
},
|
|
20
|
+
rooms: {},
|
|
21
|
+
links: {
|
|
22
|
+
$usersLinkedPrimaryUser: {
|
|
23
|
+
forward: {
|
|
24
|
+
on: "$users",
|
|
25
|
+
has: "one",
|
|
26
|
+
label: "linkedPrimaryUser",
|
|
27
|
+
onDelete: "cascade",
|
|
28
|
+
},
|
|
29
|
+
reverse: {
|
|
30
|
+
on: "$users",
|
|
31
|
+
has: "many",
|
|
32
|
+
label: "linkedGuestUsers",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// This helps TypeScript display nicer intellisense
|
|
39
|
+
type _AppSchema = typeof _schema;
|
|
40
|
+
interface AppSchema extends _AppSchema {}
|
|
41
|
+
const schema: AppSchema = _schema;
|
|
42
|
+
|
|
43
|
+
export type { AppSchema };
|
|
44
|
+
export default schema;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="nativewind/types" />
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "expo-template",
|
|
3
|
+
"main": "expo-router/entry",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"start": "expo start",
|
|
7
|
+
"reset-project": "node ./scripts/reset-project.js",
|
|
8
|
+
"android": "expo start --android",
|
|
9
|
+
"ios": "expo start --ios",
|
|
10
|
+
"web": "expo start --web",
|
|
11
|
+
"lint": "expo lint"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@expo/vector-icons": "^15.0.2",
|
|
15
|
+
"@sidekickdb/react-native": "latest",
|
|
16
|
+
"@sidekickdb/admin": "latest",
|
|
17
|
+
"@react-native-async-storage/async-storage": "^2.2.0",
|
|
18
|
+
"@react-native-community/netinfo": "^11.4.1",
|
|
19
|
+
"@react-navigation/bottom-tabs": "^7.4.0",
|
|
20
|
+
"@react-navigation/elements": "^2.6.3",
|
|
21
|
+
"@react-navigation/native": "^7.1.8",
|
|
22
|
+
"expo": "~54.0.8",
|
|
23
|
+
"expo-constants": "~18.0.9",
|
|
24
|
+
"expo-font": "~14.0.8",
|
|
25
|
+
"expo-haptics": "~15.0.7",
|
|
26
|
+
"expo-image": "~3.0.8",
|
|
27
|
+
"expo-linking": "~8.0.8",
|
|
28
|
+
"expo-router": "~6.0.6",
|
|
29
|
+
"expo-splash-screen": "~31.0.10",
|
|
30
|
+
"expo-status-bar": "~3.0.8",
|
|
31
|
+
"expo-symbols": "~1.0.7",
|
|
32
|
+
"expo-system-ui": "~6.0.7",
|
|
33
|
+
"expo-web-browser": "~15.0.7",
|
|
34
|
+
"nativewind": "^4.1.23",
|
|
35
|
+
"prettier-plugin-tailwindcss": "^0.5.14",
|
|
36
|
+
"react": "19.1.0",
|
|
37
|
+
"react-dom": "19.1.0",
|
|
38
|
+
"react-native": "0.81.4",
|
|
39
|
+
"react-native-get-random-values": "^1.11.0",
|
|
40
|
+
"react-native-gesture-handler": "~2.28.0",
|
|
41
|
+
"react-native-worklets": "0.5.1",
|
|
42
|
+
"react-native-reanimated": "~4.1.1",
|
|
43
|
+
"react-native-safe-area-context": "~5.6.0",
|
|
44
|
+
"react-native-screens": "~4.16.0",
|
|
45
|
+
"react-native-web": "~0.21.0",
|
|
46
|
+
"tailwindcss": "^3.4.17"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@babel/core": "^7.25.2",
|
|
50
|
+
"@types/react": "~19.1.0",
|
|
51
|
+
"eslint": "^9.25.0",
|
|
52
|
+
"eslint-config-expo": "~10.0.0",
|
|
53
|
+
"typescript": "~5.9.2"
|
|
54
|
+
},
|
|
55
|
+
"private": true,
|
|
56
|
+
"packageManager": "pnpm@10.17.0+sha512.fce8a3dd29a4ed2ec566fb53efbb04d8c44a0f05bc6f24a73046910fb9c3ce7afa35a0980500668fa3573345bd644644fa98338fa168235c80f4aa17aa17fbef"
|
|
57
|
+
}
|