/credit-card-validator

A simple credit card number validator

Primary LanguageJavaScript

Another Credit Card Validator

A webapp built from the CS50 homework, translated to ReactJS

https://ccvalidator.netlify.app/

Impetus

From the moment I started the 'credit' app in CS50's Problem Set 1, I knew I'd want to translate it to JS and make a web app. I wondered why the algorithm (Luhn's) for determining a valid credit card number was available to a civilian like myself and I felt like a spy writing that particular bit of code. Since I'd already developed JS apps before, I opened this repo and just pushed up the code (still in C mind you) until I was ready to focus on flushing it out.

Intermediate

As I continued through the course, we began learning Python with which I'd also had experience. Low and behold, Problem Set 6 tasked us with translating 'credit' from C to Python, putting me one step closer to web speak. Since I wasn't familiar with Flask at the time, I thought this would be a great intermediate translation toward the ultimate goal. Once complete, I pushed to Github, hoping I could finish the app after CS50 was complete.

Progression

As I got closer to completing the course I realized there would be a Final Project, one that a translation of a course activity would be well suited for. In addition, I was tasked with choosing a Track for which I'd always wanted to learn Java for Android. At this point the year was closing in fast so decided to finish in 2021 with the Java Track and work on my Final Project. After that was mostly complete, I discovered that the Tracks were being relegated in 2021, so Android was out of the question. I couldn't learn Java and complete the 3 required apps in a week. The Web Track was the recommended substitute, so I had to finish that within a week's time.

Completion

Since I was already quite familiar with HTML, CSS, and JS I started with the finance app which is where I learned about Flask. As it turns out, I could have written the scripting of this entire project in Python. I'll do that in the future, but for now: A fully functioning credit card verifier in Javascript!

Finality

In essence, this app is 9 months in the making, starting when I first discovered JS. I've always had difficulty with React, so this is made on a React backbone, bolstered by a little Bootstrap. It's a simple app that takes one credit card number, does stuff, then outputs its validity. I added some qualified credit card numbers (from Paypal and others) or the user can attempt his own. In addition to the 3 card types provided in class, I also found clauses for 3 others and added them to the matrix. If you've ever wanted to check for authenticity that 30 year old Diner's Club card sitting in your drawer, this is the app for you!

In addition to the version control on Github, I've hosted the app on Netlify. Try it. Try to break it. Let me know your successes or failures.

https://ccvalidator.netlify.app/