Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
13781a9
feat: Add nativewind
codinsonn Apr 4, 2024
8aee576
fix: Add TextLink to provide styles for Next Link
codinsonn Apr 5, 2024
7fed591
chore: Rewrite HomeScreen & SlugScreen to use Nativewind classNames
codinsonn Apr 5, 2024
ca782e9
chore: Add custom primary color in tailwind.theme.js
codinsonn Apr 5, 2024
9efca2f
feat: Parse NativeWind styles in custom Image & Link
codinsonn Apr 8, 2024
8c19f65
feat: Implement React portability patterns
codinsonn Apr 5, 2024
c299b6a
feat: Add portable Image component
codinsonn Apr 9, 2024
9d7c056
feat: Add Apollo Server at '/api/graphql'
codinsonn Apr 12, 2024
328b192
feat: Add graphql.tada for automagic GraphQL typesafety
codinsonn Apr 12, 2024
df0de06
feat: Add buildSchema() script & isomorphic graphqlQuery() helper
codinsonn Apr 14, 2024
6129c89
feat: Add Turborepo setup
codinsonn Apr 21, 2024
0b8518e
chore: Merge plugins for nativewind & portability patterns
codinsonn Apr 25, 2024
6e64548
chore: Merge plugin branch 'with/turborepo'
codinsonn Apr 25, 2024
b05b183
feat: Merge plugin branch 'with/graphql-server-apollo'
codinsonn Apr 29, 2024
08e3201
feat: Add UniversalRouteScreen data fetching with react-query
codinsonn Apr 18, 2024
5892833
feat: Merge plugin branch 'with/react-query'
codinsonn May 1, 2024
fc16c49
chore: Move core files to '@green-stack/core' package workspace
codinsonn May 8, 2024
5232f9b
feat: Add Zod schemas as Source of Truth basis
codinsonn May 12, 2024
3385aae
switch to strict typing
codinsonn May 18, 2024
a2a6fa5
feat: Update to Expo SDK 51
codinsonn May 18, 2024
ad323e9
feat: Add createDataBridge() util to bridge resolvers
codinsonn May 19, 2024
3db6ac2
feat: Add bridgedFetcher() util to @green-stack/core
codinsonn May 20, 2024
07e620d
feat: Add createResolver() util to build resolver from DataBridge
codinsonn May 22, 2024
85e00a9
feat: Add JSON scalar and request context to GraphQL
codinsonn May 23, 2024
29d82e0
feat: Add plugin tests for createSchemaPlugin()
codinsonn Jun 6, 2024
91dfea9
chore: Rename 'typeName' in introspection meta to 'zodType'
codinsonn Jun 7, 2024
9f91787
feat: Add automagic GraphQL codegen for both executable schema & SDL
codinsonn Jun 12, 2024
5731297
feat: Add scriptUtils to build scripts and generators with
codinsonn Jun 13, 2024
cc32977
feat: Add check-workspaces script to @green-stack/core
codinsonn Jun 14, 2024
bd41905
feat: Add collect-resolvers script
codinsonn Jun 15, 2024
92bfc5a
feat: Add link-routes script
codinsonn Jun 16, 2024
12adef1
feat: Add href & params prop hints to Universal Link
codinsonn Jun 16, 2024
baa318a
feat: Add useLayoutInfo() hook to @green-stack/core
codinsonn Jun 16, 2024
fd9bfea
feat: Add workspace generator
codinsonn Jun 16, 2024
1886cf2
feat: Add collect-generators script
codinsonn Jun 16, 2024
6b831ac
feat: Add aliases for @app/core & @green-stack/core through tsConfig …
codinsonn Jun 19, 2024
e97ee50
feat: Add createSchemaModel() method for mock memory db driver
codinsonn Jun 20, 2024
e574d32
feat: Add mock db driver & collect:drivers scripts
codinsonn Jun 28, 2024
44d1031
feat: Added an "add-dependencies" script / generator
codinsonn Jul 10, 2024
b6b8904
feat: Update HomeScreen design
codinsonn Jul 12, 2024
95b54a0
chore: Merge 'main' into 'with/green-stack'
codinsonn Jul 24, 2024
b08dc8e
chore: Merge 'main' into 'with/green-stack'
codinsonn Jul 24, 2024
d73c679
chore: Rename args & response schemas to input & output
codinsonn Aug 8, 2024
ed0cae4
feat: Add upsertOne() to db model driver
codinsonn Aug 8, 2024
3fb34de
feat: Add useFormState() hook to @green-stack/core
codinsonn Aug 23, 2024
6f1d955
chore: Bump expo SDK 51 dependencies
codinsonn Aug 26, 2024
644905a
feat: Add FormScreen and demo route
codinsonn Aug 26, 2024
cc8b05f
feat: Update to nativewind V4
codinsonn Aug 27, 2024
ce023b7
feat: Add styled example Checkbox
codinsonn Aug 28, 2024
1278c57
feat: Add CheckList form component
codinsonn Sep 2, 2024
22ca317
feat: Add array and object support to universal URL params
codinsonn Sep 2, 2024
b8ae2a9
feat: Add RadioGroup form component
codinsonn Sep 3, 2024
3927d18
fix: Deprecated fields 'editable' & 'nativeID'
codinsonn Sep 4, 2024
357fbf4
feat: Add Select form component
codinsonn Sep 8, 2024
4ada53c
feat: Add NumberStepper form component
codinsonn Sep 9, 2024
4ef4fc1
feat: Add TextArea form Component
codinsonn Sep 10, 2024
1eae120
feat: Add useScrollToFocusedInput() hook
codinsonn Sep 10, 2024
f578af5
feat: Add build-theme-colors script and flesh out color utils
codinsonn Sep 12, 2024
d2321d7
feat: Add nativewind support to SVG through cssInterop
codinsonn Sep 12, 2024
fd15841
feat: Add Switch form component
codinsonn Sep 12, 2024
4a15a50
feat: Add geolocation to headerContext if available
codinsonn Sep 13, 2024
410baba
feat: Add UniversalIcon component
codinsonn Sep 13, 2024
e2940c9
feat: Add Button component
codinsonn Sep 17, 2024
d09deb3
feat: Make Form Input components more narrowable
codinsonn Sep 22, 2024
bf24d80
feat: Add efficiency calculator to forms demo
codinsonn Sep 25, 2024
9c87af9
startup-sin: Finish implementing Dark Mode
codinsonn Oct 4, 2024
289332b
fix: Form input styles
codinsonn Oct 11, 2024
300c69a
feat: Add createKey() util to turn objects into key strings
codinsonn Oct 11, 2024
4722b60
fix: Add proper error and disabled states to Form components
codinsonn Oct 19, 2024
bb0e9f6
fix: Remove redundant ComponentDocs.tsx file
codinsonn Oct 27, 2024
7bcdc54
feat: Add schema generator
codinsonn Oct 27, 2024
7573322
fix: Expand @app/config flags
codinsonn Nov 22, 2024
9094402
chore: Add @app/forms path alias to tsconfig
codinsonn Nov 29, 2024
3b2c96f
chore: Update @app/expo dependencies to SDK 52
codinsonn Dec 3, 2024
f59c0cd
fix: Add globRel() as replacement for updated glob version
codinsonn Dec 3, 2024
24b1cbc
fix: Include file extensions in driver/model scripts for expo web
codinsonn Dec 3, 2024
a0ac296
fix: Pin @rn-primitives and reanimated versions
codinsonn Dec 5, 2024
d9fa66f
fix: BackButton behaviour to avoid hydration iissues
codinsonn Dec 6, 2024
6e6146b
fix: Remove expo-constants use in middleware to avoid edge build issues
codinsonn Dec 6, 2024
e9b4a80
chore: Upgrade to Expo SDK 52 #11
codinsonn Dec 6, 2024
a63b448
feat: Add usePrevious() hook to @green-stack/core
codinsonn Dec 6, 2024
90a345c
chore: Upgrade to Next.js 15
codinsonn Dec 7, 2024
7c2afe5
fix: Dark Mode toggle on iOS
codinsonn Dec 9, 2024
83bcd3f
fix: Add patches for react-native-web react 19 compatibility
codinsonn Dec 9, 2024
f991fd0
feat: Upgrade to Next.js 15
codinsonn Dec 9, 2024
1db1bce
fix: Mobile web select
codinsonn Dec 11, 2024
0a8f192
chore: Disable next default logs, add meta to FormScreen
codinsonn Dec 11, 2024
3f5e138
feat: Revamp FormScreen efficiency calculator
codinsonn Dec 13, 2024
73de73c
feat: Add default open-graph image example
codinsonn Dec 13, 2024
1e86967
fix: iPad HomeScreen styles
codinsonn Dec 19, 2024
f82dc19
fix: Add getSelectInputProps() to formState methods
codinsonn Dec 20, 2024
94964cd
chore: Split up FormsScreen into calculation and form demo
codinsonn Dec 24, 2024
ae3d7bf
feat: Overhaul UI colors, add key handlers to forms demo
codinsonn Jan 1, 2025
4917b29
feat: Add build:preview script to test production build locally
codinsonn Jan 1, 2025
f671aa6
chore: Add expo-system-ui for Android Dark Mode stability
codinsonn Jan 3, 2025
c0cf141
feat: Add encrypt() and decrypt() to apiUtils
codinsonn Jan 19, 2025
79701f8
feat: Include requestContext during SSR
codinsonn Jan 19, 2025
2b4e718
feat: Include requestContext in SSR graphql, add ServerRouteScreen
codinsonn Jan 19, 2025
7293eda
fix: Support empty args in GraphQL query + schema scaffolding
codinsonn Jan 19, 2025
084e4b0
feat: Add .sensitive() and 'isSensitive' to schemas
codinsonn Mar 17, 2025
71c7f31
feat: Add DBEntity to @db/driver
codinsonn Mar 17, 2025
447a1e2
chore: Prep for fullproduct.dev and official docs launch
codinsonn Mar 17, 2025
9cf2eff
fix: Utils in preparation for more supported node envs
codinsonn Jun 19, 2025
ede0734
feat: Add createMetadata for Next.js Metadata
codinsonn Jun 19, 2025
270c136
feat: Enable transforming schemas to Zod & TS definitions
codinsonn Jun 19, 2025
b824404
chore: Unify way of doing scripts and templates
codinsonn Jun 19, 2025
f943f0b
feat: Add collect-schemas script
codinsonn Jun 19, 2025
837539f
feat: Add @green-stack/core reference docs files
codinsonn Jun 19, 2025
aa00ddc
feat: Add createPrompts() helper for building generators
codinsonn Jun 19, 2025
13645e6
feat: Add generator generator
codinsonn Jun 19, 2025
76ac987
feat: Add script generator
codinsonn Jun 19, 2025
4c2cee7
feat: Add form generator
codinsonn Jun 19, 2025
f352c89
feat: Add resolver / API generator
codinsonn Jun 19, 2025
c176bf9
feat: Add universal route generator
codinsonn Jun 19, 2025
a16c88a
chore: Remove patch for metro-file-map as no longer required
codinsonn Jun 21, 2025
c9e72ef
feat: Update README.md
codinsonn Jun 21, 2025
7d1d7f6
fix: Issue with reusing input schemas in GraphQL output
codinsonn Jun 27, 2025
409092c
chore: Expand README with image sections to highlight benefits
codinsonn Jun 27, 2025
3d15766
fix: Issue with getAvailableSchemas() in scriptUtils
codinsonn Jun 27, 2025
bfc4b6b
chore: Update README
codinsonn Jun 30, 2025
67c42f6
feat: Update link-routes to allow native only route re-exports
codinsonn Oct 7, 2025
93d5a37
feat: Add 'dev:sim' command to run web + ios
codinsonn Oct 7, 2025
e91f28f
feat: Add universal 'WebView' iframe component
codinsonn Oct 7, 2025
c563eea
feat: Add 'Style' component
codinsonn Oct 7, 2025
7138221
feat: Add 'getCheckableInputProps' to useFormState()
codinsonn Oct 7, 2025
cb47c33
feat: Support img url icons in Button.tsx
codinsonn Oct 8, 2025
2635f4e
feat: Allow jsx children as label in 'Checkbox' component
codinsonn Oct 8, 2025
a6aaf4a
chore: Add selectTriggerRef prop to 'Select' component
codinsonn Oct 8, 2025
8e1b666
feat: Revamp demo screens
codinsonn Oct 8, 2025
7b719c0
feat: Migrate mock DB driver to driver signature pattern
codinsonn Nov 2, 2025
4eea2e0
fix: Update collect-drivers script to avoid circular deps
codinsonn Nov 2, 2025
3c39822
fix: Update collect-schemas script to collect partial definitions
codinsonn Nov 2, 2025
a0865cd
feat: Add minimal User schema and model to be expanded in plugins
codinsonn Nov 2, 2025
421664c
fix: Issue with default exports in link-routes script
codinsonn Nov 2, 2025
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: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,6 @@ yarn-error.log*
.pnp.js

