Giter VIP home page Giter VIP logo

validcard's Introduction

Valicard Project

Introduction

The Valicard project is a robust web application designed to validate credit card information efficiently. Utilizing Docker, it offers a seamless deployment experience while adhering to clean code and architecture principles for maintainability and scalability.

Features

  • Validate credit card numbers using the Luhn algorithm.
  • Verify expiration dates to ensure validity.
  • Docker integration for simplified deployment and enhanced isolation.

Requirements

  • Docker
  • Go (if running without Docker)

Installation

Begin by cloning the repository to your local machine:

git clone https://github.com/danyaobertan/validcard.git

cd valicard

Makefile

Take advantage of the Makefile to streamline operations:

make help

Output:

Usage:
  make install       - Install all dependencies.
  make run           - Run the application.
  make build         - Build the executable binary.
  make test          - Run tests.
  make lint          - Run linter.
  make clean         - Clean the binary.
  make docker-build  - Build the Docker image.
  make docker-run    - Run the Docker container.
  make docker-stop   - Stop and remove the Docker container.
  make docker-clean  - Remove Docker image.
  make docker-compose- Run the Docker container using docker-compose.
  make help          - Show this help message.

Luhn Algorithm

The Luhn algorithm validates credit card numbers, implemented in pkg/lunn.go. It has been rigorously tested on 10,000 credit card numbers generated via https://www.validcreditcardnumber.com.

CI/CD

The project employs a robust CI/CD pipeline using GitHub Actions, triggered on every push to the main branch.

Testing

Extensive testing ensure the code's correctness. Execute tests with:

make test

golangci-lint

Utilize golangci-lint was used to enforce best practices:

make lint

API Documentation

The project incorporates Swagger for API documentation. Alternatively, you can use some of requests in the requests.http file.

validcard's People

Contributors

danyaobertan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.