1.0.0 • Published 1 year ago

credit-card-program v1.0.0

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
1 year ago

Join our Discord

Credit Card Program Setup

Welcome to the Credit Card Program setup guide. This project provides pre-coded components and API connections to help you easily set up your own credit card program. Follow the steps below to get started.

Table of Contents

Prerequisites

Before you begin, ensure you have the following installed on your machine:

Installation

  1. Clone the repository:

    git clone https://github.com/vashong/fintech.git
    cd creditcard
  2. Install dependencies:

    Using npm:

    npm install

    Or using Yarn:

    yarn install

API Configuration

To connect with the API, you need to configure the API URL in your project. The API URLs are specified in the src/api/transactions.ts and src/api/cards.ts files.

  1. Open src/api/transactions.ts and src/api/cards.ts.

  2. Replace the placeholder URLs with your actual API endpoints:

    // src/api/transactions.ts
    const API_URL = 'https://api.example.com/transactions'; // Replace with your API URL
    
    // src/api/cards.ts
    const API_URL = 'https://api.example.com/cards'; // Replace with your API URL

Running the Application

To start the development server, run:

Using npm:

npm start

Or using Yarn:

yarn start

Open your browser and navigate to http://localhost:3000 to see the application running.

Project Structure

The project structure is organized as follows:

credit-card-program/
├── node_modules/
├── public/
├── src/
│   ├── api/
│   │   ├── cards.ts
│   │   └── transactions.ts
│   ├── components/
│   │   ├── BalanceItem.tsx
│   │   ├── CreditCard.tsx
│   │   ├── CreditScore.tsx
│   │   ├── TopPanel.tsx
│   │   ├── Transaction/
│   │   │   ├── Transaction.tsx
│   │   │   ├── TransactionList.tsx
│   │   │   └── TransactionItem.tsx
│   ├── types/
│   │   └── index.ts
│   ├── App.tsx
│   ├── index.css
│   ├── index.tsx
│   └── ...
├── tailwind.config.js
├── package.json
├── postcss.config.js
└── README.md

Components Overview

Transaction Component

The Transaction component is the main container that fetches and displays transactions.

  • Location: src/components/Transaction/Transaction.tsx

TransactionList Component

The TransactionList component renders a list of TransactionItem components.

  • Location: src/components/Transaction/TransactionList.tsx

TransactionItem Component

The TransactionItem component renders the details of a single transaction.

  • Location: src/components/Transaction/TransactionItem.tsx

Other Components

  • BalanceItem: Displays balance information.

    • Location: src/components/BalanceItem.tsx
  • CreditCard: Manages credit card information.

    • Location: src/components/CreditCard.tsx
  • CreditScore: Shows the credit score.

    • Location: src/components/CreditScore.tsx
  • TopPanel: Provides a top panel for navigation or summary information.

    • Location: src/components/TopPanel.tsx

Contributing

We welcome contributions from the community. To contribute:

  1. Fork the repository.
  2. Create a new branch with a descriptive name.
  3. Make your changes and commit them with clear messages.
  4. Push your changes to your fork.
  5. Submit a pull request.

Please ensure your code adheres to the project's coding standards and passes all tests.

License

This project is licensed under the MIT License. See the LICENSE file for more information.