# -- @end @expo/next-adapter --

.turbo
.vscode/tmp
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
}
243 changes: 191 additions & 52 deletions README.md

Large diffs are not rendered by default.

54 changes: 50 additions & 4 deletions apps/expo/.env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,50 @@
EXPO_PUBLIC_BASE_URL=
EXPO_PUBLIC_BACKEND_URL=
EXPO_PUBLIC_API_URL=
EXPO_PUBLIC_GRAPH_URL=
## --- Notes ----------------------------------------------------------------------------------- */

## -i- The `.env.example` file can be copied into `.env.local` using `npx turbo env:local`
## -i- For more info, development, staging & production environments, check the expo docs:
## -i- https://docs.expo.dev/guides/environment-variables/

## -i- Note that Expo will inline environment variables in your bundle during builds & deployments
## -i- This means dynamically retrieving environment variables from e.g. `process.env[someKey]` will not work
## -i- It also means that you should never include sensitive / private keys

## -i- We suggest that for each environment variable you add here, you also add an entry in `appConfig.ts`
## -i- There, you can add logic like ```envValue: process.env.EXPO_PUBLIC_ENV_KEY || process.env.NEXT_PUBLIC_ENV_KEY```
## -i- Where you would only define the EXPO_PUBLIC_ prefixed versions here in `.env.local` locally and using Expo UI for deployed envs

