From cb91a249281c76e75ef9659bf3f7beab7def2a48 Mon Sep 17 00:00:00 2001 From: Michael Kofi Awuni Date: Tue, 9 Sep 2025 15:12:38 +0000 Subject: [PATCH 1/7] chore: add drizzle folder to .gitignore, add CONTRIBUTING and README files --- .gitignore | 9 + CONTRIBUTING.md | 311 ++++++++++++++++++++++++++++++++ README.md | 206 ++++++++++++++++++--- app.json | 11 +- src/app/_layout.tsx | 1 + src/components/TRPCProvider.tsx | 2 +- src/components/ui/button.tsx | 2 +- src/db/index.ts | 1 + 8 files changed, 513 insertions(+), 30 deletions(-) create mode 100644 CONTRIBUTING.md 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/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..660c306 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,311 @@ +# Contributing to Finance-IO + +Thank you for your interest in contributing to Finance-IO! We welcome contributions from everyone, whether you're fixing bugs, improving documentation, or adding new features. + +## Code of Conduct + +This project adheres to a code of conduct to ensure a welcoming environment for all contributors. By participating, you agree to: + +- Be respectful and inclusive +- Focus on constructive feedback +- Accept responsibility for mistakes +- Show empathy towards other community members +- Help create a positive environment + +## How to Contribute + +### Types of Contributions + +- **Bug Reports**: Report bugs using our issue templates +- **Feature Requests**: Suggest new features via GitHub Discussions +- **Code Contributions**: Fix bugs or implement features +- **Documentation**: Improve docs, add examples, or fix typos +- **Testing**: Add or improve test coverage + +### Getting Started + +1. **Fork the Repository** + + ```bash + git clone https://github.com/The-Creative-Programming-Group/finance-io.git + cd finance-io + ``` + +2. **Set Up Development Environment** + + ```bash + # Install dependencies + pnpm install + + # Set up environment variables + cp .env.example .env.local + + # Start development server + pnpm dev + ``` + +3. **Create a Branch** + + ```bash + git checkout -b feature/your-feature-name + # or + git checkout -b fix/issue-number-description + ``` + +### Development Workflow + +1. **Make Changes**: Implement your feature or fix +2. **Test Locally**: Ensure your changes work as expected +3. **Run Tests**: Make sure all tests pass + + ```bash + pnpm test + ``` + +4. **Format Code**: Run the linter and formatter + + ```bash + pnpm lint + pnpm format + ``` + +5. **Commit Changes**: Use clear, descriptive commit messages + + ```bash + git add . + git commit -m "feat: add user authentication flow" + ``` + +6. **Push and Create PR**: Push your branch and open a pull request + +## Development Setup + +### Prerequisites + +- Node.js 18+ and pnpm +- Git +- Android Studio (for mobile development) +- Xcode (for iOS development, macOS only) + +### Environment Setup + +1. **Clone and Install** + + ```bash + git clone https://github.com/The-Creative-Programming-Group/finance-io.git + cd finance-io + pnpm install + ``` + +2. **Database Setup** + + ```bash + # Set up local database + pnpm db:generate + pnpm db:push + ``` + + > **Note:** The `drizzle/` directory is gitignored. Each team member should run `pnpm db:generate` to create their own database migration files locally.3. **Environment Variables** + Create `.env.local` with the following required variables: + + ```env + # Backend API URL (defaults to localhost for development) + EXPO_PUBLIC_API_URL="http://localhost:8081" + + # Clerk Authentication (get from https://dashboard.clerk.com) + EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY="your_clerk_publishable_key_here" + CLERK_SECRET_KEY="your_clerk_secret_key_here" + + # Database Connection (PostgreSQL) + DATABASE_URL="postgresql://username:password@host/database?sslmode=require" + ``` + + **Getting Clerk Keys:** + - Visit [Clerk Dashboard](https://dashboard.clerk.com) + - Create or select your application + - Copy the publishable key for `EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY` + - Copy the secret key for `CLERK_SECRET_KEY` (keep this secure!) + + **Database Setup:** + - Use a PostgreSQL database (we recommend [Neon](https://neon.tech) for development) + - Replace the connection string with your database credentials + - Ensure SSL mode is set to `require` for production + + **Getting a Neon PostgreSQL Database:** + - Visit [Neon Console](https://console.neon.tech) + - Sign up or sign in to your account + - Click "Create a project" + - Choose your project name (e.g., "finance-io-dev") + - Select your region (choose one close to you for better performance) + - Click "Create project" + - In your project dashboard, go to the "Connection Details" section + - Copy the connection string and replace the placeholder in your `.env.local` + - The connection string will look like: `postgresql://username:password@hostname/database?sslmode=require`### Available Scripts + +- `pnpm dev` - Start development server +- `pnpm build` - Build for production +- `pnpm test` - Run tests +- `pnpm lint` - Run ESLint +- `pnpm format` - Format code with Prettier +- `pnpm type-check` - Run TypeScript type checking +- `pnpm db:generate` - Generate database types +- `pnpm db:push` - Push database schema + +## Pull Request Process + +### Before Submitting + +1. **Update Documentation**: Ensure docs reflect your changes +2. **Add Tests**: Include tests for new features +3. **Update Changelog**: Add entry to CHANGELOG.md +4. **Self-Review**: Check your code meets our standards + +### PR Template + +Use our PR template and include: + +- Clear description of changes +- Screenshots for UI changes +- Testing instructions +- Related issues + +### Review Process + +1. **Automated Checks**: CI runs tests and linting +2. **Code Review**: Team reviews code quality and functionality +3. **Testing**: Manual testing may be required +4. **Approval**: At least one maintainer approval required +5. **Merge**: Squash merge with descriptive commit message + +## Coding Standards + +### TypeScript/JavaScript + +- Use TypeScript for all new code +- Follow ESLint configuration +- Use Prettier for formatting +- Prefer functional components in React +- Use meaningful variable and function names + +### React Native/Expo + +- Follow Expo SDK guidelines +- Use TypeScript for type safety +- Implement proper error boundaries +- Use React Query for data fetching +- Follow React Native accessibility guidelines + +### Database + +- Use Drizzle ORM for type-safe queries +- Follow database schema conventions +- Include proper indexes for performance +- Use transactions for complex operations + +### Commit Messages + +Follow conventional commit format: + +```text +type(scope): description + +[optional body] + +[optional footer] +``` + +Types: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore` + +## Testing + +### Test Types + +- **Unit Tests**: Test individual functions and components +- **Integration Tests**: Test component interactions +- **E2E Tests**: Test complete user flows + +### Running Tests + +```bash +# Run all tests +pnpm test + +# Run specific test file +pnpm test -- path/to/test + +# Run tests in watch mode +pnpm test -- --watch + +# Run tests with coverage +pnpm test -- --coverage +``` + +### Writing Tests + +- Use Jest and React Native Testing Library +- Test user interactions and edge cases +- Mock external dependencies +- Include accessibility testing +- Test both light and dark themes + +## Documentation + +### Code Documentation + +- Add JSDoc comments for complex functions +- Document props for React components +- Include usage examples in comments +- Update README for new features + +### User Documentation + +- Update docs for new features +- Include screenshots for UI changes +- Provide clear setup instructions +- Document breaking changes + +## Reporting Issues + +### Bug Reports + +Use the bug report template and include: + +- Clear title and description +- Steps to reproduce +- Expected vs actual behavior +- Environment details (OS, device, app version) +- Screenshots or videos if applicable + +### Feature Requests + +Use GitHub Discussions for feature requests: + +- Clear description of the feature +- Use case and benefits +- Mockups or examples if applicable +- Alternative solutions considered + +## Community + +### Getting Help + +- **GitHub Discussions**: General questions and ideas +- **GitHub Issues**: Bug reports and feature requests +- **Discord**: Real-time chat and support + +### Recognition + +Contributors are recognized through: + +- GitHub contributor statistics +- Changelog mentions +- Community shoutouts +- Contributor badges + +## License + + + +--- + +Thank you for contributing to Finance-IO! Your efforts help make financial management more accessible and user-friendly for everyone. diff --git a/README.md b/README.md index 5dd4ee4..718166a 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,198 @@ -# 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 -1. Install dependencies +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. - ```bash - pnpm install - ``` +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) + +## Key Features + +- **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. + +## πŸš€ Quick Start + +### 1. Install Expo Go + +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). + +### 2. Clone the Repository + +```bash +git clone https://github.com/The-Creative-Programming-Group/finance-io.git +cd finance-io +``` + +#### Install dependencies + +With **pnpm**: + +```bash +pnpm install +``` + +With **npm**: + +```bash +npm 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 +npm start +``` + +With **yarn**: -2. Start the app +```bash +yarn start +``` - ```bash - pnpm android +- 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" ``` -In the output, you'll find options to open the app in a +- 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 `main`. +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](CONTRIBUTING.md) for more details. -- [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 + -## Learn more +## πŸ“¬ Contact / Support -To learn more about developing your project with Expo, look at the following resources: +For questions, issues, or feature requests, please open an issue on GitHub -- [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. + +![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) --> -Join our community of developers creating universal apps. +## πŸ“œ Changelog -- [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. +See [CHANGELOG.md](CHANGELOG.md) for release history and updates. diff --git a/app.json b/app.json index 3d140a8..6aa8842 100644 --- a/app.json +++ b/app.json @@ -12,7 +12,9 @@ "resizeMode": "contain", "backgroundColor": "#ffffff" }, - "assetBundlePatterns": ["**/*"], + "assetBundlePatterns": [ + "**/*" + ], "fonts": { "Raleway-SemiBold": "./src/assets/Raleway-SemiBold.ttf", "Raleway-Medium": "./src/assets/Raleway-Medium.ttf", @@ -58,13 +60,14 @@ }, "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" + "owner": "michael-cmd-sys" } } diff --git a/src/app/_layout.tsx b/src/app/_layout.tsx index 0178c3f..effd37b 100644 --- a/src/app/_layout.tsx +++ b/src/app/_layout.tsx @@ -39,6 +39,7 @@ const tokenCache = { // Environment variable check with detailed error const publishableKey = process.env.EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY; +console.log("Clerk publishable key: ", publishableKey); function RootLayoutNav() { // Initialize language when app starts diff --git a/src/components/TRPCProvider.tsx b/src/components/TRPCProvider.tsx index 50de558..c28ca1c 100644 --- a/src/components/TRPCProvider.tsx +++ b/src/components/TRPCProvider.tsx @@ -24,7 +24,7 @@ export function TRPCProvider({ children }: TRPCProviderProps) { (Platform.OS === "android" ? "http://10.0.2.2:8081" // Android emulator : Platform.OS === "ios" - ? "http://localhost:8081" // iOS simulator + ? "http://localhost:8081" // iOS simulatorn : "https://api.example.com"); // fallback just in case // Reminder: Always set EXPO_PUBLIC_API_URL for production or device testing. 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); From 8b0a0b47f759f82e5addb6b51350e150742dc035 Mon Sep 17 00:00:00 2001 From: Michael Kofi Awuni Date: Tue, 9 Sep 2025 15:21:44 +0000 Subject: [PATCH 2/7] fix some minor bugs --- CONTRIBUTING.md | 13 ++++++++----- README.md | 42 +++++++++++++++++++++--------------------- app.json | 4 +--- 3 files changed, 30 insertions(+), 29 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 660c306..cd5bf5b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,10 +36,10 @@ This project adheres to a code of conduct to ensure a welcoming environment for ```bash # Install dependencies pnpm install - + # Set up environment variables cp .env.example .env.local - + # Start development server pnpm dev ``` @@ -106,32 +106,35 @@ This project adheres to a code of conduct to ensure a welcoming environment for ``` > **Note:** The `drizzle/` directory is gitignored. Each team member should run `pnpm db:generate` to create their own database migration files locally.3. **Environment Variables** - Create `.env.local` with the following required variables: + > Create `.env.local` with the following required variables: ```env # Backend API URL (defaults to localhost for development) EXPO_PUBLIC_API_URL="http://localhost:8081" - + # Clerk Authentication (get from https://dashboard.clerk.com) EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY="your_clerk_publishable_key_here" CLERK_SECRET_KEY="your_clerk_secret_key_here" - + # Database Connection (PostgreSQL) DATABASE_URL="postgresql://username:password@host/database?sslmode=require" ``` **Getting Clerk Keys:** + - Visit [Clerk Dashboard](https://dashboard.clerk.com) - Create or select your application - Copy the publishable key for `EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY` - Copy the secret key for `CLERK_SECRET_KEY` (keep this secure!) **Database Setup:** + - Use a PostgreSQL database (we recommend [Neon](https://neon.tech) for development) - Replace the connection string with your database credentials - Ensure SSL mode is set to `require` for production **Getting a Neon PostgreSQL Database:** + - Visit [Neon Console](https://console.neon.tech) - Sign up or sign in to your account - Click "Create a project" diff --git a/README.md b/README.md index 718166a..cf05dac 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ # Finance-IO - 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. 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) @@ -84,13 +83,13 @@ yarn start 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" - ``` + + ```json + "eas": { + "projectId": "YOUR_PROJECT_ID" + }, + "owner": "YOUR_EXPO_OWNER" + ``` - For more details, see the [Expo EAS documentation](https://docs.expo.dev/eas/). @@ -98,19 +97,19 @@ If you want to build a native app (APK/IPA): ``` src/ - app/ - components/ - contexts/ - data/ - db/ - server/ - services/ - trpc/ - types/ - utils/ -localization/ -assets/ -drizzle/ + app/ + components/ + contexts/ + data/ + db/ + server/ + services/ + trpc/ + types/ + utils/ +localization/ +assets/ +drizzle/ ``` - **app/**: Screens and layouts using Expo Router. @@ -190,6 +189,7 @@ 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) --> diff --git a/app.json b/app.json index 6aa8842..cd9fee5 100644 --- a/app.json +++ b/app.json @@ -12,9 +12,7 @@ "resizeMode": "contain", "backgroundColor": "#ffffff" }, - "assetBundlePatterns": [ - "**/*" - ], + "assetBundlePatterns": ["**/*"], "fonts": { "Raleway-SemiBold": "./src/assets/Raleway-SemiBold.ttf", "Raleway-Medium": "./src/assets/Raleway-Medium.ttf", From 878dfa799b999fd6167fd95aa313b286e85d0d75 Mon Sep 17 00:00:00 2001 From: Michael Kofi Awuni <75990742+Michael-cmd-sys@users.noreply.github.com> Date: Tue, 9 Sep 2025 15:28:51 +0000 Subject: [PATCH 3/7] Update src/components/TRPCProvider.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/components/TRPCProvider.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/TRPCProvider.tsx b/src/components/TRPCProvider.tsx index c28ca1c..50de558 100644 --- a/src/components/TRPCProvider.tsx +++ b/src/components/TRPCProvider.tsx @@ -24,7 +24,7 @@ export function TRPCProvider({ children }: TRPCProviderProps) { (Platform.OS === "android" ? "http://10.0.2.2:8081" // Android emulator : Platform.OS === "ios" - ? "http://localhost:8081" // iOS simulatorn + ? "http://localhost:8081" // iOS simulator : "https://api.example.com"); // fallback just in case // Reminder: Always set EXPO_PUBLIC_API_URL for production or device testing. From c2265347efaed4a1e3ce37b553877ca9cc3c75f6 Mon Sep 17 00:00:00 2001 From: Michael Kofi Awuni <75990742+Michael-cmd-sys@users.noreply.github.com> Date: Tue, 9 Sep 2025 15:29:17 +0000 Subject: [PATCH 4/7] Update src/app/_layout.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/app/_layout.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/_layout.tsx b/src/app/_layout.tsx index effd37b..6bfc7be 100644 --- a/src/app/_layout.tsx +++ b/src/app/_layout.tsx @@ -39,7 +39,9 @@ const tokenCache = { // Environment variable check with detailed error const publishableKey = process.env.EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY; -console.log("Clerk publishable key: ", publishableKey); +if (__DEV__) { + console.log("Clerk publishable key: ", publishableKey); +} function RootLayoutNav() { // Initialize language when app starts From c95b001e38ce7c2dbdc9e20675f94f0c409a5e59 Mon Sep 17 00:00:00 2001 From: Michael Kofi Awuni <75990742+Michael-cmd-sys@users.noreply.github.com> Date: Tue, 9 Sep 2025 15:30:15 +0000 Subject: [PATCH 5/7] Update app.json Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- app.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.json b/app.json index cd9fee5..9208f52 100644 --- a/app.json +++ b/app.json @@ -58,7 +58,7 @@ }, "extra": { "EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY": { - "default": {}, + "default": "", "env": "EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY" }, "router": {}, From f334ebc3c6d55caaf0e256bb4b3a0af6351b5694 Mon Sep 17 00:00:00 2001 From: Gamius00 Date: Sat, 27 Sep 2025 18:32:55 +0200 Subject: [PATCH 6/7] All of the changes are in our Wiki https://github.com/The-Creative-Programming-Group/finance-io/wiki --- CONTRIBUTING.md | 314 ------------------------------------------------ README.md | 6 +- package.json | 3 + 3 files changed, 6 insertions(+), 317 deletions(-) delete mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index cd5bf5b..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,314 +0,0 @@ -# Contributing to Finance-IO - -Thank you for your interest in contributing to Finance-IO! We welcome contributions from everyone, whether you're fixing bugs, improving documentation, or adding new features. - -## Code of Conduct - -This project adheres to a code of conduct to ensure a welcoming environment for all contributors. By participating, you agree to: - -- Be respectful and inclusive -- Focus on constructive feedback -- Accept responsibility for mistakes -- Show empathy towards other community members -- Help create a positive environment - -## How to Contribute - -### Types of Contributions - -- **Bug Reports**: Report bugs using our issue templates -- **Feature Requests**: Suggest new features via GitHub Discussions -- **Code Contributions**: Fix bugs or implement features -- **Documentation**: Improve docs, add examples, or fix typos -- **Testing**: Add or improve test coverage - -### Getting Started - -1. **Fork the Repository** - - ```bash - git clone https://github.com/The-Creative-Programming-Group/finance-io.git - cd finance-io - ``` - -2. **Set Up Development Environment** - - ```bash - # Install dependencies - pnpm install - - # Set up environment variables - cp .env.example .env.local - - # Start development server - pnpm dev - ``` - -3. **Create a Branch** - - ```bash - git checkout -b feature/your-feature-name - # or - git checkout -b fix/issue-number-description - ``` - -### Development Workflow - -1. **Make Changes**: Implement your feature or fix -2. **Test Locally**: Ensure your changes work as expected -3. **Run Tests**: Make sure all tests pass - - ```bash - pnpm test - ``` - -4. **Format Code**: Run the linter and formatter - - ```bash - pnpm lint - pnpm format - ``` - -5. **Commit Changes**: Use clear, descriptive commit messages - - ```bash - git add . - git commit -m "feat: add user authentication flow" - ``` - -6. **Push and Create PR**: Push your branch and open a pull request - -## Development Setup - -### Prerequisites - -- Node.js 18+ and pnpm -- Git -- Android Studio (for mobile development) -- Xcode (for iOS development, macOS only) - -### Environment Setup - -1. **Clone and Install** - - ```bash - git clone https://github.com/The-Creative-Programming-Group/finance-io.git - cd finance-io - pnpm install - ``` - -2. **Database Setup** - - ```bash - # Set up local database - pnpm db:generate - pnpm db:push - ``` - - > **Note:** The `drizzle/` directory is gitignored. Each team member should run `pnpm db:generate` to create their own database migration files locally.3. **Environment Variables** - > Create `.env.local` with the following required variables: - - ```env - # Backend API URL (defaults to localhost for development) - EXPO_PUBLIC_API_URL="http://localhost:8081" - - # Clerk Authentication (get from https://dashboard.clerk.com) - EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY="your_clerk_publishable_key_here" - CLERK_SECRET_KEY="your_clerk_secret_key_here" - - # Database Connection (PostgreSQL) - DATABASE_URL="postgresql://username:password@host/database?sslmode=require" - ``` - - **Getting Clerk Keys:** - - - Visit [Clerk Dashboard](https://dashboard.clerk.com) - - Create or select your application - - Copy the publishable key for `EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY` - - Copy the secret key for `CLERK_SECRET_KEY` (keep this secure!) - - **Database Setup:** - - - Use a PostgreSQL database (we recommend [Neon](https://neon.tech) for development) - - Replace the connection string with your database credentials - - Ensure SSL mode is set to `require` for production - - **Getting a Neon PostgreSQL Database:** - - - Visit [Neon Console](https://console.neon.tech) - - Sign up or sign in to your account - - Click "Create a project" - - Choose your project name (e.g., "finance-io-dev") - - Select your region (choose one close to you for better performance) - - Click "Create project" - - In your project dashboard, go to the "Connection Details" section - - Copy the connection string and replace the placeholder in your `.env.local` - - The connection string will look like: `postgresql://username:password@hostname/database?sslmode=require`### Available Scripts - -- `pnpm dev` - Start development server -- `pnpm build` - Build for production -- `pnpm test` - Run tests -- `pnpm lint` - Run ESLint -- `pnpm format` - Format code with Prettier -- `pnpm type-check` - Run TypeScript type checking -- `pnpm db:generate` - Generate database types -- `pnpm db:push` - Push database schema - -## Pull Request Process - -### Before Submitting - -1. **Update Documentation**: Ensure docs reflect your changes -2. **Add Tests**: Include tests for new features -3. **Update Changelog**: Add entry to CHANGELOG.md -4. **Self-Review**: Check your code meets our standards - -### PR Template - -Use our PR template and include: - -- Clear description of changes -- Screenshots for UI changes -- Testing instructions -- Related issues - -### Review Process - -1. **Automated Checks**: CI runs tests and linting -2. **Code Review**: Team reviews code quality and functionality -3. **Testing**: Manual testing may be required -4. **Approval**: At least one maintainer approval required -5. **Merge**: Squash merge with descriptive commit message - -## Coding Standards - -### TypeScript/JavaScript - -- Use TypeScript for all new code -- Follow ESLint configuration -- Use Prettier for formatting -- Prefer functional components in React -- Use meaningful variable and function names - -### React Native/Expo - -- Follow Expo SDK guidelines -- Use TypeScript for type safety -- Implement proper error boundaries -- Use React Query for data fetching -- Follow React Native accessibility guidelines - -### Database - -- Use Drizzle ORM for type-safe queries -- Follow database schema conventions -- Include proper indexes for performance -- Use transactions for complex operations - -### Commit Messages - -Follow conventional commit format: - -```text -type(scope): description - -[optional body] - -[optional footer] -``` - -Types: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore` - -## Testing - -### Test Types - -- **Unit Tests**: Test individual functions and components -- **Integration Tests**: Test component interactions -- **E2E Tests**: Test complete user flows - -### Running Tests - -```bash -# Run all tests -pnpm test - -# Run specific test file -pnpm test -- path/to/test - -# Run tests in watch mode -pnpm test -- --watch - -# Run tests with coverage -pnpm test -- --coverage -``` - -### Writing Tests - -- Use Jest and React Native Testing Library -- Test user interactions and edge cases -- Mock external dependencies -- Include accessibility testing -- Test both light and dark themes - -## Documentation - -### Code Documentation - -- Add JSDoc comments for complex functions -- Document props for React components -- Include usage examples in comments -- Update README for new features - -### User Documentation - -- Update docs for new features -- Include screenshots for UI changes -- Provide clear setup instructions -- Document breaking changes - -## Reporting Issues - -### Bug Reports - -Use the bug report template and include: - -- Clear title and description -- Steps to reproduce -- Expected vs actual behavior -- Environment details (OS, device, app version) -- Screenshots or videos if applicable - -### Feature Requests - -Use GitHub Discussions for feature requests: - -- Clear description of the feature -- Use case and benefits -- Mockups or examples if applicable -- Alternative solutions considered - -## Community - -### Getting Help - -- **GitHub Discussions**: General questions and ideas -- **GitHub Issues**: Bug reports and feature requests -- **Discord**: Real-time chat and support - -### Recognition - -Contributors are recognized through: - -- GitHub contributor statistics -- Changelog mentions -- Community shoutouts -- Contributor badges - -## License - - - ---- - -Thank you for contributing to Finance-IO! Your efforts help make financial management more accessible and user-friendly for everyone. diff --git a/README.md b/README.md index cf05dac..ceef161 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Finance-IO +# Finance.io 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. @@ -164,7 +164,7 @@ drizzle/ ## 🎨 Design & UI Resources -All UI development should follow the official Figma design for Finance-IO. +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 @@ -176,7 +176,7 @@ We welcome contributions! To get started: 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](CONTRIBUTING.md) for more details. +Please read our [CONTRIBUTING.md](https://github.com/The-Creative-Programming-Group/finance-io/wiki/Contributing-to-Finance.io) for more details.