Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Agents Guide

This is a RoxyAPI starter app. A tarot reading app built with React Native, Expo SDK 57, and TypeScript. Ships with the full 78 card Rider Waite deck, daily readings, multi card spreads, and yes or no divination, all powered by the RoxyAPI Tarot API through the official `@roxyapi/sdk`.
This is a RoxyAPI starter app. A tarot reading app built with React Native, Expo SDK 57, and TypeScript. Ships with the full 78 card deck in its 1909 Pamela Colman Smith edition, daily readings, multi card spreads, and yes or no divination, all powered by the RoxyAPI Tarot API through the official `@roxyapi/sdk`.

## Setup
- Get an API key at https://roxyapi.com/pricing
Expand Down
3 changes: 2 additions & 1 deletion app/(tabs)/browse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { router } from "expo-router";
import { appColors } from "../../src/constants/colors";
import { hasApiKey, tarotApi } from "../../src/api";
import type { BasicCard } from "../../src/api/types";
import { CARD_ASPECT } from "../../src/constants/card";

export default function BrowseCardsScreen() {
const [cards, setCards] = useState<BasicCard[]>([]);
Expand Down Expand Up @@ -93,7 +94,7 @@ export default function BrowseCardsScreen() {
<View className="bg-zinc-50 dark:bg-zinc-900 rounded-xl p-2">
<Image
source={{ uri: item.imageUrl }}
style={{ width: '100%', aspectRatio: 0.6 }}
style={{ width: '100%', aspectRatio: CARD_ASPECT }}
contentFit="contain"
/>
<Text className="text-xs text-center mt-1 text-zinc-700 dark:text-zinc-300" numberOfLines={2}>
Expand Down
3 changes: 2 additions & 1 deletion app/(tabs)/draw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Image } from "expo-image";
import { router } from "expo-router";
import { tarotApi } from "../../src/api";
import type { DrawnCard } from "../../src/api/types";
import { CARD_ASPECT } from "../../src/constants/card";

export default function DrawScreen() {
const [count, setCount] = useState(3);
Expand Down Expand Up @@ -73,7 +74,7 @@ export default function DrawScreen() {
<View className="bg-zinc-50 dark:bg-zinc-900 rounded-xl p-3">
<Image
source={{ uri: item.imageUrl }}
style={{ width: 126, height: 210 }}
style={{ width: 126, aspectRatio: CARD_ASPECT }}
contentFit="contain"
/>
<Text className="text-xs mt-2 text-center font-semibold text-zinc-900 dark:text-white">
Expand Down
5 changes: 3 additions & 2 deletions app/(tabs)/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useUserId } from "../../src/hooks/useUserId";
import type { DailyCardResponse } from "../../src/api/types";
import { RotateCcw } from "lucide-react-native";
import { appColors } from "../../src/constants/colors";
import { CARD_ASPECT } from "../../src/constants/card";

export default function DailyCardScreen() {
const { userId, loading: userIdLoading } = useUserId();
Expand Down Expand Up @@ -69,7 +70,7 @@ export default function DailyCardScreen() {
return (
<ScrollView className="flex-1 bg-white dark:bg-zinc-950">
<View className="px-6 pt-6 pb-8">
<View className="items-center">
<View className="items-center mb-6">
<Text className="text-sm uppercase tracking-wider text-zinc-500 dark:text-zinc-500 mb-3 font-medium">
{new Date(dailyCard.date).toLocaleDateString('en-US', {
weekday: 'long',
Expand Down Expand Up @@ -97,7 +98,7 @@ export default function DailyCardScreen() {
>
<Image
source={{ uri: card.imageUrl }}
style={{ width: 220, height: 374 }}
style={{ width: 220, aspectRatio: CARD_ASPECT }}
contentFit="contain"
transition={300}
/>
Expand Down
3 changes: 2 additions & 1 deletion app/(tabs)/spreads.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { LayoutGrid, Heart, Briefcase, RotateCcw } from "lucide-react-native";
import { appColors } from "../../src/constants/colors";
import { tarotApi } from "../../src/api";
import type { SpreadResponse } from "../../src/api/types";
import { CARD_ASPECT } from "../../src/constants/card";

type SpreadPosition = SpreadResponse['positions'][number];

Expand Down Expand Up @@ -70,7 +71,7 @@ export default function SpreadsScreen() {
<View className="bg-zinc-50 dark:bg-zinc-900 rounded-xl p-3 flex-row items-center">
<Image
source={{ uri: position.card.imageUrl }}
style={{ width: 60, height: 102 }}
style={{ width: 60, aspectRatio: CARD_ASPECT }}
contentFit="contain"
/>
<View className="flex-1 ml-3">
Expand Down
3 changes: 2 additions & 1 deletion app/(tabs)/yes-no.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { appColors } from "../../src/constants/colors";
import { tarotApi } from "../../src/api";
import type { YesNoResponse } from "../../src/api/types";
import { Image } from "expo-image";
import { CARD_ASPECT } from "../../src/constants/card";

export default function YesNoScreen() {
const [question, setQuestion] = useState("");
Expand Down Expand Up @@ -81,7 +82,7 @@ export default function YesNoScreen() {
<View className="bg-zinc-100 dark:bg-zinc-800 rounded-2xl p-4">
<Image
source={{ uri: result.card.imageUrl }}
style={{ width: 180, height: 300 }}
style={{ width: 180, aspectRatio: CARD_ASPECT }}
contentFit="contain"
/>
</View>
Expand Down
3 changes: 2 additions & 1 deletion app/card/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Image } from "expo-image";
import { appColors } from "../../src/constants/colors";
import { tarotApi } from "../../src/api";
import type { TarotCard } from "../../src/api/types";
import { CARD_ASPECT } from "../../src/constants/card";

export default function CardDetailScreen() {
const { id } = useLocalSearchParams<{ id: string }>();
Expand Down Expand Up @@ -43,7 +44,7 @@ export default function CardDetailScreen() {
<View className="bg-zinc-100 dark:bg-zinc-800 rounded-2xl p-4">
<Image
source={{ uri: card.imageUrl }}
style={{ width: 220, height: 374 }}
style={{ width: 220, aspectRatio: CARD_ASPECT }}
contentFit="contain"
/>
</View>
Expand Down
Loading
Loading