diff --git a/.gitignore b/.gitignore index e93db3d..bb73483 100644 --- a/.gitignore +++ b/.gitignore @@ -36,7 +36,16 @@ yarn-error.* # typescript *.tsbuildinfo +# database migrations (team members should generate their own) +drizzle/ + app-example android ios + +.idea/ +.vscode/ + +.qodo/ +.crush/ \ No newline at end of file diff --git a/README.md b/README.md index 5dd4ee4..3711acd 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,200 @@ -# Welcome to your Expo app πŸ‘‹ + -This is an [Expo](https://expo.dev) project created with [`create-expo-app`](https://www.npmjs.com/package/create-expo-app). +# Finance.io -## Get started +Finance.io is a modern personal finance management app designed to help you track, analyze, and optimize your finances across Android, iOS, and web. With a simple interface and powerful features, Finance-IO makes budgeting, expense tracking, and financial planning accessible to everyone. -1. Install dependencies +All UI development follows our official Figma design: [Finance-IO Figma UI](https://www.figma.com/design/JQFXBsYUqEdSLD3OQUwp1H/Native-Finance-App---Finance.io?node-id=0-1&p=f&t=SOgQXPopZ1yAeuZK-0) - ```bash - pnpm install - ``` +## Key Features -2. Start the app +- **Multi-platform support:** Use Finance.io on Android, IOS, and web. +- **Internationalization:** Available in 16 languages for global users. +- **Secure authentication:** Powered by Clerk for safe sign-in and sign-up. +- **Dashboard overview:** Visualize your accounts, transactions, and spending trends. +- **Expense tracking:** Easily add, categorize, and review your expenses. +- **Budget planning:** Set budgets and monitor your progress. +- **Data privacy:** Your financial data is securely stored and never shared. +- **Customizable themes:** Personalize your experience with light/dark modes. +- **Fast and responsive:** Built with Expo, React Native, and TailwindCSS for a smooth experience. - ```bash - pnpm android - ``` +## πŸš€ Quick Start -In the output, you'll find options to open the app in a +### 1. Install Expo Go -- [development build](https://docs.expo.dev/develop/development-builds/introduction/) -- [Android emulator](https://docs.expo.dev/workflow/android-studio-emulator/) -- [iOS simulator](https://docs.expo.dev/workflow/ios-simulator/) -- [Expo Go](https://expo.dev/go), a limited sandbox for trying out app development with Expo +Download Expo Go from the [Google Play Store](https://play.google.com/store/apps/details?id=host.exp.exponent) or [Apple App Store](https://apps.apple.com/app/expo-go/id982107779). -You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction). +### 2. Clone the Repository -## Learn more +```bash +git clone https://github.com/The-Creative-Programming-Group/finance-io.git +cd finance-io +``` -To learn more about developing your project with Expo, look at the following resources: +#### Install dependencies -- [Expo documentation](https://docs.expo.dev/): Learn fundamentals, or go into advanced topics with our [guides](https://docs.expo.dev/guides). -- [Learn Expo tutorial](https://docs.expo.dev/tutorial/introduction/): Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web. +With **pnpm**: -## Join the community +```bash +pnpm install +``` -Join our community of developers creating universal apps. +With **npm**: -- [Expo on GitHub](https://github.com/expo/expo): View our open source platform and contribute. -- [Discord community](https://chat.expo.dev): Chat with Expo users and ask questions. +```bash +pnpm install +``` + +With **yarn**: + +```bash +yarn install +``` + +### 3. Set Up Environment Variables + +- Copy `.env.example` to `.env.local`. +- Fill in the required values (see comments in `.env.example` for details). + +### 4. Start the Development Server + +With **pnpm**: + +```bash +pnpm start +``` + +With **npm**: + +```bash +pnpm android # for Android +# or +pnpm ios # for iOS +``` + +With **yarn**: + +```bash +yarn start +``` + +- Scan the QR code with Expo Go to launch the app on your device. + +## πŸ“± Native Build Setup (Optional) + +If you want to build a native app (APK/IPA): + +- Edit `app.json` as needed, especially the `eas.projectId` and `owner` fields: + + ```json + "eas": { + "projectId": "YOUR_PROJECT_ID" + }, + "owner": "YOUR_EXPO_OWNER" + ``` + +- For more details, see the [Expo EAS documentation](https://docs.expo.dev/eas/). + +## πŸ—‚ Project Structure + +``` +src/ + app/ + components/ + contexts/ + data/ + db/ + server/ + services/ + trpc/ + types/ + utils/ +localization/ +assets/ +drizzle/ +``` + +- **app/**: Screens and layouts using Expo Router. +- **components/**: Reusable UI elements. +- **contexts/**: Theme and other React context providers. +- **db/**: Database schema and ORM config. +- **server/**: API routes and backend logic. +- **services/**: Business logic modules. +- **trpc/**: tRPC client setup. +- **types/**: TypeScript types. +- **utils/**: Utility functions. +- **localization/**: Language files for internationalization. +- **assets/**: Fonts, icons, images. +- **drizzle/**: Database migrations. + +## πŸ›  Technology Stack & Resources + +- **Expo (React Native):** [Expo Documentation](https://docs.expo.dev/) +- **Expo Router:** [Expo Router Docs](https://expo.github.io/router/docs/) +- **TailwindCSS:** [TailwindCSS Docs](https://tailwindcss.com/docs) +- **NativeWind:** [NativeWind Docs](https://www.nativewind.dev/) +- **tRPC:** [tRPC Documentation](https://trpc.io/docs) +- **React Query:** [React Query Docs](https://tanstack.com/query/latest) +- **Drizzle ORM:** [Drizzle ORM Docs](https://orm.drizzle.team/docs) +- **Clerk (Authentication):** [Clerk Docs](https://clerk.com/docs) +- **react-i18next:** [react-i18next Docs](https://react.i18next.com/) + +## πŸ›  Troubleshooting & FAQ + +### Metro bundler not connecting / Unable to load script + +- Ensure `pnpm start`, `npm start`, or `yarn start` is running. +- Make sure your device and computer are on the same Wi-Fi, or use USB with `adb reverse tcp:8081 tcp:8081` for Android. +- Check firewall settings and allow port 8081. + +### App stuck on splash screen + +- Check Metro terminal and device logs for errors. +- Verify environment variables in `.env.local` are set correctly. +- Free up device storage if nearly full. + +### Environment variable issues + +- Copy `.env.example` to `.env.local` and fill in all required values. +- Missing Clerk keys will cause authentication errors. + +### More help + +- See official docs in the Technology Stack & Resources section above. +- For Expo-specific issues: [Expo Troubleshooting Guide](https://docs.expo.dev/troubleshooting/common-issues/) +- If your issue isn’t listed here, check the [open issues](https://github.com/The-Creative-Programming-Group/finance-io/issues) on GitHub for possible solutions or updates. + +## 🎨 Design & UI Resources + +All UI development should follow the official Figma design for Finance.io. +Access the design here: [Finance-IO Figma UI](https://www.figma.com/design/JQFXBsYUqEdSLD3OQUwp1H/Native-Finance-App---Finance.io?node-id=0-1&p=f&t=SOgQXPopZ1yAeuZK-0) + +## πŸ‘ Contributing + +We welcome contributions! To get started: + +1. Fork the repository and create your branch from `master`. +2. Make your changes, following our code style and best practices. +3. Ensure your code is formatted and linted. +4. Submit a pull request with a clear description of your changes. + +Please read our [CONTRIBUTING.md](https://github.com/The-Creative-Programming-Group/finance-io/wiki/Contributing-to-Finance.io) for more details. + + + +## πŸ“¬ Contact / Support + +For questions, issues, or feature requests, please open an issue on GitHub + + + +![Build Status](https://img.shields.io/github/workflow/status/The-Creative-Programming-Group/finance-io/CI) +![License](https://img.shields.io/github/license/The-Creative-Programming-Group/finance-io) --> + +## πŸ“œ Changelog + +See [CHANGELOG.md](https://github.com/The-Creative-Programming-Group/finance-io/wiki/Contributing-to-Finance.io) for release history and updates. diff --git a/app.json b/app.json index 3d140a8..0217b3b 100644 --- a/app.json +++ b/app.json @@ -58,11 +58,12 @@ }, "extra": { "EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY": { - "default": null, + "default": "", "env": "EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY" }, + "router": {}, "eas": { - "projectId": "8ee47c07-a70e-4403-b426-81a2b6c96652" + "projectId": "c5abc4a2-a239-43c3-8f05-49453d5ef6bd" } }, "owner": "murtazanoori" diff --git a/package.json b/package.json index f0efce0..1cb862e 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,8 @@ "lint": "expo lint", "typecheck": "tsc --noEmit", "format:check": "prettier --check .", + "db:generate": "db:generate", + "db:push": "db:push", "format:write": "prettier --write ." }, "jest": { @@ -57,6 +59,7 @@ "lucide-react": "^0.511.0", "lucide-react-native": "^0.509.0", "nativewind": "^4.1.23", + "pnpm": "^10.12.4", "react": "19.0.0", "react-dom": "19.0.0", "react-freeze": "^1.0.4", diff --git a/src/app/_layout.tsx b/src/app/_layout.tsx index 0178c3f..6bfc7be 100644 --- a/src/app/_layout.tsx +++ b/src/app/_layout.tsx @@ -39,6 +39,9 @@ const tokenCache = { // Environment variable check with detailed error const publishableKey = process.env.EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY; +if (__DEV__) { + console.log("Clerk publishable key: ", publishableKey); +} function RootLayoutNav() { // Initialize language when app starts diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx index e1cf0ac..c2a33be 100644 --- a/src/components/ui/button.tsx +++ b/src/components/ui/button.tsx @@ -70,7 +70,7 @@ const Button: React.FC = ({ href, ...props }) => { {...props} onPress={handlePress} className={cn( - // TODO: Shadow (like the one we have in Figma) is somehow not working, didnt get it working, will skip this for a later PR + // TODO: Shadow (like the one we have in Figma) is somehow not working, didn't get it working, will skip this for a later PR "disabled:bg-gray-400 shadow-cyan-500/50 mt-5 self-center rounded-xl bg-accent px-8 py-2", props.className, )} diff --git a/src/db/index.ts b/src/db/index.ts index cf15c3d..4915673 100644 --- a/src/db/index.ts +++ b/src/db/index.ts @@ -1,5 +1,6 @@ import { neon } from "@neondatabase/serverless"; import { drizzle } from "drizzle-orm/neon-http"; + const databaseUrl = process.env.DATABASE_URL; if (!databaseUrl) throw new Error("DATABASE_URL is not set"); const sql = neon(databaseUrl);