Skip to content
trevo

trevo

Smarter Cash Flow Decisions

Created on 28th August 2026

•

trevo

trevo

Smarter Cash Flow Decisions

The problem trevo solves

Small businesses often have enough money to operate, but the timing of when money comes in and goes out creates problems. An invoice may be delayed, a supplier payment may be due earlier than expected, or an important expense may suddenly appear. In these situations, simply looking at the current bank balance is not enough.

TREVO helps businesses decide what to do with their money before a cash flow problem becomes a crisis.
It looks at the business's available cash, upcoming payments, expected customer payments, financial obligations, and available financing options. It then evaluates possible actions and recommends a practical decision.
Instead of asking:
"Do we have enough money today?"

TREVO helps answer:
"Given everything that is expected to happen, what should we do now to keep the business financially safe?"

People can use TREVO to:

  • Plan upcoming cash flow: See how current decisions may affect the business over the coming days.
  • Prioritize payments: Identify which payments should be made first when available cash is limited.
  • Handle delayed customer payments: Understand how a late invoice can affect the rest of the business.
  • Compare financing options: Determine when using available financing may be better than delaying an important payment.
  • Respond to unexpected events: Simulate situations such as a customer payment being delayed and immediately see how the recommended plan changes.
  • Understand why a decision was made: TREVO does not just provide a recommendation. It shows the reasoning behind the decision, making the system easier to trust and verify.
  • Explore alternative decisions: Users can examine what would happen if a different action were taken instead of simply accepting the first recommendation.
  • Keep a history of decisions: Previous decisions and events can be recorded so that users can understand how the financial situation evolved.
  • Use voice explanations: The system can explain financial decisions through voice, making the information easier to consume for users who may not want to read a detailed financial analysis.
    The main idea is to turn a complicated cash flow planning problem into something a business owner or financial manager can understand, simulate, and act on.

TREVO is therefore not simply a dashboard showing financial numbers. It is designed as a decision support system that connects the numbers to an actual recommended action.

Challenges we ran into

One of the biggest challenges was making the frontend, backend, database, and decision engine work together as one system.
Initially, the frontend could display simulated information, but connecting it to the actual backend meant that the application had to deal with real API responses, database state, and decisions generated by the optimization engine.

  1. Connecting the frontend to the real decision engine
    The frontend was originally designed around mock data. We had to replace that approach with calls to the actual FastAPI backend.
    This required making sure that the data returned by the backend matched what the frontend expected.
    We solved this by introducing adapters between the backend responses and the frontend's view models. This allowed us to keep the frontend structure while connecting it to the real decision engine.
  2. Database initialization problem
    We encountered a particularly important issue with the SQLite database.
    The backend was running correctly and the health endpoint returned:
    200 OK
    However, requesting the actual business state returned:
    500 Internal Server Error
    The reason was that the SQLite database file existed, but it was empty or did not contain the required tables.
    The backend then tried to access the business_state table, which did not exist.
    We diagnosed this by inspecting the database itself rather than assuming that the API code was broken.
    The solution was to restore the valid baseline database and add database initialization safeguards so that the backend can create the required tables and seed the baseline data when necessary.
  3. Making the application reproducible
    This database issue exposed a larger problem.
    If the application depends on a local trevo.db file, simply cloning the GitHub repository on another computer may not be enough to run the application correctly.
    We therefore started moving toward an environment based architecture where configuration and database connections are controlled through environment variables.
    This is important for eventual deployment because the production application should not depend on a database file sitting inside the GitHub repository.
  4. Running the backend and frontend together
    We also encountered issues with development servers already occupying ports.
    For example, when another Vite process was already running, starting the frontend again caused Vite to automatically move from port 5173 to 5174.
    Similarly, Uvicorn sometimes reported:
    [WinError 10048]
    Only one usage of each socket address is normally permitted
    This happened because another backend process was already using port 8000.
    We diagnosed these issues using Windows networking commands such as netstat and process inspection, then managed the running processes before starting the server again.
  5. Dependency and environment problems
    The backend initially failed because a required Python package was not installed in the active environment.
    The error was:
    ModuleNotFoundError: No module named 'dotenv'
    The important lesson was that having Python installed is not enough. The project needs a clearly defined environment containing all of its dependencies.
    We addressed this by using a project virtual environment and maintaining dependency files so that the backend can be installed consistently.
  6. Making the financial decisions reliable
    The most important technical challenge is not simply calculating a cash balance. TREVO needs to consider multiple financial decisions at the same time.
    For example, delaying one payment may preserve cash today but create another problem later. Borrowing money may solve an immediate shortage but introduce financing costs.
    The decision engine therefore evaluates these competing possibilities and generates a joint decision plan rather than treating every payment as an isolated problem.
    This is where the optimization engine becomes important. It allows TREVO to search through possible decisions and select a plan that balances cash availability, obligations, financing, and the consequences of different actions.
  7. Testing the complete system
    Another challenge was that a successful backend startup does not necessarily mean that the application works.
    We therefore moved toward testing the system endpoint by endpoint.

Discussion

Builders also viewed

See more projects on Devfolio