Of course! Based on the application's logic (managing shared expenses in plans, using React Native and Supabase), here is a complete draft for your project description in English.

Inspiration Planning group trips, sharing a flat, or organizing events with friends is always exciting, but it often comes with the financial headache of tracking shared expenses. The constant "who paid for what?" and the awkward conversations about money can dampen the experience. We were inspired by the need for a simple, transparent, and mobile-first solution to manage group finances without the mess of spreadsheets or cluttered chat groups. We wanted to build an app that makes sharing expenses as seamless as making the memories themselves.

What it does Pacta is a mobile application designed to simplify expense sharing for any group activity. Here’s what it does:

Create Plans: Users can create a "Plan" for any event, such as a "Weekend Trip to Lisbon" or "Monthly Apartment Bills." Invite Members: Easily invite friends or flatmates to a plan to start sharing expenses. Log Expenses: Any member can add an expense, specifying the cost, name, and description. Flexible Splitting: This is our core feature. Expenses can be split in two ways: Equally: The cost is divided among all members of the plan. Unequally: The cost is only split among the members who explicitly opt-in to that specific expense. This is perfect for optional activities like a specific dinner or tour that not everyone attends. Track Participation: The app clearly shows who is participating in each expense, providing total transparency. Automated Calculations: Pacta automatically calculates who owes whom, eliminating manual math and potential errors. (This would be the next step after tracking balances). How we built it Pacta is built on a modern and scalable tech stack designed for rapid development and a high-quality user experience.

Frontend: We used React Native with TypeScript to build a cross-platform mobile application for both iOS and Android from a single codebase. This ensures a consistent experience on all devices. For the iconography, we used the clean and lightweight lucide-react-native library. Backend: The entire backend is powered by Supabase. We chose Supabase because it's an incredible open-source Backend-as-a-Service (BaaS) that provides everything we need out-of-the-box: PostgreSQL Database: To store our relational data (users, plans, expenses, and participant links). Instant APIs: Supabase auto-generates a RESTful API, which our ExpenseService class in the app communicates with for all data operations. Authentication: For secure user sign-up and login. Architecture: We followed a clean architecture in our React Native app, separating concerns. We have a dedicated ExpenseService class that handles all asynchronous communication with the Supabase backend, while our React components focus on UI and state management. Challenges we ran into Data Consistency: Ensuring the UI instantly and accurately reflects the state of the database after an action (like deleting or joining an expense) was a major challenge. We solved this by implementing an optimistic UI update pattern. For example, when a user deletes an expense, it's immediately removed from their screen while the API call is made in the background. If the call fails, the UI is safely reverted to its original state. Database Schema Design: Structuring the relationships between plans, expenses, and participants in Supabase required careful planning. We used foreign key constraints and ON DELETE CASCADE rules to ensure data integrity, so when an expense is deleted, all its associated participant records are automatically removed. Asynchronous State Management: Almost every action in the app is asynchronous. Managing loading states, handling potential errors from the API, and preventing users from performing multiple actions at once (like tapping a button twice) required robust state management within our components. Accomplishments that we're proud of The Flexible Splitting System: We are particularly proud of the core "unequal" splitting feature. It solves a real-world problem where not everyone in a group partakes in every single activity, and it's something many simpler apps lack. A Responsive User Experience: By implementing optimistic updates, the app feels incredibly fast and responsive, as users get immediate visual feedback for their actions without waiting for the network. Rapid Development with Supabase: We are proud of how quickly we were able to build a functional and robust backend. Leveraging Supabase allowed us to focus on the frontend experience and core application logic instead of writing boilerplate backend code. What we learned The Power of BaaS: We learned how a Backend-as-a-Service like Supabase can dramatically accelerate the development lifecycle of a full-stack application. Robust Frontend Patterns: We gained a deep understanding of advanced React Native patterns for managing asynchronous data, including optimistic UI updates and strategies for data refetching vs. local state mutation. The Importance of a Service Layer: Abstracting all API calls into a dedicated ExpenseService class made our components cleaner, easier to read, and more maintainable. TypeScript is a Lifesaver: Using TypeScript from the start prevented countless potential bugs by ensuring type safety between our app and the Supabase API. What's next for Pacta We have a clear roadmap to take Pacta from a solid MVP to a full-featured expense management tool:

Real-time Updates: Implement Supabase's real-time subscriptions so that when one user adds or joins an expense, it appears on everyone's device instantly, without needing a manual refresh. Settle Up Feature: Develop an intelligent feature to calculate the simplest way for everyone to settle their debts at the end of a plan. Push Notifications: Notify users when they are added to an expense or when a new expense is created in one of their plans. Image Uploads: Allow users to attach photos of receipts or memories to each expense using Supabase Storage. User Profiles and Avatars: Add more personalization to the app. Web Dashboard: Create a companion web application for easier management and overview of complex plans.

Built With

Share this project:

Updates