yarn installyarn graphql:prepareThis runs:
yarn schema:generate-> writesgraphql/schema.graphqlyarn codegen-> writesclient/src/graphql/generated.ts
yarn dev- Frontend:
http://localhost:3000 - Backend GraphQL:
http://localhost:4000/graphql - Backend health:
http://localhost:4000/healthz
- Manifest:
client/public/manifest.json - Service worker:
client/public/sw.js(registered in production, or setREACT_APP_ENABLE_SW=truefor local/dev) - Install prompt UI is built into
client/src/App.tsx.
This project uses Node's built-in test runner (node:test) with tsx (no extra test framework needed).
# Requires DATABASE_URL in .env
yarn test:functional:dbOr run only tests (without auto migration):
yarn test:functional# Generate Drizzle migration files from server/db/schema.ts
yarn db:generate
# Apply runtime SQL migrations in server/migrations
yarn db:migrateAuth / authorization guard policy is documented in docs/AUTH_GUARD_POLICY.md.
You’ll build a bill-splitting application (similar to Splitwise) using React and TypeScript. This app allows users to manage multiple groups (projects), track expenses in different currencies, and calculate a final settlement plan to show "who owes whom" in a single target currency.
-
Project Management
- Create Project: Users can create a new project (e.g., "Japan Trip", "Friday Dinner").
- Switch Context: Users can switch between different projects via a sidebar or dropdown.
- Isolation: Data (participants and expenses) must be isolated per project.
-
Participant Management
- Manage People: Within a project, users can add or remove participants.
- Validation: You cannot remove a participant if they already have recorded expenses.
-
Expense Logging
- Add Expense: Create a record of who paid what.
- Payer: Select one person from the participant list.
- Amount: Number input.
- Currency: Dropdown selection.
- Description: (Optional) What was this for?
- Supported Currencies: USD, TWD, JPY, EUR
- List View: Display a list of all expenses in the current project.
- Consider how users can handle mistakes or make corrections in the expenses list.
- Add Expense: Create a record of who paid what.
-
Settlement & Calculation
- Target Currency Setting: Each project has a "Settlement Currency" setting (e.g., settle everything in TWD).
- Calculate Button: A prominent button to trigger the calculation.
- Generate a list of transactions to settle debts (e.g., "Alice pays Bob $500").
- Result Display: Open a Dialog/Modal showing the calculation results.
-
Exchange Rates
- Use this free API for rates: https://open.er-api.com/v6/latest/TWD
-
UI Reference
- Improve the basic UI. You may use MUI or other styling library.
Feel free to add any of these if you want:
- Any nice-to-have functions and operations
- Support keyboard shortcuts
- Fix TypeScript warnings
- Make it run faster
- Clean up repeated code
- Any cool ideas you have!
We’ll look at:
- If it does all the main stuff
- How it handles errors and weird cases
- How clean and organized the code is
- If it follows good coding habits
- How well TypeScript is used
- If it’s easy and nice to use
- Make it look nice
- Use the right input types
- Show input errors right away
- Add friendly error messages
Send us:
- Your code
- Any notes about how it works or choices you made (in comments)
Good luck!