EXPO_PUBLIC_APP_ENV=expo

## --- General --------------------------------------------------------------------------------- */
## -i- Env vars that should always be present & the same locally, independent of the simulated environment
## --------------------------------------------------------------------------------------------- */

# EXAMPLE= # ...

## --- LOCAL ----------------------------------------------------------------------------------- */
## -i- Defaults you might want to switch out for local development by commenting / uncommenting
## --------------------------------------------------------------------------------------------- */

EXPO_PUBLIC_BASE_URL= # Keep empty in `.env.local` for maximum local testability, `appConfig.ts` will figure out back-end URL from expo-config
EXPO_PUBLIC_BACKEND_URL= # Keep empty in `.env.local` for maximum local testability, `appConfig.ts` will figure out back-end URL from expo-config
EXPO_PUBLIC_API_URL= # Keep empty in `.env.local` for maximum local testability, `appConfig.ts` will figure out back-end URL from expo-config
EXPO_PUBLIC_GRAPH_URL= # Keep empty in `.env.local` for maximum local testability, `appConfig.ts` will figure out back-end URL from expo-config

# EXAMPLE= # ...

## --- DEV ------------------------------------------------------------------------------------- */
# -i- Uncomment while on development branch to simulate the dev environment
## --------------------------------------------------------------------------------------------- */

