commit f19fb78464adb6e529bfeffbe7a8b887efd5c2d7
Author: root <root@hub.scroll.pub> Date: 2024-12-28 04:17:27 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..4e268eb --- /dev/null +++ b/body.html @@ -0,0 +1,48 @@ +<header> + <h1>BudgetWise</h1> + <p>Take control of your finances with our intuitive budget calculator.</p> +</header> + +<main> + <section id="income"> + <h2>Income</h2> + <form id="incomeForm"> + <input type="text" id="incomeSource" placeholder="Income Source" required> + <input type="number" id="incomeAmount" placeholder="Amount" required> + <button type="submit">Add Income</button> + </form> + <ul id="incomeList"></ul> + </section> + + <section id="expenses"> + <h2>Expenses</h2> + <form id="expenseForm"> + <input type="text" id="expenseCategory" placeholder="Category" required> + <input type="number" id="expenseAmount" placeholder="Amount" required> + <button type="submit">Add Expense</button> + </form> + <ul id="expenseList"></ul> + </section> + + <section id="savings"> + <h2>Savings Goals</h2> + <form id="savingsForm"> + <input type="text" id="savingsGoal" placeholder="Goal" required> + <input type="number" id="savingsTarget" placeholder="Target Amount" required> + <input type="date" id="savingsDate" required> + <button type="submit">Add Goal</button> + </form> + <ul id="savingsList"></ul> + </section> + + <section id="summary"> + <h2>Summary</h2> + <p>Total Income: <span id="totalIncome">$0</span></p> + <p>Total Expenses: <span id="totalExpenses">$0</span></p> + <p>Remaining Funds: <span id="remainingFunds">$0</span></p> + </section> +</main> + +<footer> + <p>BudgetWise - Plan your finances wisely.</p> +</footer> \ No newline at end of file diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..084151f --- /dev/null +++ b/index.scroll @@ -0,0 +1,8 @@ +buildHtml +baseUrl https://budgetwise.scroll.pub +metaTags +editButton /edit.html +title BudgetWise - Your Personal Budget Calculator +style.css +body.html +script.js \ No newline at end of file diff --git a/prompt.json b/prompt.json new file mode 100644 index 0000000..b315b90 --- /dev/null +++ b/prompt.json @@ -0,0 +1,25 @@ +{ + "id": "38b843dc-67e1-48f7-81cd-811ab1c50a69", + "object": "chat.completion", + "created": 1735359427, + "model": "deepseek-chat", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "---domain---\nbudgetwise.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://budgetwise.scroll.pub\nmetaTags\neditButton /edit.html\ntitle BudgetWise - Your Personal Budget Calculator\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <h1>BudgetWise</h1>\n <p>Take control of your finances with our intuitive budget calculator.</p>\n</header>\n\n<main>\n <section id=\"income\">\n <h2>Income</h2>\n <form id=\"incomeForm\">\n <input type=\"text\" id=\"incomeSource\" placeholder=\"Income Source\" required>\n <input type=\"number\" id=\"incomeAmount\" placeholder=\"Amount\" required>\n <button type=\"submit\">Add Income</button>\n </form>\n <ul id=\"incomeList\"></ul>\n </section>\n\n <section id=\"expenses\">\n <h2>Expenses</h2>\n <form id=\"expenseForm\">\n <input type=\"text\" id=\"expenseCategory\" placeholder=\"Category\" required>\n <input type=\"number\" id=\"expenseAmount\" placeholder=\"Amount\" required>\n <button type=\"submit\">Add Expense</button>\n </form>\n <ul id=\"expenseList\"></ul>\n </section>\n\n <section id=\"savings\">\n <h2>Savings Goals</h2>\n <form id=\"savingsForm\">\n <input type=\"text\" id=\"savingsGoal\" placeholder=\"Goal\" required>\n <input type=\"number\" id=\"savingsTarget\" placeholder=\"Target Amount\" required>\n <input type=\"date\" id=\"savingsDate\" required>\n <button type=\"submit\">Add Goal</button>\n </form>\n <ul id=\"savingsList\"></ul>\n </section>\n\n <section id=\"summary\">\n <h2>Summary</h2>\n <p>Total Income: <span id=\"totalIncome\">$0</span></p>\n <p>Total Expenses: <span id=\"totalExpenses\">$0</span></p>\n <p>Remaining Funds: <span id=\"remainingFunds\">$0</span></p>\n </section>\n</main>\n\n<footer>\n <p>BudgetWise - Plan your finances wisely.</p>\n</footer>\n---style.css---\n:root {\n --primary-color: #4CAF50;\n --secondary-color: #45a049;\n --background-color: #f4f4f4;\n --text-color: #333;\n --border-color: #ddd;\n}\n\nbody {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n margin: 0;\n padding: 0;\n background-color: var(--background-color);\n color: var(--text-color);\n line-height: 1.6;\n}\n\nheader {\n background-color: var(--primary-color);\n color: white;\n padding: 20px;\n text-align: center;\n}\n\nmain {\n padding: 20px;\n}\n\nsection {\n background: white;\n margin: 20px 0;\n padding: 20px;\n border-radius: 8px;\n box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n}\n\nh2 {\n color: var(--primary-color);\n}\n\nform {\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n margin-bottom: 20px;\n}\n\ninput, button {\n padding: 10px;\n border: 1px solid var(--border-color);\n border-radius: 4px;\n}\n\nbutton {\n background-color: var(--primary-color);\n color: white;\n border: none;\n cursor: pointer;\n}\n\nbutton:hover {\n background-color: var(--secondary-color);\n}\n\nul {\n list-style-type: none;\n padding: 0;\n}\n\nli {\n background: var(--background-color);\n margin: 5px 0;\n padding: 10px;\n border-radius: 4px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\nfooter {\n text-align: center;\n padding: 20px;\n background-color: var(--primary-color);\n color: white;\n margin-top: 20px;\n}\n\n@media (max-width: 600px) {\n form {\n flex-direction: column;\n }\n}\n---script.js---\ndocument.addEventListener('DOMContentLoaded', function() {\n const incomeForm = document.getElementById('incomeForm');\n const incomeList = document.getElementById('incomeList');\n const expenseForm = document.getElementById('expenseForm');\n const expenseList = document.getElementById('expenseList');\n const savingsForm = document.getElementById('savingsForm');\n const savingsList = document.getElementById('savingsList');\n const totalIncome = document.getElementById('totalIncome');\n const totalExpenses = document.getElementById('totalExpenses');\n const remainingFunds = document.getElementById('remainingFunds');\n\n let incomes = [];\n let expenses = [];\n let savingsGoals = [];\n\n function updateSummary() {\n const totalInc = incomes.reduce((sum, income) => sum + income.amount, 0);\n const totalExp = expenses.reduce((sum, expense) => sum + expense.amount, 0);\n const remaining = totalInc - totalExp;\n\n totalIncome.textContent = `$${totalInc}`;\n totalExpenses.textContent = `$${totalExp}`;\n remainingFunds.textContent = `$${remaining}`;\n }\n\n incomeForm.addEventListener('submit', function(e) {\n e.preventDefault();\n const source = document.getElementById('incomeSource').value;\n const amount = parseFloat(document.getElementById('incomeAmount').value);\n\n incomes.push({ source, amount });\n const li = document.createElement('li');\n li.textContent = `${source}: $${amount}`;\n incomeList.appendChild(li);\n\n updateSummary();\n incomeForm.reset();\n });\n\n expenseForm.addEventListener('submit', function(e) {\n e.preventDefault();\n const category = document.getElementById('expenseCategory').value;\n const amount = parseFloat(document.getElementById('expenseAmount').value);\n\n expenses.push({ category, amount });\n const li = document.createElement('li');\n li.textContent = `${category}: $${amount}`;\n expenseList.appendChild(li);\n\n updateSummary();\n expenseForm.reset();\n });\n\n savingsForm.addEventListener('submit', function(e) {\n e.preventDefault();\n const goal = document.getElementById('savingsGoal').value;\n const target = parseFloat(document.getElementById('savingsTarget').value);\n const date = document.getElementById('savingsDate').value;\n\n savingsGoals.push({ goal, target, date });\n const li = document.createElement('li');\n li.textContent = `${goal}: $${target} by ${date}`;\n savingsList.appendChild(li);\n\n savingsForm.reset();\n });\n});\n---end---" + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 654, + "completion_tokens": 1513, + "total_tokens": 2167, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 654 + }, + "system_fingerprint": "fp_f1afce2943" +} \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..e4ca90b --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# budgetwise3.scroll.pub +Website generated by DeepSeek from prompt: 1. Budget Calculator A budget calculator reimagined as a CRUD application would allow users to manage their finances in a flexible and detailed way, offering both static calculations and dynamic updates. Here’s how it could be structured: Logic The budget calculator divides the user’s income into categories (e.g., housing, food, transportation, savings) and calculates remaining funds based on user-defined allocations. It also tracks spending trends, compares planned vs. actual expenses, and adjusts recommendations accordingly. Execution • Create: Users create income sources, expense categories, and savings goals. For example: • Income: Add monthly salary, freelance income, or other streams. • Expense Categories: Housing ($1200/month), Food ($400/month), etc. • Savings Goals: “Save $500 for vacation by June.” • Read: The app displays: • A detailed breakdown of income vs. expenses. • A summary of progress toward savings goals. • Remaining funds after deductions. • Update: Users can: • Adjust budget allocations mid-month (e.g., move $50 from food to entertainment). • Update actual spending (e.g., log a $30 grocery bill). • Modify income sources or expense limits. • Delete: Users can remove outdated income sources, cancel expense categories (e.g., no more car loan), or delete completed savings goals. Advanced Features (without fetching or sending data) • What-If Scenarios: Users can simulate scenarios like “What if I save an extra $100 per month?” or “How will a $300 expense affect my savings goal?” • Recurring Calculations: Automatically allocate recurring income and expenses monthly, based on user settings. • Historical Comparisons: View spending trends by month or category. • Alerts: Notify users if they exceed category limits or approach savings milestones. \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..92cca40 --- /dev/null +++ b/script.js @@ -0,0 +1,67 @@ +document.addEventListener('DOMContentLoaded', function() { + const incomeForm = document.getElementById('incomeForm'); + const incomeList = document.getElementById('incomeList'); + const expenseForm = document.getElementById('expenseForm'); + const expenseList = document.getElementById('expenseList'); + const savingsForm = document.getElementById('savingsForm'); + const savingsList = document.getElementById('savingsList'); + const totalIncome = document.getElementById('totalIncome'); + const totalExpenses = document.getElementById('totalExpenses'); + const remainingFunds = document.getElementById('remainingFunds'); + + let incomes = []; + let expenses = []; + let savingsGoals = []; + + function updateSummary() { + const totalInc = incomes.reduce((sum, income) => sum + income.amount, 0); + const totalExp = expenses.reduce((sum, expense) => sum + expense.amount, 0); + const remaining = totalInc - totalExp; + + totalIncome.textContent = `$${totalInc}`; + totalExpenses.textContent = `$${totalExp}`; + remainingFunds.textContent = `$${remaining}`; + } + + incomeForm.addEventListener('submit', function(e) { + e.preventDefault(); + const source = document.getElementById('incomeSource').value; + const amount = parseFloat(document.getElementById('incomeAmount').value); + + incomes.push({ source, amount }); + const li = document.createElement('li'); + li.textContent = `${source}: $${amount}`; + incomeList.appendChild(li); + + updateSummary(); + incomeForm.reset(); + }); + + expenseForm.addEventListener('submit', function(e) { + e.preventDefault(); + const category = document.getElementById('expenseCategory').value; + const amount = parseFloat(document.getElementById('expenseAmount').value); + + expenses.push({ category, amount }); + const li = document.createElement('li'); + li.textContent = `${category}: $${amount}`; + expenseList.appendChild(li); + + updateSummary(); + expenseForm.reset(); + }); + + savingsForm.addEventListener('submit', function(e) { + e.preventDefault(); + const goal = document.getElementById('savingsGoal').value; + const target = parseFloat(document.getElementById('savingsTarget').value); + const date = document.getElementById('savingsDate').value; + + savingsGoals.push({ goal, target, date }); + const li = document.createElement('li'); + li.textContent = `${goal}: $${target} by ${date}`; + savingsList.appendChild(li); + + savingsForm.reset(); + }); +}); \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..8923eac --- /dev/null +++ b/style.css @@ -0,0 +1,92 @@ +:root { + --primary-color: #4CAF50; + --secondary-color: #45a049; + --background-color: #f4f4f4; + --text-color: #333; + --border-color: #ddd; +} + +body { + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + margin: 0; + padding: 0; + background-color: var(--background-color); + color: var(--text-color); + line-height: 1.6; +} + +header { + background-color: var(--primary-color); + color: white; + padding: 20px; + text-align: center; +} + +main { + padding: 20px; +} + +section { + background: white; + margin: 20px 0; + padding: 20px; + border-radius: 8px; + box-shadow: 0 2px 4px rgba(0,0,0,0.1); +} + +h2 { + color: var(--primary-color); +} + +form { + display: flex; + flex-wrap: wrap; + gap: 10px; + margin-bottom: 20px; +} + +input, button { + padding: 10px; + border: 1px solid var(--border-color); + border-radius: 4px; +} + +button { + background-color: var(--primary-color); + color: white; + border: none; + cursor: pointer; +} + +button:hover { + background-color: var(--secondary-color); +} + +ul { + list-style-type: none; + padding: 0; +} + +li { + background: var(--background-color); + margin: 5px 0; + padding: 10px; + border-radius: 4px; + display: flex; + justify-content: space-between; + align-items: center; +} + +footer { + text-align: center; + padding: 20px; + background-color: var(--primary-color); + color: white; + margin-top: 20px; +} + +@media (max-width: 600px) { + form { + flex-direction: column; + } +} \ No newline at end of file