8000 GitHub - leonardomarcao/credit_card
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

leonardomarcao/credit_card

Repository files navigation

Card Vault

Codacy Badge codecov

Card Vault is a secure and intuitive credit card management system designed to store, retrieve, update, and delete credit card data. The main goal of this application is to provide a convenient solution for businesses and individuals who need to manage a large amount of credit card data.

Sequence Diagram

Setup

Prerequisites

Environment Variables ⚠️

  • Create a .env file in the root directory of the project based on the .env.example file.

Docker Quickstart

This app can be run completely using Dockeranddocker-compose`. Using Docker is recommended, as it guarantees the application is run using compatible versions of Python.

To run the app using Docker (detached mode), run the following command:

docker-compose up card-vault-app -d

Go to http://localhost:8080 to view the app.

Go to http://localhost:8080/docs to view the API documentation.

Running locally

Run the following commands to bootstrap your environment if you wish to run the application locally:

pip install -r requirements
flask db upgrade
flask run

Go to http://localhost:8080 to view the app.

Go to http://localhost:8080/docs to view the API documentation.

Running Tests

To ensure the integrity of the application, you can run a suite of tests that have been written using pytest. Whether you are running the application locally or using Docker, you can use the following commands to run the tests:

Running tests locally

To run the tests locally, navigate to the root directory of your application and run:

pytest

This will discover and run all the test cases that exist in your tests directory.

Running tests using Docker

If you are running the application in Docker, you can run the tests using the following command:

docker-compose run card-vault-app pytest

This command creates a new service that runs the pytest command in a new container.

When the tests have completed, you will see a summary in the terminal. If all the tests pass, then everything is working as expected. If any tests fail, you should see error messages that explain what has gone wrong.

Coverage Report

If you want to generate a coverage report, you can do so with the following commands:

Running coverage locally

pytest --cov=card_vault

Running coverage using Docker

docker-compose run card-vault-app pytest --cov=card_vault

Acknowledgements/Credits

  • python-creditcard: this project was used as a reference for the credit card validation logic.
  • cookiecutter-flask: this project was bootstrapped using the Flask Cookiecutter template. We would like to express our sincere gratitude to the maintainers and contributors of this open-source project for providing a strong starting point for our application.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0