API to manage transactions, accounts, and categories for personal finance tracking.
All routes return JSON.
- GET
/: Root route shows if Web API is running - GET
api/v1/transactions: Get list of all transactions - POST
api/v1/transactions: Create a new transaction - GET
api/v1/transactions/[transaction_id]: Get a single transaction - GET
api/v1/wallets?current_account_id=[account_id]: Get payment methods for an account - POST
api/v1/wallets: Create a payment method for current account - GET
api/v1/wallets/[wallet_id]?current_account_id=[account_id]: Get a single payment method - GET
api/v1/transactions/[transaction_id]/accounts: Get list of accounts for a transaction - POST
api/v1/transactions/[transaction_id]/accounts: Create a new account for a transaction - GET
api/v1/transactions/[transaction_id]/accounts/[account_id]: Get a single account - GET
api/v1/transactions/[transaction_id]/categories: Get list of categories for a transaction - POST
api/v1/transactions/[transaction_id]/categories: Create a new category for a transaction - GET
api/v1/transactions/[transaction_id]/categories/[category_id]: Get a single category
Install this API by cloning the repository and using bundler to install gems from Gemfile.lock:
bundle installSetup development database once:
rake db:migrateRun this API using:
pumaThe API does not manage browser sessions; session encryption and Redis session
storage are handled by fintrack-app.
Required API environment variables are listed in config/secrets-example.yml:
DATABASE_URLSECURE_DB_KEYSECURE_HASH_KEYSECURE_SCHEME(HTTPfor local/test,HTTPSfor production)
Setup test database once:
RACK_ENV=test rake db:migrateRun the full test suite:
rake specBefore submitting pull requests, check specs, style, and dependency audits:
rake release_check