Skip to content

Commit 9bbf482

Browse files
committed
feat(app): auth route groups, Welcome stub, and wallet roadmap docs
Routing and UI: - Add auth/AuthContext stub (isAuthenticated, signIn, signOut) and wrap the root layout with AuthProvider. - Add Expo Router groups (auth) and (app): welcome placeholder at /welcome; guard (app) routes when logged out. - Replace app/index with a redirect to /welcome or /home; move the previous wallet screen to (app)/home. - Move AI screen under (app)/ai so /ai shares the same auth guard as home. - Apply useColors() for background and text on home and AI for a consistent theme. Documentation: - Extend texts/wallet-implementation-roadmap-and-login-alignment.md with logged-in session storage, Welcome provider implementation (links and steps), Telegram Mini App vs web Continue with Telegram, and compliance notes. Tooling: - Add scripts/stop-cloudflared-service.ps1 to stop the Cloudflared Windows service with elevation. Made-with: Cursor
1 parent 798e7cd commit 9bbf482

10 files changed

Lines changed: 784 additions & 427 deletions

File tree

app/(app)/_layout.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { Redirect, Stack } from "expo-router";
2+
import { useAuth } from "../../auth/AuthContext";
3+
4+
export default function AppGroupLayout() {
5+
const { isAuthenticated } = useAuth();
6+
7+
if (!isAuthenticated) {
8+
return <Redirect href="/welcome" />;
9+
}
10+
11+
return <Stack screenOptions={{ headerShown: false }} />;
12+
}

app/ai.tsx renamed to app/(app)/ai.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
import React from "react";
22
import { View, Text, StyleSheet } from "react-native";
33
import { useLocalSearchParams } from "expo-router";
4+
import { useColors } from "../../ui/theme";
45

56
export default function AiScreen() {
7+
const colors = useColors();
68
const { prompt } = useLocalSearchParams<{ prompt?: string }>();
79

810
return (
9-
<View style={styles.container}>
10-
<Text style={styles.title}>AI</Text>
11+
<View style={[styles.container, { backgroundColor: colors.background }]}>
12+
<Text style={[styles.title, { color: colors.primary }]}>AI</Text>
1113
{prompt ? (
12-
<Text style={styles.prompt}>Prompt: {prompt}</Text>
14+
<Text style={[styles.prompt, { color: colors.primary }]}>Prompt: {prompt}</Text>
1315
) : (
14-
<Text style={styles.hint}>No prompt</Text>
16+
<Text style={[styles.hint, { color: colors.secondary }]}>No prompt</Text>
1517
)}
1618
</View>
1719
);
@@ -30,10 +32,8 @@ const styles = StyleSheet.create({
3032
},
3133
prompt: {
3234
fontSize: 14,
33-
color: "#333",
3435
},
3536
hint: {
3637
fontSize: 14,
37-
color: "#888",
3838
},
3939
});

0 commit comments

Comments
 (0)