Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Linxo Transaction Reader

Turn Linxo into a JSON API - simple, automated, script-friendly

Linxo Transaction Reader is a lightweight Go service that automates transaction extraction from Linxo using a headless browser and exposes the result as a clean HTTP JSON API.

Designed for automation, observability, and personal finance tooling.


✨ Key Concept - Web UI as an API

Linxo does not provide a public API - this service turns the web interface into one.

If a human can export it β†’ this service can automate it.

Instead of reverse engineering APIs, it reproduces the real user workflow through a browser.

βš™οΈ End-to-End Flow

flowchart LR
    A[API Request] --> B[Start Headless Browser]
    B --> C[Login to Linxo]
    C --> D[Trigger CSV Export]
    D --> E[Download CSV]
    E --> F[Parse Transactions]
    F --> G[Return JSON Response]
Loading

πŸ” Execution Pipeline

  1. 🌐 Launch Chromium via Rod
  2. πŸ” Authenticate to Linxo
  3. πŸ“₯ Export transactions as CSV
  4. πŸ”„ Parse into structured Go models
  5. πŸ“‘ Return JSON via HTTP API

βœ… Why this approach

  • πŸ”Œ API without API - no dependency on unofficial endpoints
  • πŸ€– Fully automated - no manual export
  • πŸ“¦ Lightweight - single Go binary / Docker container
  • 🧩 Composable - easy to plug into pipelines
  • πŸ” Transparent - behavior matches real user actions

πŸ” Features Overview

🌐 HTTP API

Feature Description
πŸ“‘ /showbanks Fetch and return transactions as JSON
πŸ” API key auth Protect access via header/token
πŸ“„ JSON output Structured transaction format

πŸ€– Browser Automation Engine

Component Description
Chromium (headless) Executes the Linxo workflow
Rod Controls browser lifecycle
Auth flow Handles login session
Export flow Automates CSV download

πŸ“¦ Project Architecture

cmd/linxo-reader/      Entry point
internal/
  api/                 HTTP server, routes, middleware
  browser/             Chromium lifecycle via Rod
  config/              Environment & flag configuration
  linxo/               Linxo domain logic (auth, CSV, orchestration)
models/
  transaction.go       Domain types (Transaction, CSVRecord)

βš™οΈ Configuration

All configuration is driven by environment variables and CLI flags.

πŸ”‘ Required

Variable Description
API_KEY API key for securing requests
LINXO_EMAIL Linxo account email
LINXO_PASSWORD Linxo account password

βš™οΈ Optional

Variable / Flag Default Description
CHROME_BIN auto Path to Chromium binary
BROWSER_TIMEOUT 3m Max browser session duration
-debug false Run browser in visible mode
-port 8080 HTTP listening port

πŸ“₯ Installation & Usage

πŸ§ͺ Run from source

export API_KEY="your-secret-key"
export LINXO_EMAIL="you@example.com"
export LINXO_PASSWORD="your-password"

go run ./cmd/linxo-reader

🐳 Run with Docker

docker build -t linxo-reader .

docker run -p 8080:8080 \
  -e API_KEY="your-secret-key" \
  -e LINXO_EMAIL="you@example.com" \
  -e LINXO_PASSWORD="your-password" \
  linxo-reader

πŸ“‘ API Usage

πŸ” Fetch transactions

curl -H "X-Api-Key: your-secret-key" \
  http://localhost:8080/showbanks

πŸ“„ Example response

[
  {
    "from": "CARTE MONOPRIX",
    "category": "Courses",
    "amount": "-42.50",
    "date": "28/03/2026",
    "note": ""
  }
]

πŸ” Authentication

Every request must include a valid API key:

Method Example
Header X-Api-Key: <key>
Bearer Authorization: Bearer <key>

πŸ› οΈ Runtime Behavior

🌐 Browser lifecycle

sequenceDiagram
    participant Client
    participant API
    participant Browser
    participant Linxo

    Client->>API: GET /showbanks
    API->>Browser: Launch Chromium
    Browser->>Linxo: Login
    Browser->>Linxo: Download CSV
    Linxo-->>Browser: CSV File
    Browser->>API: Parsed data
    API-->>Client: JSON response
Loading

πŸ§ͺ Debug mode

go run ./cmd/linxo-reader -debug

⏱️ Timeout tuning

export BROWSER_TIMEOUT=5m

🌍 Custom browser path

export CHROME_BIN=/usr/bin/chromium

🎯 Use Cases

  • πŸ“Š Personal finance dashboards
  • πŸ”„ Automated reporting pipelines
  • πŸ“¦ Data ingestion into other systems
  • 🧾 JSON export instead of CSV
  • 🏠 Self-hosted financial tooling

⚠️ Limitations

  • Depends on Linxo web UI stability
  • UI changes may break automation
  • Requires a working browser environment
  • Not an official Linxo API

🀝 Contributing

Contributions are welcome:

  • πŸ› Bug reports
  • πŸ’‘ Feature suggestions
  • πŸ”§ Pull requests
git checkout -b feature/your-feature

πŸ“„ License

This project is licensed under the MIT License.

About

Linxo Transaction Reader is a lightweight Go service that automates transaction extraction from Linxo using a headless browser and exposes the results as a clean HTTP JSON API

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages