Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
5bde57c
Wrapped clerk provider and sign in stuff
manueltorres0 Jan 21, 2026
60ec0bb
shared done + fix to web
manueltorres0 Jan 24, 2026
8860a44
login/logout + client utility)
manueltorres0 Jan 26, 2026
f1572ac
added mobile setup
manueltorres0 Jan 26, 2026
3aeb818
small fix
manueltorres0 Jan 26, 2026
ff61b60
api clients working
manueltorres0 Jan 26, 2026
b34d21b
merged main
manueltorres0 Jan 26, 2026
e5db37f
merge side-effects fix
manueltorres0 Jan 26, 2026
71db057
more merge conflicts
manueltorres0 Jan 26, 2026
8ec5112
BIG fixes to frontend
manueltorres0 Jan 26, 2026
2313fcd
test failure fixes
manueltorres0 Jan 27, 2026
9cd090a
linting
manueltorres0 Jan 27, 2026
7993abf
test fix FINALLY
manueltorres0 Jan 27, 2026
04ba537
small
manueltorres0 Jan 29, 2026
470609e
comments
manueltorres0 Feb 4, 2026
c0241bb
merged main
manueltorres0 Feb 4, 2026
9b283aa
solved merge conflicts
manueltorres0 Feb 4, 2026
4300a2e
fixing merge conflicts
manueltorres0 Feb 4, 2026
878f1ae
changes
manueltorres0 Feb 4, 2026
559bd12
broken
manueltorres0 Feb 4, 2026
8a1fe65
major refactor or orval and useApiClient
manueltorres0 Feb 4, 2026
ceeeb8a
refactor of useAuth injection
manueltorres0 Feb 5, 2026
103a2bf
small fixes
manueltorres0 Feb 5, 2026
c9629e1
small fixes
manueltorres0 Feb 5, 2026
d4ed3d8
detail
manueltorres0 Feb 5, 2026
52c6054
removed unfixable tests
manueltorres0 Feb 5, 2026
79b744b
fix of config files
manueltorres0 Feb 5, 2026
66451d6
fix to param builder func + env variable invocation
manueltorres0 Feb 5, 2026
d80c454
slight fix
manueltorres0 Feb 5, 2026
d863ea3
Merge branch 'main' into feat/clerk-web
manueltorres0 Feb 6, 2026
3fef9d7
merged main
manueltorres0 Feb 6, 2026
0039f41
fixes
manueltorres0 Feb 14, 2026
23c6e43
small fix
manueltorres0 Feb 14, 2026
2ce9786
linter
manueltorres0 Feb 14, 2026
144c7a6
useEffect revert
manueltorres0 Feb 17, 2026
c7581ee
linter please bro
manueltorres0 Feb 17, 2026
0b98013
bro linter
manueltorres0 Feb 17, 2026
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
4 changes: 3 additions & 1 deletion backend/internal/service/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,10 @@ func setupApp() *fiber.App {
}))

app.Use(cors.New(cors.Config{
AllowOrigins: "*",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep this * for now, ideally you don't want to limit this to be localhost

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think fiber does not allow the "*" when you require credentials, if I change it to the star the server crashes

AllowOrigins: "http://localhost:3000, http://localhost:8081",
AllowMethods: "GET,POST,PUT,DELETE",
AllowHeaders: "Origin, Content-Type, Authorization",
AllowCredentials: true,
}))