# EXAMPLE= # ...

## --- STAGE ----------------------------------------------------------------------------------- */
# -i- Uncomment while on staging branch to simulate the stage environment
## --------------------------------------------------------------------------------------------- */

# EXAMPLE= # ...

## --- PROD ------------------------------------------------------------------------------------ */
# -i- Uncomment while on main branch to simulate the production environment
## --------------------------------------------------------------------------------------------- */

# EXAMPLE= # ...
4 changes: 3 additions & 1 deletion apps/expo/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
],
"web": {
"bundler": "metro"
}
},
"newArchEnabled": true,
"userInterfaceStyle": "automatic"
}
}
2 changes: 2 additions & 0 deletions apps/expo/app/(generated)/demos/forms/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// -i- Automatically generated by 'npx turbo @green-stack/core#link:routes', do not modify manually, it will get overwritten
export { default } from '@app/core/routes/demos/forms/index'
2 changes: 2 additions & 0 deletions apps/expo/app/(generated)/demos/images/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// -i- Automatically generated by 'npx turbo @green-stack/core#link:routes', do not modify manually, it will get overwritten
export { default } from '@app/core/routes/demos/images/index'
2 changes: 2 additions & 0 deletions apps/expo/app/(generated)/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// -i- Automatically generated by 'npx turbo @green-stack/core#link:routes', do not modify manually, it will get overwritten
export { default } from '@app/core/routes/index'
2 changes: 2 additions & 0 deletions apps/expo/app/(generated)/subpages/[slug]/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// -i- Automatically generated by 'npx turbo @green-stack/core#link:routes', do not modify manually, it will get overwritten
export { default } from '@app/core/routes/subpages/[slug]/index'
3 changes: 0 additions & 3 deletions apps/expo/app/(main)/images/index.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions apps/expo/app/(main)/index.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions apps/expo/app/(main)/subpages/[slug]/index.tsx

