SmartPay is a full-stack expense sharing platform with:
- a Next.js frontend (
frontend/), - a Spring Boot backend (
backend/), and - a FastAPI + Gemini bill parsing microservice (
ai/).
This document lists what is currently implemented in the codebase.
- User signup with
fullName,email,phoneNumber,password. - User login via email or phone number + password.
- JWT-based backend auth (Spring Security + JWT filter).
- Frontend route protection via
proxy.ts:- redirects unauthenticated users from protected routes to
/login. - redirects authenticated users away from
/,/login,/signupto/dashboard.
- redirects unauthenticated users from protected routes to
- Logout support from profile page.
- Fetch current user profile (
/users/me). - Profile screen shows:
- full name,
- email,
- phone,
- role,
- user ID.
- Send friend request by phone number.
- View pending incoming requests.
- Accept or reject friend requests.
- View friends list.
- Search friends by name/email/phone.
- Create group (name + description).
- Auto-generated group code for joining.
- Join group via code.
- Join flow supports direct invite-link handling (
/groups/join?code=...). - List my groups.
- Group search (name/description/creator/code for admin-visible codes).
- Group details page with tabs:
- Transactions,
- Balances,
- Members.
- Group summary cards:
- member count,
- total group expenses,
- current user net balance in that group.
- Manual refresh in group detail page.
- Group expense creation:
EQUALsplit,EXACTsplit.
- Group expense form validations:
- positive amounts,
- split total matching validation for exact split.
- Direct split flow (outside permanent groups) from
/split:- select friends,
- split equally or custom exact amounts,
- create direct split transaction.
- Group-level ledger APIs:
- per-user balance in group,
- all group balances,
- group transactions,
- simplified debts.
- “My Transactions” feed for current user.
- Transactions page features:
- sent/received perspective,
- totals (paid/received),
- search/filter by description/person/type.
- Bills page supports multi-image upload.
- Calls hosted parse endpoint (
/parse-bills) and processes per-file result. - Duplicate hash fields handled in response model (
file_hash,is_duplicate). - Parsed bills grouped by category.
- Category totals + overall summary.
- Remove individual parsed bill from grouped results.
- Download generated expense PDF report.
- Client-side PDF generation using
jsPDF. - Report includes:
- overall total,
- category summary table,
- bill-level details,
- itemized rows.
- Health endpoint with Gemini connectivity check.
- Single bill parse endpoint (
/parse-bill). - Batch parse endpoint (
/parse-bills). - Debug parse endpoint (
/parse-bill/debug) exposing raw response + image info. - In-memory duplicate cache management endpoints:
- duplicate count,
- clear duplicates.
- File validation pipeline:
- extension/type/size checks,
- image decode verification,
- SHA256 hashing.
- Response post-processing pipeline:
- markdown/JSON cleanup,
- schema validation,
- normalization (date/currency/category/amount/items),
- confidence scoring + warnings.
- Settlement APIs exist:
- initiate settlement (
/settlements/initiate), - confirm settlement (
/settlements/confirm).
- initiate settlement (
- Razorpay webhook endpoint exists (
/payments/webhook) with signature verification + settlement confirmation path.
- Spring Boot REST API with modular domains:
- auth/users,
- friends,
- groups,
- expenses,
- ledger,
- settlements/payments.
- Common API response wrapper for consistent API payload shape.
- Global exception handling setup.
- Stateless security configuration.
- Flyway enabled (currently only initial users migration present in source migration folder).
- Landing page sections implemented (hero/features/architecture/why/CTA/footer).
- Protected navbar with theme toggle (light/dark).
- Reusable modal/component-based UI for friends/groups/expenses.
- Dashboard quick-action shortcuts.
blockchain/does not currently contain implemented runtime features.- Dashboard chart currently uses generated/mock values (not wired to backend ledger analytics yet).
- Settlement/payment flows are implemented in backend APIs; no complete frontend settlement UX is wired yet.
If needed, this README can be expanded next with:
- exact API endpoint reference table,
- setup instructions per service (
frontend,backend,ai)