SPKZ's xPense/7

From The Sarkhan Nexus

« Back to Main Page

xPense7 or SPKZ's xPense Version 7.0 is a total rewrite of xPense Application into Laravel Based Application with functionality to work offline.

Quick Facts:

Software name: xPense Business
Type: Personal Accounting Software
Platform: Web Application
Accounting method: Cash & Accural

Here's an article based on MoNoRi-Chan's developer notes, focusing on the key changes of xPense7 and aiming for a slightly less informal tone than the original:

xPense Version 7.0: A Major Overhaul for Offline Reliability and Future Development

The upcoming release of xPense Version 7.0 marks a significant re-engineering of the popular expense tracking application. Core elements of its code and architecture are being reimagined for smoother offline functionality, better long-term maintainability, and to accommodate future feature development.

Key Changes and Goals

  • Offline Focus: To ensure reliable use in areas with poor connectivity or limited data plans, xPense 7.0 is fundamentally redesigned. This includes a shift away from server-sided incremental transaction identifiers to Snowflake IDs, which allow unique record identification even when data is generated offline.
  • Simplified Codebase: The application is being streamlined for easier maintenance. This includes:
    • Refactoring key classes and replacing legacy components with Laravel's Eloquent ORM
    • Adopting Blade templates for a more modern approach to view rendering because ObjectHTML is slow to generate on the fly.
  • Framework Alignment: xPense 7.0 embraces the Laravel framework more fully, improving code consistency and enabling use of its rich feature set.
  • Bootstrap 4 Compatibility (5 Soon): Aligning with modern web standards, the UI library ObjectHTML is being updated to fully support Bootstrap 4 layouts, with Bootstrap 5 integration planned soon after.

Developer Notes and Considerations

The provided notes also offer insights into the process and decisions involved:

  • Timekeeping: Transactions will now be recorded using UTC timestamps with client-side time calculation, ensuring consistent tracking even across different devices and timezones.
  • Design Philosophy: The developer reaffirms stylistic preferences (like coding indentation) while acknowledging the importance of adherence to industry standards like PSR-12.
  • Known Issues: Some temporary limitations exist, such as occasional language switcher bugs and the WebAuthn feature lacking a passwordless login option.

Future Outlook

While the developer expresses frustration over certain challenges, the notes indicate a continued commitment to improvements. Future plans include:

  • A revised UI utilizing the Bootstrap Material Design 5 framework
  • Streamlined deployment processes with Webpack

The Road to xPense7

The xPense Version 7.0 rewrite demonstrates a dedication to building a robust, user-friendly expense tracking solution. The changes target both core functionality and the development process itself, laying the groundwork for an application that remains adaptable to evolving web technologies and user needs.

Features

xInput™

xInput 2.0 is second Iteration of xPense's xInput™ commands that create in respect to a traditional GDS (Global Distribution System) terminal and flesh out more examples for the xInput™ 1.0 release:

Understanding GDS Inspiration

Traditional GDS terminals, used primarily in the travel industry, offer a command-driven interface for actions like booking flights, hotels, and car rentals. Key characteristics of GDS commands include:

  • Structured Commands: Clear syntax with command codes, separators, and parameters (e.g., "AV15AUGJFKLAX" to check flight availability).
  • Efficiency: Commands allow experienced users to execute complex tasks quickly without navigating menus.
  • Focus: Commands are tailored to domain-specific actions within the travel industry.

xInput™ Design Principles

xInput™ aims to provide similar power and efficiency within the personal finance domain. Based on your examples, key design principles seem to be:

  • Simplicity with Flexibility: Short commands with easy-to-understand arguments ("c:" for category, "tx:" for transaction ID).
  • Accommodating Mobile Users: Comma-delimited arguments for easier typing on mobile keyboards.
  • Mix of Actions: Both direct actions (like adding a transaction) and navigation shortcuts.
  • Asynchronous vs. Synchronous Some actions happen in the background, others immediately change the UI.

Potential xInput™ Commands (Version 1.0 and Beyond)

Let's categorize and expand upon commands, with an eye towards real-world use cases:

Core Commands

  • Navigation:
    • today: Go to today's daily summary view
    • ytd: Show year-to-date summary
    • prevweek: Go to the previous week's summary
  • Data Entry:
    • + "Lunch" 10: Add a new expense of $10 in the "Lunch" category
    • +income "Salary" 500: Add income
  • Data Manipulation:
    • tx:123 edit: Edit transaction with ID 123
    • tx:123 delete: Delete transaction with ID 123

Advanced Commands (Later Versions)

  • Filtering/Reporting:
    • cat:food: Show all transactions in the "Food" category
    • report:2023-11: Generate a monthly report for November 2023
  • Batch Actions:
    • tag:coffee txn:123 txn:45: Add the tag "coffee" to multiple transactions
  • Relative Time Shortcuts:
    • -15: Add a transaction from 15 minutes ago (similar to your example)
  • Integration
    • fbmsg + "Pizza" 20: Send an expense entry to Facebook Messenger