This file was deleted.

72 changes: 57 additions & 15 deletions apps/expo/app/ExpoRootLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,66 @@
import { useEffect } from 'react'
import { Stack } from 'expo-router'
import UniversalAppProviders from '@app/core/screens/UniversalAppProviders'
import UniversalRootLayout from '@app/core/screens/UniversalRootLayout'
import { configureReanimatedLogger, ReanimatedLogLevel } from 'react-native-reanimated'
import { isWeb } from '@app/config'
import UniversalAppProviders from '@app/screens/UniversalAppProviders'
import UniversalRootLayout from '@app/screens/UniversalRootLayout'
import { useColorScheme } from 'nativewind'
import { Image as ExpoContextImage } from '@green-stack/components/Image.expo'
import { Link as ExpoContextLink } from '@green-stack/navigation/Link.expo'
import { useRouter as useExpoContextRouter } from '@green-stack/navigation/useRouter.expo'
import { useRouteParams as useExpoRouteParams } from '@green-stack/navigation/useRouteParams.expo'

// -i- Expo Router's layout setup is much simpler than Next.js's layout setup
// -i- Since Expo doesn't require a custom document setup or server component root layout
// -i- Use this file to apply your Expo specific layout setup:
// -i- like rendering our Universal Layout and App Providers

/* --- Reanimated Setup ------------------------------------------------------------------------ */

configureReanimatedLogger({
level: ReanimatedLogLevel.warn,
strict: false,
})

/* --- <ExpoRootLayout> ------------------------------------------------------------------------ */

export default function ExpoRootLayout() {
return (
<UniversalAppProviders>
<UniversalRootLayout>
<Stack
screenOptions={{
headerShown: false,
contentStyle: { backgroundColor: '#FFFFFF' },
animation: 'slide_from_right',
}}
/>
</UniversalRootLayout>
</UniversalAppProviders>
)
// Navigation
const expoContextRouter = useExpoContextRouter()

// Theme
const scheme = useColorScheme()

// -- Effects --

useEffect(() => {
// -i- Make nativewind dark mode work with Expo for Web
if (isWeb && typeof window !== 'undefined') {
const $html = document.querySelector('html')
const isDarkMode = scheme.colorScheme === 'dark'
$html?.classList.toggle('dark', isDarkMode)
}
}, [scheme.colorScheme])

// -- Render --

return (
<UniversalAppProviders
contextImage={ExpoContextImage}
contextLink={ExpoContextLink}
contextRouter={expoContextRouter}
useContextRouteParams={useExpoRouteParams}
isExpo
>
<UniversalRootLayout>
<Stack
screenOptions={{
headerShown: false,
contentStyle: { backgroundColor: '#FFFFFF' },
animation: 'slide_from_right',
}}
/>
</UniversalRootLayout>
</UniversalAppProviders>
)
}
1 change: 1 addition & 0 deletions apps/expo/app/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import ExpoRootLayout from './ExpoRootLayout'
import '../../next/global.css'

// -i- Expo Router's layout setup is much simpler than Next.js's layout setup.
// -i- Since Expo doesn't require a custom document setup or server component root layout.
Expand Down
6 changes: 4 additions & 2 deletions apps/expo/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// babel.config.js
module.exports = function (api) {
api.cache(true)
return {
presets: ["babel-preset-expo"],
presets: [
['babel-preset-expo', { jsxImportSource: 'nativewind' }],
'nativewind/babel',
],
}
}
9 changes: 5 additions & 4 deletions apps/expo/metro.config.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
// -i- Copied from https://docs.expo.dev/guides/monorepos/#modify-the-metro-config
const { getDefaultConfig } = require('expo/metro-config')
const { withNativeWind } = require('nativewind/metro')
const path = require('path')

// Find the project and workspace directories
const projectRoot = __dirname
const workspaceRoot = path.resolve(projectRoot, '../..')
const config = getDefaultConfig(projectRoot)
const config = getDefaultConfig(projectRoot, { isCSSEnabled: true })

// 1. Watch all files within the monorepo
config.watchFolders = [workspaceRoot]

// 2. Let Metro know where to resolve packages and in what order
config.resolver.nodeModulesPaths = [
path.resolve(projectRoot, 'node_modules'),
path.resolve(workspaceRoot, 'node_modules'),
path.resolve(projectRoot, 'node_modules'),
path.resolve(workspaceRoot, 'node_modules'),
]

// 3. Force Metro to resolve (sub)dependencies only from the `nodeModulesPaths`
// config.resolver.disableHierarchicalLookup = true

// Export the modified config
module.exports = config
module.exports = withNativeWind(config, { input: '../next/global.css' })
3 changes: 3 additions & 0 deletions apps/expo/nativewind-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/// <reference types="nativewind/types" />

// NOTE: This file should not be edited and should be committed with your source code. It is generated by NativeWind.
43 changes: 23 additions & 20 deletions apps/expo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,36 @@
"private": true,
"main": "index.js",
"dependencies": {
"@expo/metro-runtime": "^3.2.1",
"expo": "^51.0.8",
"expo-constants": "~16.0.1",
"expo-linking": "~6.3.1",
"expo-router": "~3.5.14",
"expo-status-bar": "~1.12.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.74.1",
"react-native-safe-area-context": "4.10.1",
"react-native-screens": "~3.31.1",
"react-native-web": "~0.19.11",
"expo-image": "~1.12.9"
"@expo/metro-runtime": "~4.0.0",
"expo": "~52.0.11",
"expo-constants": "~17.0.3",
"expo-image": "~2.0.2",
"expo-linking": "~7.0.3",
"expo-router": "~4.0.9",
"expo-status-bar": "~2.0.0",
"expo-system-ui": "~4.0.6",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-native": "0.76.3",
"react-native-safe-area-context": "4.12.0",
"react-native-screens": "~4.1.0",
"react-native-web": "~0.19.13",
"react-native-webview": "^13.12.5"
},
"devDependencies": {
"@babel/core": "^7.19.3",
"@expo/next-adapter": "^6.0.0",
"@types/react": "18.2.48",
"@types/react": "18.2.79",
"typescript": "5.3.3"
},
"scripts": {
"dev": "expo start --clear",
"start": "expo start --clear",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"add-dependencies": "expo install",
"dev": "npx expo start --clear",
"start": "npx expo start --clear",
"android": "npx expo start --android",
"ios": "npx expo start --ios",
"web": "npx expo start --web",
"doctor": "npx expo-doctor",
"add-dependencies": "npx expo install",
"env:local": "cp .env.example .env.local"
}
}
16 changes: 16 additions & 0 deletions apps/expo/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const { universalTheme } = require('@app/core/tailwind.theme.js')

