Files
Torn-Vault-Tracker/README.md
T
Keith Solomon 7f1f4de553
🚀 Deploy website via FTP / 🎉 Deploy (push) Failing after 8s
Enhance README and refactor code structure for improved functionality
- Updated README.md with detailed project description, features, and installation instructions.
- Refactored functions.php to include configuration settings and improved database handling.
- Modified index.php for better user experience and added pagination controls.
- Introduced new utility functions for API handling and database interactions.
- Added CSS styles for improved layout and visibility of elements.
- Removed vault.csv as data is now managed through the database.
- Implemented FTP deployment workflow for automated deployment.
- Added exception handling classes for better error management.
- Created JavaScript functions for pagination of transaction records.
2026-08-03 11:26:55 -05:00

4.4 KiB

Torn Vault Tracker icon Torn Vault Tracker

PHP Version Database Deployed with FTP Deploy Action

A web-based tracking system for monitoring shared vault transactions in the Torn City MMORPG.

Description

This tool automatically tracks deposits and withdrawals from your Torn City private island vault using the official Torn API. It provides real-time balance tracking, available vault space calculations, and a transaction history display for multiple users.

Key Features:

  • 🕒 Automatic transaction synchronization via Torn API
  • 💰 Real-time balance calculations (individual & combined)
  • 📊 Color-coded transaction history (green deposits/red withdrawals)
  • 🛡️ Secure API key management
  • 📈 Vault space monitoring with individual user shares
  • 💾 SQLite database for persistent storage

Features

Core Functionality

  • Automated API polling for vault transaction logs
  • Duplicate transaction prevention
  • Responsive HTML/CSS interface
  • Error handling for API failures and database issues
  • Automatic database schema creation and history population

Financial Tracking

  • Individual user balances
  • Total vault balance calculation
  • Remaining vault space tracking (500M per user / 1B total)
  • Historical transaction records with timestamps

Installation

Requirements

  • Web server with PHP 8.1+
  • SQLite3 extension enabled
  • Write permissions for web server user

Note

If you need hosting, I recommend InfinityFree. They have a robust free hosting package that has everything you need to run this project (I run my personal copy of this project on their service).

Setup Steps

  1. Upload the project files to your web hosting. You can do this with an FTP client or by using git directly on the server (if your host supports it).

    • To use git: Clone repository to web directory (the command as written will put all files in a tvt directory):

      git clone https://github.com/yourusername/tvt.git
      
  2. Open config.php and configure the API keys and other settings.

  3. Access the project in your web browser to initialize the database and start tracking transactions. The first run will create the database and import the vault transactions for both users.

Depending on the number of transactions, this may take some time (my dev install took about 25 seconds to pull in ~2,100 transactions). The browser will refresh when the process is complete.

Configuration

Important

API keys must have "Full Access" permissions to access log endpoints.

Edit config.php to set up API access:

  • username1 and username2 should be changed to your usernames.

    const USER_KEYS = [
     'username1' => 'your_api_key_here',
     'username2' => 'partner_api_key_here'
    ];
    
  • If you want to change the number of rows per page in the transactions table (default is 15), change the ROWS_PER_PAGE constant

Usage

Access the tracker through your web browser after setup and configuration:

  • Transactions will automatically sync on page load going forward
  • Balance calculations update in real-time
  • Recent transactions display in chronological order

Contribution

We welcome contributions! Please follow these guidelines:

  • Fork the repository
  • Create feature branch (git checkout -b feature/improvement)
  • Follow existing PHP coding standards
  • Test changes thoroughly
  • Submit a pull request

Credits

Primary Author: Keith Solomon (ZarathosX75 in Torn City)

Acknowledgements

Important

Disclaimer: This project is not affiliated with or endorsed by Torn City