Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
ca90da1
changes for lucia branch to add legend state with offline first
coniferconcepts Jun 3, 2024
a3a9da9
changes to api package versions and drizzle config
coniferconcepts Jun 3, 2024
b8e97c6
updated with working form
coniferconcepts Jun 7, 2024
e5e622e
custom form now has option to customize submit button or to trigger f…
coniferconcepts Jun 8, 2024
657c34b
changed the form to use regular tamagui input component, added more v…
coniferconcepts Jun 9, 2024
120e4d1
upgraded the packages to the latest Tamagui and the current Tamagui v…
coniferconcepts Jun 10, 2024
6155181
more package upgrades incl. latest Legend State, refactor table to in…
coniferconcepts Jun 13, 2024
9ff7e3f
restored home screen, updated legend state package
coniferconcepts Jun 13, 2024
e1cc506
Added clear(), form now adds new car
coniferconcepts Jun 13, 2024
3de7b8a
corrected form for more types, need to finish testing and remove extr…
coniferconcepts Jun 16, 2024
fa351b2
cleaned up types and styling
coniferconcepts Jun 16, 2024
2683643
switched to default submit, need to clean up data for submission
coniferconcepts Jun 16, 2024
578fe7a
improved form validation, created optional fields
coniferconcepts Jun 18, 2024
3c2f7d4
updated to new Legend State, made inputs optional to match db schema,…
coniferconcepts Jun 18, 2024
697db42
modified inputs to only show those used, create car now adds to list
coniferconcepts Jun 18, 2024
5156e78
refining styling
coniferconcepts Jun 18, 2024
15de6c6
updated hono, corrected styling
coniferconcepts Jun 19, 2024
c61a54d
corrected select component showing selected item
coniferconcepts Jun 19, 2024
a04b802
minor styling, updated packages
coniferconcepts Jun 20, 2024
5731057
simplified form logic, allow single or multi toggleGroups
coniferconcepts Jun 20, 2024
1ae7900
commented out sample inputs, not used in db
coniferconcepts Jun 20, 2024
da30dae
new legend state version
coniferconcepts Jun 21, 2024
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
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ PUBLIC_EAS_PROJECT_ID="85fc6ccd-0ce1-4e4d-804c-b15df989f97e"
# Cloudflare Wrangler
JWT_VERIFICATION_KEY=
DATABASE_ID=aa5e3923-0f1b-469a-8bb8-d10fb866efe0
ACCOUNT_ID=

# Optional for OAuth
GOOGLE_CLIENT_ID=
Expand Down
15 changes: 15 additions & 0 deletions apps/expo/app/legend-offline-first.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { LegendOfflineFirstScreen } from 'app/features/legend-offline-first/screen'
import { Stack } from 'expo-router'

export default function Screen() {
return (
<>
<Stack.Screen
options={{
title: 'Legend Offline First',
}}
/>
<LegendOfflineFirstScreen />
</>
)
}
57 changes: 28 additions & 29 deletions apps/expo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,41 +16,40 @@
"clean": "git clean -xdf .expo node_modules ios android"
},
"dependencies": {
"@babel/runtime": "^7.23.2",
"@shopify/flash-list": "^1.6.3",
"@t4/ui": "workspace:*",
"app": "workspace:*",
"@babel/runtime": "^7.24.7",
"@shopify/flash-list": "^1.6.4",
"@t4/ui": "2.0.0",
"app": "2.0.0",
"babel-plugin-module-resolver": "^5.0.0",
"burnt": "^0.12.1",
"expo": "^49.0.16",
"burnt": "^0.12.2",
"expo": "^51.0.9",
"expo-apple-authentication": "~6.1.2",
"expo-constants": "~14.4.2",
"expo-constants": "^16.0.2",
"expo-crypto": "~12.6.0",
"expo-dev-client": "~2.4.11",
"expo-font": "~11.6.0",
"expo-image": "~1.5.1",
"expo-linear-gradient": "~12.5.0",
"expo-linking": "5.0.2",
"expo-router": "^2.0.11",
"expo-splash-screen": "^0.22.0",
"expo-status-bar": "~1.7.1",
"expo-dev-client": "~4.0.15",
"expo-font": "~12.0.6",
"expo-linear-gradient": "^13.0.2",
"expo-linking": "^6.3.1",
"expo-router": "3.5.15",
"expo-splash-screen": "0.27.4",
"expo-status-bar": "~1.12.1",
"expo-system-ui": "^2.6.0",
"expo-updates": "^0.18.17",
"expo-updates": "~0.25.15",
"expo-web-browser": "~12.5.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-native": "^0.72.6",
"react-native-gesture-handler": "~2.13.4",
"react-native-mmkv": "^2.10.2",
"react-native-safe-area-context": "4.7.4",
"react-native-screens": "^3.27.0",
"react-native-svg": "^13.14.0"
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-native": "0.74.2",
"react-native-gesture-handler": "~2.16.2",
"react-native-mmkv": "^2.12.2",
"react-native-safe-area-context": "4.10.4",
"react-native-screens": "~3.31.1",
"react-native-web": "~0.19.12"
},
"devDependencies": {
"@babel/core": "^7.23.2",
"@expo/metro-config": "^0.10.7",
"@tamagui/babel-plugin": "1.75.9",
"metro-minify-terser": "^0.80.0",
"typescript": "^5.2.2"
"@babel/core": "^7.24.6",
"@expo/metro-config": "~0.18.4",
"@tamagui/babel-plugin": "^1.101.0",
"metro-minify-terser": "^0.80.9",
"typescript": "^5.5.2"
}
}
6 changes: 4 additions & 2 deletions apps/next/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,17 @@ const plugins = [
outputCSS: process.env.NODE_ENV === 'production' ? './public/tamagui.css' : null,
logTimings: true,
disableExtraction,
useReactNativeWebLite: true,
// useReactNativeWebLite: true,
shouldExtract: (path) => {
if (path.includes(join('packages', 'app'))) {
return true
}
},
excludeReactNativeWebExports: ['Switch', 'ProgressBar', 'Picker', 'CheckBox', 'Touchable'],
}),
]

