Build a minimal full‑stack app for monetary transactions
Objective
Implement a minimal full‑stack web application that supports basic monetary transactions and account balances.
Requirements
-
Backend API
-
Expose a REST or GraphQL API (choose one) to:
-
Create accounts.
-
Create transactions (credit or debit) against an account.
-
Retrieve accounts and transactions.
-
Data persistence
-
In‑memory store or a lightweight database is acceptable.
-
Frontend
-
A simple page to:
-
Create an account.
-
Submit a credit or debit transaction.
-
View the current balance and recent transactions.
-
Validation and rules
-
Validate inputs (e.g., non‑negative amounts with up to 2 decimal places, required fields).
-
Prevent negative balances (reject debits that would drive the balance below zero).
-
Tests
-
Include basic automated tests covering happy paths and error cases.
-
Developer experience
-
Provide setup instructions and a concise README.
Deliverables
-
Source code for backend and frontend.
-
Tests and instructions to run them.
-
README with how to run, API summary, and any assumptions.
Notes
-
Focus on correctness and clarity over breadth.
-
Handling money precisely is important; avoid floating‑point errors.
-
Keep the UI minimal; functionality matters more than styling.