/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: 'class',
content: [
'../../apps/**/*.{js,jsx,ts,tsx,md,mdx}',
'../../features/**/*.{js,jsx,ts,tsx,md,mdx}',
'../../packages/**/*.{js,jsx,ts,tsx,md,mdx}',
],
presets: [require('nativewind/preset')],
theme: {
...universalTheme,
},
plugins: [require('tailwindcss-animate')],
}
29 changes: 18 additions & 11 deletions apps/expo/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
{
"extends": "@app/core/tsconfig",
"include": [
"**/*.ts",
"**/*.tsx",
"../../features/**/*.tsx",
"../../features/**/*.ts",
"../../packages/**/*.tsx",
"../../packages/**/*.ts"
],
"exclude": ["node_modules"]
}
"extends": "@app/core/tsconfig",
"include": [
"**/*.ts",
"**/*.tsx",
"../../apps/next/next-env.d.ts",
"../../packages/@green-stack-core/global.d.ts",
"../../features/@app-core/nativewind-env.d.ts",
"../../features/@app-core/appConfig.ts",
"../../features/**/*.tsx",
"../../features/**/*.ts",
"../../packages/**/*.tsx",
"../../packages/**/*.ts",
"nativewind-env.d.ts"
],
"exclude": [
"node_modules"
]
}
47 changes: 47 additions & 0 deletions apps/next/.env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,51 @@
## --- Notes ----------------------------------------------------------------------------------- */

## -i- The `.env.example` file can be copied into `.env.local` using `npx turbo env:local`
## -i- For development, staging & production environments, check the next.js docs:
## -i- https://nextjs.org/docs/app/building-your-application/configuring/environment-variables

## -i- Note that you should treat environment variables as if they could be inlined in your bundle during builds & deployments
## -i- This means dynamically retrieving environment variables from e.g. `process.env[someKey]` might not work
## -i- It also means that you should never prefix with `NEXT_PUBLIC_` for sensitive / private keys

## -i- We suggest that for each environment variable you add here, you also add an entry in `appConfig.ts`
## -i- There, you can add logic like ```envValue: process.env.NEXT_PUBLIC_ENV_KEY || process.env.EXPO_PUBLIC_ENV_KEY```
## -i- Where you would only define the NEXT_PUBLIC_ prefixed versions here in `.env.local` locally and using Next.js UI for deployed envs
## -i- For environment variables you only be available server-side, you can omit `NEXT_PUBLIC_`

NEXT_PUBLIC_APP_ENV=next

## --- General --------------------------------------------------------------------------------- */
## -i- Env vars that should always be present & the same locally, independent of the simulated environment
## --------------------------------------------------------------------------------------------- */

APP_SECRET="your-secret-here" # used for signing header context, generate a random string

## --- LOCAL ----------------------------------------------------------------------------------- */
## -i- Defaults you might want to switch out for local development by commenting / uncommenting
## --------------------------------------------------------------------------------------------- */

NEXT_PUBLIC_BASE_URL=http://localhost:3000
NEXT_PUBLIC_BACKEND_URL=http://localhost:3000
NEXT_PUBLIC_API_URL=http://localhost:3000/api
NEXT_PUBLIC_GRAPH_URL=http://localhost:3000/api/graphql

# DB_URL= # TODO: Add DB layer connection for full local dev...

## --- DEV ------------------------------------------------------------------------------------- */
# -i- Uncomment while on development branch to simulate the dev environment
## --------------------------------------------------------------------------------------------- */

# DB_URL= # TODO: Add DB layer connection for the dev environment...

## --- STAGE ----------------------------------------------------------------------------------- */
# -i- Uncomment while on staging branch to simulate the stage environment
## --------------------------------------------------------------------------------------------- */

# DB_URL= # TODO: Add DB layer connection for the stage environment...

## --- PROD ------------------------------------------------------------------------------------ */
# -i- Uncomment while on main branch to simulate the production environment
## --------------------------------------------------------------------------------------------- */

# DB_URL= # TODO: Add DB layer connection for the production environment...
2 changes: 2 additions & 0 deletions apps/next/app/(generated)/api/graphql/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// -i- Automatically generated by 'npx turbo @green-stack/core#link:routes', do not modify manually, it will get overwritten
export { GET, POST } from '@app/core/routes/api/graphql/route'
2 changes: 2 additions & 0 deletions apps/next/app/(generated)/api/health/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// -i- Automatically generated by 'npx turbo @green-stack/core#link:routes', do not modify manually, it will get overwritten
export { GET, POST } from '@app/core/routes/api/health/route'
Loading