module.exports = function () {
module.exports = () => {
/** @type {import('next').NextConfig} */
let config = {
// Uncomment if you want to use Cloudflare's Paid Image Resizing w/ Next/Image
Expand Down Expand Up @@ -77,6 +78,7 @@ module.exports = function () {
'react-native-safe-area-context',
'react-native-reanimated',
'react-native-gesture-handler',
'expo-linear-gradient',
],
experimental: {
/*
Expand Down
24 changes: 12 additions & 12 deletions apps/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,24 @@
"@ducanh2912/next-pwa": "^9.7.2",
"@supabase/auth-helpers-nextjs": "^0.7.4",
"@supabase/auth-helpers-react": "^0.4.2",
"@t4/ui": "workspace:*",
"@tamagui/next-theme": "1.75.9",
"@t4/ui": "2.0.0",
"@tamagui/next-theme": "^1.101.0",
"@tsndr/cloudflare-worker-jwt": "2.2.7",
"app": "workspace:*",
"million": "2.6.4",
"next": "14.0.1",
"app": "2.0.0",
"million": "3.1.0",
"next": "^14.2.3",
"next-seo": "^6.4.0",
"next-superjson-plugin": "^0.5.10",
"next-superjson-plugin": "^0.6.3",
"pattycake": "^0.0.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-native": "^0.72.6",
"react-native-web-lite": "1.75.9",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-native": "0.74.2",
"react-native-web-lite": "^1.101.0",
"webpack": "^5.88.2"
},
"devDependencies": {
"@tamagui/next-plugin": "1.75.9",
"@types/react": "^18.2.37",
"@tamagui/next-plugin": "^1.101.0",
"@types/react": "^18.3.3",
"vercel": "32.5.3"
}
}
13 changes: 13 additions & 0 deletions apps/next/pages/legend-offline-first.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { LegendOfflineFirstScreen } from 'app/features/legend-offline-first/screen'
import Head from 'next/head'

export default function Page() {
return (
<>
<Head>
<title>Legend State w/ Offline First</title>
</Head>
<LegendOfflineFirstScreen />
</>
)
}
4 changes: 2 additions & 2 deletions apps/next/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
Expand All @@ -33,8 +34,7 @@
"completionFilters": {
"showColorTokens": true,
"showTrueTokens": true,
"custom": {
}
"custom": {}
}
}
]
Expand Down
Binary file modified bun.lockb
Binary file not shown.
18 changes: 13 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,24 @@
"clean": "git clean -xdf node_modules && rm -f bun.lockb && rm -rf ./apps/next/.next && rm -rf ./apps/next/.tamagui && rm -rf ./apps/next/node_modules && rm -rf ./packages/ui/dist"
},
"workspaces": ["apps/*", "packages/*"],
"resolutions": {
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-refresh": "^0.14.0",
"react-native-svg": "15.3.0",
"react-native-web": "~0.19.12"
},
"dependencies": {
"@babel/runtime": "^7.23.2",
"@babel/runtime": "^7.24.7",
"@biomejs/biome": "1.3.3",
"@manypkg/cli": "^0.21.0",
"@manypkg/cli": "^0.21.4",
"@nderscore/tamagui-typescript-plugin": "^0.6.0",
"@supabase/supabase-js": "^2.38.4",
"@supabase/supabase-js": "^2.43.5",
"check-dependency-version-consistency": "^4.1.0",
"npm-run-all": "^4.1.5",
"react-native-url-polyfill": "^2.0.0",
"typescript": "^5.2.2",
"typescript": "^5.5.2",
"workerd": "1.20231030.0"
}
},
"trustedDependencies": ["@biomejs/biome", "@swc/core", "@t4/api", "es5-ext", "esbuild", "workerd"]
}
26 changes: 18 additions & 8 deletions packages/api/drizzle.config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
import type { Config } from 'drizzle-kit'
import { defineConfig } from 'drizzle-kit'
import { config as loadEnv } from 'dotenv'

export default {
// Load environment variables from .dev.vars
loadEnv({ path: '.dev.vars' })

export default defineConfig({
dialect: 'sqlite',
driver: 'd1-http',
schema: './src/db/schema.ts',
out: './migrations',
driver: 'd1',
dbCredentials: {
wranglerConfigPath: 'wrangler.toml',
dbName: 'production',
accountId: process.env.ACCOUNT_ID || '',
databaseId: process.env.DATABASE_ID || '',
token: process.env.TOKEN || '',
},
out: './migrations',
migrations: {
table: 'migrations',
//schema: 'public',
},
verbose: false,
verbose: true,
strict: true,
} satisfies Config
})
2 changes: 2 additions & 0 deletions packages/api/migrations/0000_chemical_spitfire.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ CREATE TABLE `Car` (
`mileage` integer NOT NULL,
`fuelType` text NOT NULL,
`transmission` text NOT NULL
`created_at` integer NOT NULL,
`updated_at` integer
);
--> statement-breakpoint
CREATE TABLE `User` (
Expand Down
2 changes: 2 additions & 0 deletions packages/api/migrations/0003_hot_ultragirl.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ CREATE TABLE `Car` (
`mileage` integer NOT NULL,
`fuelType` text NOT NULL,
`transmission` text NOT NULL
`created_at` integer NOT NULL,
`updated_at` integer
);
--> statement-breakpoint
CREATE TABLE `User` (
Expand Down
9 changes: 4 additions & 5 deletions packages/api/migrations/meta/0000_snapshot.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"version": "5",
"version": "6",
"dialect": "sqlite",
"id": "b4ee64d5-7b72-4828-8645-33c41f0af619",
"prevId": "00000000-0000-0000-0000-000000000000",
"tables": {
"Car": {
"name": "Car",
Expand Down Expand Up @@ -102,8 +100,9 @@
},
"enums": {},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
}
},
"id": "b4ee64d5-7b72-4828-8645-33c41f0af619",
"prevId": "00000000-0000-0000-0000-000000000000"
}
9 changes: 4 additions & 5 deletions packages/api/migrations/meta/0001_snapshot.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"version": "5",
"version": "6",
"dialect": "sqlite",
"id": "19d05176-7733-4654-b24f-799d3fddc19c",
"prevId": "b4ee64d5-7b72-4828-8645-33c41f0af619",
"tables": {
"Car": {
"name": "Car",
Expand Down Expand Up @@ -125,8 +123,9 @@
},
"enums": {},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
}
},
"id": "19d05176-7733-4654-b24f-799d3fddc19c",
"prevId": "b4ee64d5-7b72-4828-8645-33c41f0af619"
}
9 changes: 4 additions & 5 deletions packages/api/migrations/meta/0002_snapshot.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"version": "5",
"version": "6",
"dialect": "sqlite",
"id": "4dc9ecc7-da6d-4edc-841b-2d44a349d363",
"prevId": "19d05176-7733-4654-b24f-799d3fddc19c",
"tables": {},
"enums": {},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
}
},
"id": "4dc9ecc7-da6d-4edc-841b-2d44a349d363",
"prevId": "19d05176-7733-4654-b24f-799d3fddc19c"
}
9 changes: 4 additions & 5 deletions packages/api/migrations/meta/0003_snapshot.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"version": "5",
"version": "6",
"dialect": "sqlite",
"id": "48283c30-3c21-4114-9533-2235c17d08b9",
"prevId": "4dc9ecc7-da6d-4edc-841b-2d44a349d363",
"tables": {
"Car": {
"name": "Car",
Expand Down Expand Up @@ -102,8 +100,9 @@
},
"enums": {},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
}
},
"id": "48283c30-3c21-4114-9533-2235c17d08b9",
"prevId": "4dc9ecc7-da6d-4edc-841b-2d44a349d363"
}
Loading