return app
Expand Down
6 changes: 4 additions & 2 deletions clients/mobile/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"userInterfaceStyle": "automatic",
"newArchEnabled": true,
"ios": {
"supportsTablet": true
"supportsTablet": true,
"bundleIdentifier": "com.anonymous.mobile"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this needed? Lmk if it was just a part of an install

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

part of an install I believe, because I did not add it manually

},
"android": {
"adaptiveIcon": {
Expand Down Expand Up @@ -38,7 +39,8 @@
"backgroundColor": "#000000"
}
}
]
],
"expo-secure-store"
],
"experiments": {
"typedRoutes": true,
Expand Down
29 changes: 24 additions & 5 deletions clients/mobile/app/(tabs)/__tests__/index.test.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
import { render } from "@testing-library/react-native";
import HomeScreen from "../index";

// Mock the shared hook
jest.mock("@shared/hooks/use-hello", () => ({
useGetHelloName: jest.fn(() => ({
data: null,
jest.mock("@clerk/clerk-expo", () => {
const actual = jest.requireActual("@clerk/clerk-expo");
return {
...actual,
useAuth: () => ({
getToken: async () => null,
isLoaded: true,
isSignedIn: false,
userId: null,
sessionId: null,
}),
};
});

jest.mock("../../../hooks/use-hello", () => ({
useGetHello: () => ({
data: "hello",
isLoading: false,
error: null,
refetch: jest.fn(),
}),
useGetHelloName: () => ({
data: "hello-name",
isLoading: false,
error: null,
refetch: jest.fn(),
})),
}),
}));

// Mock expo-image
Expand Down
29 changes: 17 additions & 12 deletions clients/mobile/app/(tabs)/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,33 +1,38 @@
import { Tabs } from 'expo-router';
import React from 'react';
import { Tabs } from "expo-router";
import React from "react";

import { HapticTab } from '@/components/haptic-tab';
import { IconSymbol } from '@/components/ui/icon-symbol';
import { Colors } from '@/constants/theme';
import { useColorScheme } from '@/hooks/use-color-scheme';
import { HapticTab } from "@/components/haptic-tab";
import { IconSymbol } from "@/components/ui/icon-symbol";
import { Colors } from "@/constants/theme";
import { useColorScheme } from "@/hooks/use-color-scheme";

export default function TabLayout() {
const colorScheme = useColorScheme();

return (
<Tabs
screenOptions={{
tabBarActiveTintColor: Colors[colorScheme ?? 'light'].tint,
tabBarActiveTintColor: Colors[colorScheme ?? "light"].tint,
headerShown: false,
tabBarButton: HapticTab,
}}>
}}
>
<Tabs.Screen
name="index"
options={{
title: 'Home',
tabBarIcon: ({ color }) => <IconSymbol size={28} name="house.fill" color={color} />,
title: "Home",
tabBarIcon: ({ color }) => (
<IconSymbol size={28} name="house.fill" color={color} />
),
}}
/>
<Tabs.Screen
name="explore"
options={{
title: 'Explore',
tabBarIcon: ({ color }) => <IconSymbol size={28} name="paperplane.fill" color={color} />,
title: "Explore",
tabBarIcon: ({ color }) => (
<IconSymbol size={28} name="paperplane.fill" color={color} />
),
}}
/>
</Tabs>
Expand Down
2 changes: 1 addition & 1 deletion clients/mobile/app/(tabs)/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { HelloWave } from "@/components/hello-wave";
import ParallaxScrollView from "@/components/parallax-scroll-view";
import { ThemedText } from "@/components/themed-text";
import { ThemedView } from "@/components/themed-view";
import { useGetHelloName } from "@shared/hooks/use-hello";
import { useGetHelloName } from "@/hooks/use-hello";

export default function HomeScreen() {
const [name, setName] = useState("");
Expand Down
64 changes: 43 additions & 21 deletions clients/mobile/app/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
import {
DarkTheme,
DefaultTheme,
ThemeProvider,
} from "@react-navigation/native";
import { Stack } from "expo-router";
import { StatusBar } from "expo-status-bar";
import { SafeAreaProvider } from "react-native-safe-area-context";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import "react-native-reanimated";
import "../global.css";
import {
DarkTheme,
DefaultTheme,
ThemeProvider,
} from "@react-navigation/native";

import { tokenCache } from "@clerk/clerk-expo/token-cache";
import { ClerkProvider, ClerkLoaded, useAuth } from "@clerk/clerk-expo";
import { useColorScheme } from "@/hooks/use-color-scheme";
import { setConfig } from "@shared";
import { useEffect } from "react";

// Client explicity created outside component to avoid recreation
const queryClient = new QueryClient({
Expand All @@ -27,25 +31,43 @@ export const unstable_settings = {
anchor: "(tabs)",
};

// Component to configure auth provider and the api base url
function AppConfigurator() {
const { getToken } = useAuth()
useEffect(() => {
setConfig({ API_BASE_URL: process.env.EXPO_PUBLIC_API_BASE_URL ?? '', getToken })
}, [getToken])

return null
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm I see why you did it this way originally, if the getToken updates (cases like logouts), we want to also update our provider. Sorry for the misdirection, I think this useEffect approach works better relative to our new structure.


export default function RootLayout() {
const colorScheme = useColorScheme();

return (
<QueryClientProvider client={queryClient}>
<SafeAreaProvider>
<ThemeProvider
value={colorScheme === "dark" ? DarkTheme : DefaultTheme}
>
<Stack>
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
<Stack.Screen
name="modal"
options={{ presentation: "modal", title: "Modal" }}
/>
</Stack>
<StatusBar style="auto" />
</ThemeProvider>
</SafeAreaProvider>
</QueryClientProvider>
<ClerkProvider
publishableKey={process.env.EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY!}
tokenCache={tokenCache}
>
<ClerkLoaded>
<AppConfigurator />
<QueryClientProvider client={queryClient}>
<SafeAreaProvider>
<ThemeProvider
value={colorScheme === "dark" ? DarkTheme : DefaultTheme}
>
<Stack>
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
<Stack.Screen
name="modal"
options={{ presentation: "modal", title: "Modal" }}
/>
</Stack>
<StatusBar style="auto" />
</ThemeProvider>
</SafeAreaProvider>
</QueryClientProvider>
</ClerkLoaded>
</ClerkProvider>
);
}
12 changes: 12 additions & 0 deletions clients/mobile/app/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { StyleSheet, Text, View } from "react-native";

Check warning on line 1 in clients/mobile/app/index.tsx

View workflow job for this annotation

GitHub Actions / Lint

'StyleSheet' is defined but never used

export default function Page() {
return (
<View className="flex-1 items-center p-6">
<View className="flex-1 justify-center max-w-4xl mx-auto">
<Text className="text-6xl font-bold">Hello</Text>
<Text className="text-4xl text-gray-700">World</Text>
</View>
</View>
);
}
12 changes: 6 additions & 6 deletions clients/mobile/app/modal.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Link } from 'expo-router';
import { StyleSheet } from 'react-native';
import { Link } from "expo-router";
import { StyleSheet } from "react-native";

import { ThemedText } from '@/components/themed-text';
import { ThemedView } from '@/components/themed-view';
import { ThemedText } from "@/components/themed-text";
import { ThemedView } from "@/components/themed-view";

export default function ModalScreen() {
return (
Expand All @@ -18,8 +18,8 @@ export default function ModalScreen() {
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
alignItems: "center",
justifyContent: "center",
padding: 20,
},
link: {
Expand Down
9 changes: 0 additions & 9 deletions clients/mobile/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@ module.exports = function (api) {
"nativewind/babel",
],
plugins: [
[
"module:react-native-dotenv",
{
moduleName: "react-native-dotenv",
path: ".env",
safe: false,
allowUndefined: true,
},
],
],
};
};
34 changes: 18 additions & 16 deletions clients/mobile/components/__tests__/themed-text.test.tsx
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
import { render } from '@testing-library/react-native';
import { ThemedText } from '../themed-text';
import { render } from "@testing-library/react-native";
import { ThemedText } from "../themed-text";

describe('ThemedText', () => {
it('renders text content', () => {
describe("ThemedText", () => {
it("renders text content", () => {
const { getByText } = render(<ThemedText>Hello World</ThemedText>);
expect(getByText('Hello World')).toBeTruthy();
expect(getByText("Hello World")).toBeTruthy();
});

it('applies title className', () => {
it("applies title className", () => {
const { getByText } = render(<ThemedText type="title">Title</ThemedText>);
const element = getByText('Title');
expect(element.props.className).toContain('text-[32px]');
expect(element.props.className).toContain('font-bold');
const element = getByText("Title");
expect(element.props.className).toContain("text-[32px]");
expect(element.props.className).toContain("font-bold");
});

it('applies custom className', () => {
it("applies custom className", () => {
const { getByText } = render(
<ThemedText className="text-red-500">Custom</ThemedText>
<ThemedText className="text-red-500">Custom</ThemedText>,
);
const element = getByText('Custom');
expect(element.props.className).toContain('text-red-500');
const element = getByText("Custom");
expect(element.props.className).toContain("text-red-500");
});

it('passes through props', () => {
it("passes through props", () => {
const { getByTestId } = render(
<ThemedText testID="test-text" numberOfLines={2}>Test</ThemedText>
<ThemedText testID="test-text" numberOfLines={2}>
Test
</ThemedText>,
);
const element = getByTestId('test-text');
const element = getByTestId("test-text");
expect(element.props.numberOfLines).toBe(2);
});
});
15 changes: 10 additions & 5 deletions clients/mobile/components/external-link.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import { Href, Link } from 'expo-router';
import { openBrowserAsync, WebBrowserPresentationStyle } from 'expo-web-browser';
import { type ComponentProps } from 'react';
import { Href, Link } from "expo-router";
import {
openBrowserAsync,
WebBrowserPresentationStyle,
} from "expo-web-browser";
import { type ComponentProps } from "react";

type Props = Omit<ComponentProps<typeof Link>, 'href'> & { href: Href & string };
type Props = Omit<ComponentProps<typeof Link>, "href"> & {
href: Href & string;
};

export function ExternalLink({ href, ...rest }: Props) {
return (
Expand All @@ -11,7 +16,7 @@ export function ExternalLink({ href, ...rest }: Props) {
{...rest}
href={href}
onPress={async (event) => {
if (process.env.EXPO_OS !== 'web') {
if (process.env.EXPO_OS !== "web") {
// Prevent the default behavior of linking to the default browser on native.
event.preventDefault();
// Open the link in an in-app browser.
Expand Down
8 changes: 4 additions & 4 deletions clients/mobile/components/haptic-tab.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { BottomTabBarButtonProps } from '@react-navigation/bottom-tabs';
import { PlatformPressable } from '@react-navigation/elements';
import * as Haptics from 'expo-haptics';
import { BottomTabBarButtonProps } from "@react-navigation/bottom-tabs";
import { PlatformPressable } from "@react-navigation/elements";
import * as Haptics from "expo-haptics";

export function HapticTab(props: BottomTabBarButtonProps) {
return (
<PlatformPressable
{...props}
onPressIn={(ev) => {
if (process.env.EXPO_OS === 'ios') {
if (process.env.EXPO_OS === "ios") {
// Add a soft haptic feedback when pressing down on the tabs.
Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
}
Expand Down
9 changes: 5 additions & 4 deletions clients/mobile/components/hello-wave.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import Animated from 'react-native-reanimated';
import Animated from "react-native-reanimated";

export function HelloWave() {
return (
<Animated.Text
className="text-[28px] leading-8 -mt-1.5"
style={{
animationName: {
'50%': { transform: [{ rotate: '25deg' }] },
"50%": { transform: [{ rotate: "25deg" }] },
},
animationIterationCount: 4,
animationDuration: '300ms',
}}>
animationDuration: "300ms",
}}
>
👋
</Animated.Text>
);
Expand Down
Loading
Loading