Oracle3
Oracle3: 예측시장 거래 엔진·MCP 서버
Monetra는 결제 전에 AI가 지출 한도·EMI·저축 목표·위험을 판단하고 이유를 설명합니다
Monetra: Your AI Financial Guardian that thinks before you pay. Java-powered rules assess spending limits, EMIs, savings goals and payment risks before every PayPal payment. AI explains the why, not m
금융Java · JavaScriptGitHub @yadunandan22022006-06접속 불안정운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기Monetra: Your AI Financial Guardian that thinks before you pay. Java-powered rules assess spending limits, EMIs, savings goals and payment risks before every PayPal payment. AI explains the why, not made-up numbers. Scam Shield, Guardian Score & Badges, Smart Buy Planner, Home Expenses. Built with Java Spring Boot for the PayPal AI Hackathon 2026.
저장소 README에서 가져옴
README 전체를 불러오는 중입니다.
README 전문 보기 ↗PayPal AI Hackathon 2026 entry. Monetra helps students and families understand their money, remember household expenses and make safer payments. An AI agent explains, a Java rules engine calculates, you decide, PayPal processes the payment and the server verifies the result.
AI advises. You decide. PayPal processes. The backend verifies.
Everything runs in PayPal Sandbox with test money. No real money moves.
Try it online: https://monetra-tgjl.onrender.com. Sign in with the demo account [email protected] (the password is in the Devpost testing instructions). New sign-ups are switched off on this site. It runs on a free plan, so after a quiet spell the first page can take about a minute to wake up.
Taken on the live site with the demo account. PayPal Sandbox, test money. In the order you meet the app: sign in, Home, then the bottom menu (Pay, Spending, Loans, Savings), then Forecast, the Guardian, HE and Notifications.
Monetra does not just tell you how much you are spending. Before you pay, one analysis looks at the payment three ways at once and tells you what it could mean for your next EMI, next month and your goals.
| Awareness | What Monetra checks | Example |
|---|---|---|
| Daily spending | Today's limit, what is already spent, the weekly, monthly and yearly limits | "Your ₹2,000.00 daily limit is exceeded by ₹19,000.00." |
| Loan repayment | Your available balance, EMIs, home bills and essential expenses before your next income | "Your projected balance would be -₹1,000.00. That is NOT enough to cover them, so you may fall short." |
| Savings goals | The goal you are saving for, your plan and whether you are behind it | "If this payment comes from that savings, the amount you still need rises from ₹40,000.00 to ₹45,000.00." |
DailyBudgetService, LoanRepaymentService, SavingsGoalService, FinancialForecastService, GuardianAnalysisService). The AI only puts the finished sentences into words, and its reply is thrown away if it changes a number, softens a broken limit or drops a warning. When a figure is missing, Monetra says what it cannot check instead of guessing.The HE button opens home expenses, kept apart from Pay.
GET /api/he/methods) tells the page what each one really does:| Method | What happens |
|---|---|
| Scan & Pay | Scan a Monetra or UPI QR code with the camera, or choose its picture. The name is shown, you enter the amount, and you approve on PayPal. |
| My Payment QR | Your own Monetra QR code, for other people to scan and pay you. |
| Mobile number | Type a number (with or without +91) or pick a contact. The number is checked and the name is shown (the registered name on Monetra, or your own contact's name). You approve on PayPal. As on the Pay screen, a number that is not on Monetra can still be paid through PayPal. |
| Cash | Recorded only after you confirm you really paid. No money is moved. |
The Monetra Guardian button (top left) opens one place with two sections that cover the three main features. Everything else in the app (Home, Pay, Spending, Loans, Savings, Transactions, Forecast, Fraud Guard, QR, bank transfer) is unchanged.
| Section | Feature | What it does |
|---|---|---|
| AI & Payments | AI Financial Guardian | A chat agent that calls tools on the Java backend (check_budget, get_upcoming_expenses, check_affordability, prepare_payment, get_home_contributions, prepare_reminder). It answers from your real records and can prepare a payment or a reminder, but only you can confirm. |
| AI & Payments | PayPal Payment System | PayPal Orders (send), PayPal Payouts (the receiver gets the money in their PayPal account), verified webhooks, a payments table with status and payout status, and a "Check with PayPal" recovery button. |
| Family & Home | Home Expense Guardian | Recurring household expenses (rent, bills, money for home) that are daily, weekly, monthly, yearly or one time. Upcoming, due today, overdue and paid tracking, reminders, a daily summary and a monthly report. Payments you mark yourself are labelled "not verified"; Pay with Monetra opens HE with the bill filled in: paid through PayPal, it is marked paid when PayPal confirms it; recorded as cash, it is marked paid as your own word. The bill being paid is not counted twice in the Guardian check. |
Send Money and HE have one box for a name or a mobile number. As you type, matching contacts appear under it with their name and number, like a phone's dialler: people you saved, people you paid or were paid by, and your own phone contacts. Tap Add contacts from your phone in the list: on Android Chrome it opens the phone's contact list, on other browsers you choose the contacts file (.vcf) exported from your phone or Google Contacts. (You cannot search all Monetra users, by design. Phone contacts are stored only for you and Remove deletes them.)
App-style screens: the page itself never scrolls. Each screen is split into small tabs (for example Loans: Guardian, EMI calendar, My loans, Add loan), and only a long list scrolls inside its own panel.
Other features: pay by mobile number, QR code scan or bank account (the name and the bank are detected for you), My QR to get paid, Fraud Guard, Spending Forecast with AI explanation, loans and EMIs, savings goals, notifications and a transaction history of sent and received payments.
You need Java 21. Nothing else to install (the Maven wrapper is included).
# 1. Demo accounts + sample data, no email needed
export MONETRA_SEED_DEMO_USERS=true # Windows PowerShell: $env:MONETRA_SEED_DEMO_USERS = 'true'
# 2. PayPal Sandbox credentials (see "PayPal Sandbox setup" below)
export PAYPAL_CLIENT_ID=... # Windows PowerShell: $env:PAYPAL_CLIENT_ID = '...'
export PAYPAL_CLIENT_SECRET=...
# 3. Optional: turn on the AI. A FREE option is in the "Free AI" section below. Example with Google Gemini (free tier):
export AI_BASE_URL=https://generativelanguage.googleapis.com/v1beta/openai/
export AI_MODEL=<a current Gemini flash model id>
export AI_API_KEY=<your free key from https://aistudio.google.com/apikey>
# 4. Run
./mvnw spring-boot:run # Windows: .\mvnw.cmd spring-boot:run
Open http://localhost:8081.
Keeping your keys private (.env). Keys never go in the code or in any uploaded file. Monetra reads them from environment variables, and on a Windows computer a private file called .env fills them in:
.env.example to a new file named .env in the project folder (next to pom.xml).powershell -ExecutionPolicy Bypass -File .\start-local.ps1. It reads .env, never prints a value, and never replaces a value you already set in the terminal. Add -CheckOnly to see which keys were found (names only) without starting Monetra. If port 8081 is already in use (usually Monetra running in another window), the script says which program has it and does not start; it never closes another program for you. To stop Monetra, press Ctrl+C once in its window, wait for "Graceful shutdown complete" (the saved data in data/ is closed cleanly), then answer Y..env is listed in .gitignore, so it is never uploaded. .env.example holds no real values and is safe to share. start-local.ps1 is a local helper kept out of Git; on other systems export the same names as environment variables, as shown above. On Render, set the same names in the dashboard (render.yaml lists them). If a key was ever shown or uploaded, create a new one at the provider and put the new one in .env.
Only one copy can run at a time: the database file is locked, and a second copy stops with "Database may be already in use". Stop the first one with Ctrl-C (it shuts down cleanly), then start again.
Demo accounts (created only when MONETRA_SEED_DEMO_USERS=true):
| Name | Mobile | Notes | |
|---|---|---|---|
[email protected] | Asha Demo | 9000000001 | Has limits, an EMI, a goal and sample expenses. Plays the sender. |
[email protected] | Ravi Demo | 9000000002 | Empty. Plays the person to pay and be paid by. |
The demo password is MonetraDemo#2026 (change it with MONETRA_DEMO_PASSWORD). These accounts are for testing only. Do not enable the seed on a real deployment.
Putting the Try Demo account back to its sample data (for example before recording a video): stop Monetra, then start it once with MONETRA_DEMO_RESET=true (with start-local.ps1: add -ResetDemo). On that start [email protected] loses its own saved data (expenses, loans, goals, notifications, scores, badges and so on) and gets the sample data again. It only ever touches that one account: nobody else's data, the accounts themselves (email sign-in, phone numbers, OTP) and the PayPal payment records are left exactly as they are. It exists only where the demo accounts are switched on, has no web address, and is switched off again on the next normal start.
Suggested demo flow (uses all three main features)
demo1 in one window and as demo2 in a private window.Without PayPal credentials everything except the final PayPal step still works. The app says clearly that PayPal is not configured and never fakes a payment. Without an AI key the chat says the AI is not set up, and the rest keeps working with rule-based text.
PAYPAL_CLIENT_ID and PAYPAL_CLIENT_SECRET as environment variables (on Windows, put them in .env: see "Keeping your keys private" above). Never commit them.https://YOUR-SERVER/api/paypal/webhook and the events PAYMENT.CAPTURE.COMPLETED and PAYMENT.PAYOUTS-ITEM.*. Copy its Webhook ID into PAYPAL_WEBHOOK_ID. PayPal can only reach a public address, so use the Render deployment (or a tunnel) for this. Without it the webhook endpoint answers 503, and the "Check with PayPal" button still recovers a payment.PayPal (central to the product)
POST /v2/checkout/orders (create), .../capture, GET /v2/checkout/orders/{id} (recovery).POST /v1/payments/payouts sends the captured amount to the receiver's PayPal email, with a stable batch id so a retry can never pay twice.POST /v1/notifications/verify-webhook-signature. PAYMENT.CAPTURE.COMPLETED finishes a payment even if the browser was closed, and PAYMENT.PAYOUTS-ITEM.* updates the payout. Handling an event twice is harmless.monetra.inr-per-usd, default 88).AI (free options or Claude, optional key)
Monetra's AI works with any provider that speaks the common "OpenAI chat" format, so you can use a free one. Pick one, set three variables and restart. Free tiers and model names change, so check each provider's page for the current model id and limits.
| Option | Cost | Set these |
|---|---|---|
| Google Gemini (free tier, key from Google AI Studio) | Free tier with rate limits | AI_BASE_URL=https://generativelanguage.googleapis.com/v1beta/openai/, AI_MODEL=<a current Gemini flash model id>, AI_API_KEY=<your key> |
| Groq (recommended online option: free tier, key from console.groq.com) | Free tier with rate limits | AI_BASE_URL=https://api.groq.com/openai/v1, AI_MODEL=openai/gpt-oss-120b (or openai/gpt-oss-20b; llama-3.3-70b-versatile was retired in August 2026), AI_API_KEY=<your key>. On Windows, just put the key in .env as GROQ_API_KEY: start-local.ps1 turns it into these three variables. render.yaml already sets the address and model, so on Render only AI_API_KEY is needed. |
| Ollama (runs on your own computer, ollama.com) | Free and unlimited, no key, works offline | install Ollama, run ollama pull llama3.2, then AI_BASE_URL=http://localhost:11434/v1, AI_MODEL=llama3.2 |
Windows PowerShell example:
$env:AI_BASE_URL = 'https://generativelanguage.googleapis.com/v1beta/openai/'
$env:AI_MODEL = 'paste-a-current-gemini-model-id'
$env:AI_API_KEY = 'paste-your-free-key'
.\mvnw.cmd spring-boot:run
The chat needs a model that supports tool calling. If a small model answers badly, try a larger one. Reasoning models (gpt-oss) are asked to think briefly (reasoning_effort: low) so their short notices are not cut off. Never commit your key.
MONETRA_LOG_OTP=true (local development only).HttpOnly and SameSite=Lax; set MONETRA_COOKIE_SECURE=true when the site is served over https so it is never sent over plain http.PAYPAL_WEBHOOK_ID is set and PayPal's signature checks out.POST to /api/auth/logout (the Log Out button) ends it, so no link or page load can. The page treats a single 401 as a question, not an answer: it asks the server who is signed in and only signs you out when the server says nobody is. A slow or missing answer is never taken as "signed out".X-Monetra-User), and the server refuses a request that does not match with before reading or saving anything.Browser (HTML, CSS, JavaScript) -> Spring Boot 4 (Java 21) -> PayPal Sandbox (Orders, Payouts, Webhooks)
index.html / app.js / app.css REST /api/* AI provider (optional, free or Claude)
H2 file database (JPA)
| Class | Role |
|---|---|
OtpAuthController, SessionUser | Email-OTP registration, login, server-side session cookie |
PaymentController, PaymentService, PaypalClient | Recipient lookup, PayPal orders, capture, payouts, recovery, history |
PaypalWebhookController | Verified PayPal webhooks |
BudgetRules, FraudRules, HomeExpenseRules | Deterministic, unit-tested rules |
GuardianAnalysisService, DailyBudgetService, LoanRepaymentService, SavingsGoalService, FinancialForecastService | The Financial Guardian: one combined analysis of limits, loans and goals, the dashboard figures and the notifications |
SetuAaClient, BankService, BankController, BankLink, BankAccount | My bank accounts and Check Balance through Setu's Account Aggregator (consents, data sessions, balances) |
PurchasePlannerService | Smart Buy Planner: the day-by-day money plan and the earliest safe day to buy |
ScamShieldService, ScamReport | Scam Shield rules, and "this result is wrong" reports (the message only with consent) |
NumberGuard, RecordsValidator | Checks on what the AI writes and on the loan, goal and money figures a user saves |
HeController, HePayment | HE: home expense payments and their history |
AgentController, AgentTools, AiService, OpenAiCompatibleClient, AnthropicClient | The AI agent and its tools |
HomeController, HomeExpenseService | Home Expense Guardian |
ContactController, ContactService | Contacts search and phone contacts |
QrController, NotificationController, ProfileController, , |
./mvnw test
The automated tests cover the budget, fraud and schedule rules, QR and IFSC parsing, login and per-user data isolation, the whole payment journey against a fake PayPal server (create, capture, history for both people, notifications, payout to the receiver's PayPal email, verified and rejected webhooks, no double processing), the AI agent against fake Claude and fake free-provider servers (tool calls, prepared-only payments and reminders, errors), household expenses (schedules, paid and overdue, reminders, reports), contacts privacy, and the Financial Guardian (daily limit, loan repayment, next-month forecast and savings-goal sums; one payment checked against all three; notifications sent once; the HE payment methods, with cash recorded only on confirmation and PayPal ones verified; refused bad figures; and one user never seeing another's loans, goals or forecasts), Safe to Spend Today, the Smart Buy Planner (worked-out dates and amounts), Scam Shield (risk levels, no message kept without consent) review boxes that never say the same thing twice, the Guardian Score with its levels, daily and weekly badges and notifications, sign-up and sign-in (the emailed code, wrong codes, the guess limits), bad money (zero, negative, huge or text amounts on payments and saved records), the backup AI when the online one cannot be reached, and the number check that rejects AI answers with invented figures.
Import postman/monetra.postman_collection.json into Postman. Log in first; Postman keeps the session cookie.
render.yaml and Dockerfile are included. Create a Blueprint from the repo, then set PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET, PAYPAL_WEBHOOK_ID and (optionally) the AI variables in the Render dashboard. Also set MONETRA_DEMO_PASSWORD (your own password for the demo accounts, shared with the judges in the Devpost testing instructions) and MONETRA_COOKIE_SECURE=true. Leave MONETRA_LOG_OTP unset online.
The H2 file database lives on the container disk, so data resets when the server restarts or is redeployed, and the free plan restarts it after it sleeps. The demo accounts and their sample data are created again at every start, so judges can always sign in; anything else they add is temporary. To keep data, point MONETRA_DB_URL at a database that survives restarts (this needs the matching JDBC driver added to the project; the app is tested on H2 only). Run a single instance.
| Variable | Purpose |
|---|---|
PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET | PayPal Sandbox credentials |
PAYPAL_WEBHOOK_ID | Webhook id, so PayPal events are accepted |
SETU_AA_CLIENT_ID, SETU_AA_CLIENT_SECRET, SETU_AA_PRODUCT_INSTANCE_ID | Setu Account Aggregator keys for Check Balance (from bridge.setu.co, your FIU data product) |
SETU_AA_BASE_URL | Optional. https://fiu-sandbox.setu.co (the default) or Setu's production gateway |
AI_BASE_URL, AI_MODEL, AI_API_KEY | A FREE AI (Gemini, Groq, Ollama): see "Free AI" (optional) |
AI_FALLBACK_BASE_URL, AI_FALLBACK_MODEL | An AI on this computer (Ollama) that answers only when the online AI cannot be reached. start-local.ps1 sets them when Ollama is installed (optional) |
GROQ_API_KEY | Read only by start-local.ps1 (from .env): it sets AI_BASE_URL, AI_MODEL and AI_API_KEY for Groq. Not a Spring setting |
ANTHROPIC_API_KEY | Claude instead (paid, optional) |
AI_PROVIDER | openai or anthropic to force one (empty chooses automatically) |
MONETRA_SEED_DEMO_USERS | true creates the demo accounts |
MONETRA_DEMO_PASSWORD | Password for the demo accounts |
MONETRA_DEMO_LOGIN | true shows a "Try Demo" button on the sign-in page. One press signs in [email protected] only (nothing in the request can choose another account), at most 30 presses in 15 minutes per address, and only if that demo account exists. Off unless set. For a public demo site that holds sample data only. start-local.ps1 turns it on for your own computer. |
MONETRA_DEMO_RESET | true puts [email protected] back to its sample data when the server starts: that account's own data only, never anyone else's and never the PayPal payment records. Needs . Off unless set; turn it off again after one start. |
PAYMENT.CAPTURE.COMPLETED event for a small test payment reached the Render site and was answered successfully (shown as a green "Success" in the app's Webhook events). Payouts to a receiver's PayPal account have not been confirmed live. On your own deployment, confirm a 200 on PAYMENT.CAPTURE.COMPLETED in your PayPal app's webhook events before relying on it.BarcodeDetector (Chrome, Edge, Android). On any browser you can upload a QR image instead.Monetra is a decision-support tool. It cannot guarantee that a recommendation is right or that you will avoid financial loss.
Monetra was created by Yadunandan (@yadunandan22022006-06): the idea, what to build, how it should look and behave, the decisions along the way, testing the app, and publishing it.
The code, tests and documentation were written with Claude, Anthropic's AI coding assistant (used through Claude Code), working from Yadunandan's instructions, screenshots and feedback. Commits made with Claude's help carry a Co-Authored-By: Claude line. One commit ("Fix security validation and financial formatting") was saved without that line, although Claude did that work too.
This is separate from the AI inside the app: Monetra's Java code does every calculation, and the app's AI (Groq, Claude or a model on your own computer) only explains the result in words.
MIT. See LICENSE.
409X-Content-Type-Options: nosniff, X-Frame-Options: DENY, a referrer policy and a permissions policy (camera for the QR scanner only).DataControllerDemoData| QR, notifications, PayPal email, per-user records, demo accounts |
MONETRA_SEED_DEMO_USERS=trueMONETRA_MAIL_USERNAME, MONETRA_MAIL_PASSWORD | Gmail SMTP (App Password) for registration OTP emails (optional) |
MONETRA_COOKIE_SECURE | true when the site is served over https (online): the login cookie is then never sent over plain http |
MONETRA_LOG_OTP | true prints the OTP in the server console when email is not set up (local development only) |
PORT | HTTP port (default 8081) |
MONETRA_DB_URL | JDBC URL (default jdbc:h2:file:./data/monetra) |