rmsthebest / iban_beaver

webthing to do iban verification

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contributors Issues AGPL License


Logo

IBAN Beaver

IBAN verification for cheapskates

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgements

About The Project

IBAN Beaver is a webapp that verifies an IBAN upon request. The response is a json object with information about the associated bank (if any). It is free to use, but keep in mind that this is just a project to learn about webby things and databases. Don't sue me if you use this for billing and something goes wrong.

Supported Countries

  • Austria
  • Belgium
  • Germany
  • Netherlands

Built With

Getting Started

Prerequisites

Only tested on GNU Linux.

  • rust / cargo
  • base-devel / build-essential / your distros dev meta-package
  • diesel_cli, needed for diesel migrations. See their doc.
  • sqlite3-dev
     cargo install diesel_cli # generic
     sudo pacman -S diesel-cli sqlite3-dev # arch

Installation

  1. Clone the repo
    git clone https://github.com/rmsthebest/iban_beaver.git
  2. Run!
    diesel setup # creates db
    diesel migration run # create the tables. can use redo to drop table first
    cargo run --release

There's also a docker container now, if you prefer that.

Usage

Server Side

See step 2 in Installation By default a resources directory is expected to exist from where you are running iban_beaver. If you install it somewhere else like /usr/local/bin you may want to run it like this:

mkdir -p ~/.local/share/iban_beaver/resources
mv /path/to/db.sqlite ~/.local/share/iban_beaver/resources
env IBAN_BEAVER_RESOURCES=~/.local/share/iban_beaver/resources iban_beaver

Client/User

Interface is exposed at http://localhost:3030/swagger-ui

Verify IBAN

curl 0.0.0.0:3030/verify/<iban>
curl 0.0.0.0:3030/verify/DE27100777770209299700

Update database

curl 0.0.0.0:3030/update/<country>
curl 0.0.0.0:3030/update/DE

Blacklist IBAN

curl 0.0.0.0:3030/db/blacklist/<iban>/<add or remove>
curl 0.0.0.0:3030/db/blacklist/DE27100777770209299700/add

Fill database without downloading new data, you should never have to do this.

curl 0.0.0.0:3030/re-fill/<country>
curl 0.0.0.0:3030/re-fill/DE

Roadmap

I'm not that ambitious. If you assume current status is all you're going to get you are most likely right. If someone opens an issue I might work on that.

Contributing

This is a best effort project, I might move on with my life and never see your contribution.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Steps to add support for a country

  1. Create src/country/<countrycode>.rs
  2. Satisfy the country trait (copy a similar country and fix what needs to be fixed)
  3. Add country to match statement in src/country/mod.rs
  4. Test the update/fill/iban commands. Valid ibans for testing can be found here

Acknowledgements

License

Distributed under the AGPL-v3 License. See LICENSE for more information.

About

webthing to do iban verification

License:GNU Affero General Public License v3.0


Languages

Language:Rust 96.4%Language:Dockerfile 3.6%