Customization Potential

Allowing users to configure the following could be incredibly helpful:

  • Aliases: txe:123 as a personalized alias for tx:123 edit
  • Default Values: If + is typed without a category, use a pre-set "default" category.

Additional Considerations

  • Auto-Complete & Suggestions: xInput™ could suggest commands as the user types for easier discovery, especially for advanced commands.
  • Help: A command like help or ? to list available commands with short descriptions.

Let me know if you'd like to explore:

  • More advanced commands with complex filtering or reporting logic
  • Integration with other services or platforms (bank sync, etc.)
  • UI considerations for how xInput™ might live within the dashboard.

Command Syntax

Rich Math Expressions

xPense's xInput™! allows math expressions for transaction creation, considering both functionality and user experience.

Here's how this feature could work:

  • Command Syntax:
    • +calc "4 beers @ $15 + tip(15%)"

This command would represent buying 4 beers at $15 each, with a 15% tip added as a separate transaction.

  • Processing:
    • xPense would parse the expression using a math engine (like JavaScript's eval function with proper sanitization).
    • It would identify:
      • Base amount (4 * 15)
      • Tip amount (base amount * 0.15)
      • Category for the base transaction (e.g., "Beer")
      • User-defined category for the tip transaction (e.g., "Tip")
    • Two separate transactions would be created with the calculated amounts and assigned categories.
    • The response would be: 2:[snowflake1, snowflake2], indicating successful creation with the Snowflake IDs.

Benefits:

  • Efficiency: Users can enter complex transactions with calculations in a single command.
  • Accuracy: Reduces errors from manual calculations, especially for multiple items or percentages.
  • Flexibility: Supports various calculations beyond tipping (e.g., discounts, splits).

User Experience Considerations:

  • Clear Documentation: Provide clear examples and explanations on how to use the math expression feature within xInput™.
  • Error Handling: Implement robust error handling for invalid expressions or unsupported operators. Ideally, provide informative messages to guide the user towards a correct format.
  • Input Validation: Sanitize user input to prevent potential security vulnerabilities associated with the math engine.

Integration with Existing Commands:

This feature can be seamlessly integrated with existing xInput™ commands:

  • Users can combine it with category or date arguments: +calc "4 beers @ $15 + tip(15%)" category:Dining date:2024-03-20

Overall, this rich math expression functionality in xInput™ empowers users with a powerful and convenient way to manage transactions involving calculations.

Quiet Operation (-q)

That's an excellent idea! Incorporating a Linux-inspired "-q" flag for quiet mode in xInput™ commands would definitely enhance user experience. Here's how this could be implemented:

Command Syntax

Let's use your previous example and add the "-q" flag to enable quiet operation:

  • Default Mode (with confirmation): +calc "4 beers @ $15 + tip(15%)"
  • Quiet Mode (no confirmation): +calc "4 beers @ $15 + tip(15%)" -q
Behavior
  • Default Mode:
    • xInput™ parses the expression and calculates the transactions.
    • It presents a confirmation prompt to the user, similar to:
Create two transactions?
 - 4 Beers @ $15 (category: Beer)
 - Tip: $9.00 (category: Tip)
Affected Rows: 2 [snowflake1, snowflake2]
Enter 'y' to confirm creation or 'n' to cancel. [y/n]>_ 
  • Quiet Mode (-q):
    • xInput™ parses and calculates transactions as before.
    • Bypasses the confirmation prompt and directly creates the transactions.
    • Returns the successful response: 2:[snowflake1, snowflake2]
Benefits
  • Efficiency for Experienced Users: Users familiar with their transaction patterns can skip confirmations for faster input.
  • Automation Potential: The "-q" flag is ideal for integrating xInput™ with scripts or other automation tools.
  • Consistency with Linux: Aligns with established command-line conventions, providing a familiar experience for tech-savvy users.
Extending the Concept

This principle could be applied to other xInput™ commands:

   tx:123 edit -q: Edit transaction 123 without confirmation.

   tx:123 delete -q: Delete transaction 123 without confirmation.

Considerations
  • Clear Documentation: Thoroughly explain the purpose and usage of the "-q" flag with examples.
  • Potential for Mistakes: While efficient, the "-q" mode increases the risk of accidental actions. Perhaps consider a global setting within xPense to generally enable "quiet mode" for advanced users as an option.

一目 Plugin

一目 (Ichimoku Plugin) a powerful personal finance extension for xPense. Here's how MoNoRi-Chan could transform that idea into a valuable tool:

The "一目" ("Ichimoku" or "One Look") Plugin

MoNoRi-Chan, with his experience pulling financial data from various sources, saw the potential in simplifying that jumble for xPense users. Instead of just tracking expenses, why not create a plugin that gives a one-screen snapshot of their overall financial health?

  • Data Integration: The heart of "一目" would be its connections to external data. Imagine users securely authorizing access to their bank accounts, investment platforms, and maybe even crypto wallets. MoNoRi-Chan would leverage those APIs we talked about earlier.
  • Dashboards Done Right: Forget boring pie charts. Design a sleek dashboard with key visual elements inspired by stock market charts. Think bold colors, clear trends over time, and intuitive sections:
    • Net Worth Summary: A big, satisfying number summarizing assets vs. liabilities. A mini-graph underneath could track change over time (past week, month, etc.)
    • Asset Breakdown: Maybe a visually pleasing "sunburst" chart showing how their portfolio is divided - equities, fixed income, crypto (if they're brave), and even real estate if the data can be sourced.
    • Cash Flow Check: A simple inflow vs. outflow comparison. MoNoRi-Chan would connect this to xPense data to show where the money's going, but also provide space for projected income.

The Value Proposition:

  • Save Time: Instead of juggling multiple apps, users get their financial summary in one place, alongside their xPense expense tracking.
  • Decision-Making Power: Having a clear picture of their net worth, trends, and cash flow can empower users to save more, invest smarter, or adjust their spending.
  • Customizable: MoNoRi-Chan could include options to toggle different data sources on/off, change color palettes, or even personalize alert thresholds for things like low balance notifications.

MoNoRi-Chan's Unique Edge

His quirky personality would shine through. Instead of stuffy financial terms, he could gamify elements:

  • Achievements: Unlock badges for milestones like "Debt Destroyer" (paying off a credit card) or "Savings Superstar" (hitting a saving goal).
  • Humorous Insights: Instead of generic "You spent more on coffee this week!", maybe a, "Your caffeine levels could power a small village. Perhaps try tea tomorrow?"That's a fantastic lens to use - your journey from student to full-stack developer offers unique insights for relevant achievements! Let's brainstorm some ideas, then discuss blockchain vs. banking integration and finally tackle the MoSCoW for your Laravel rewrite.

Achievement Ideas Inspired by MoNoRi-Chan's Journey

  • "The Ramen Graduate": Awarded for a period of consistently low food expenses (hello, student life!).
  • "Paycheck Power-Up": Triggered by the first significant income increase after graduation.
  • "Freelance Freedom": Celebrates a specific number of transactions tagged as "client income" in a period (hello, self-employment!)
  • "Debt Dodger": Rewards consistent debt pay-down or achieving a zero balance on a credit account.
  • "Hustle Hard, Save Harder": Granted for increasing savings by a significant percentage compared to the previous period.

Blockchain Integration: Premium Potential

While blockchain integration could simplify things in some ways. Consider these for a "Premium" tier:

  • NFT Rewards: Instead of just badges, mint unique NFTs for certain achievements. These could be tradeable on a xPense-specific marketplace, unlocking real-world discounts or merch.
  • Investment Tracking: If users connect crypto wallets, track their holdings' value and even offer basic on-chain transaction insights.
  • DeFi Integration: This is more advanced, but imagine allowing users to automate savings into DeFi protocols for earning yield. Definitely niche, but exciting for crypto enthusiasts.

MoSCoW for xPense7 Laravel Rewrite

Let's break it down, considering your goal of an enhanced user experience and the "一目" plugin:

  • Must Have:
    • Rock-solid Core Expense Tracking: This is xPense's bread and butter. The revamp must make it even smoother and more reliable.
    • Secure User Authentication: A revamped Laravel system should improve security and password management.
    • Cloud Sync & Data Portability: Users need reliable syncing between devices and the ability to export data if they choose.
  • Should Have:
    • UI/UX Refresh: Make xPense modern and intuitive, but consider legacy users who are comfortable with the current flow.
    • Basic Reporting & Analytics: Even without the plugin, offer more visual spending summaries for non-advanced users.
    • Expanded Currency & Language Support: Grow your potential user base.
  • Could Have:
    • "一目" Plugin Foundation: Lay the groundwork for the plugin (API handling, customizable dashboard elements) even if all features aren't released at once.
    • Community & Sharing: Allow users to opt-in to share anonymized data for trend analysis, or create "challenges" together.
    • AI-Powered Insights: Start with simple suggestions based on spending habits ("Looks like you enjoy dining out, check out these deals in your area").
  • Won't Have (For Now):
    • Full-Fledged DeFi Integration: Complex and regulatory hurdles make this a long-term goal.
    • Extensive Blockchain Features: Keep the focus on core personal finance, but lay the foundation for optional crypto expansion.