A Node.js application for processing transactions from CSV files with a RESTful API.
- Upload CSV files containing transaction data
- Process transactions and categorize them into accounts and cards
- Identify and store bad transactions (transactions with missing fields)
- Retrieve accounts, cards, and bad transactions via API endpoints
- Reset the system to clear all data
- Secure APIs with CORS and API keys
- Pagination for large datasets
- Node.js (v14 or higher)
- npm (v6 or higher)
-
Clone the repository:
git clone https://github.com/tesla07/processor-interview-ut.git cd transaction-processor
-
Install dependencies for backend and frontend:
npm install npm install http-server
- Start the backend server:
cd backend npm run dev
- Start the frontend server:
cd frontend
http-server
- Open your browser and navigate to http://localhost:8081 to access the application.
Upload a CSV file containing transaction data.
- Request Body: Use a form with a file input to upload the CSV file.
- Response: Success message or error details.
Retrieve all collections of accounts with negative balance.
Retrieve all bad transactions (transactions with missing fields).
Clear all data from the system (transactions, cards, and accounts).
- Response: Success message confirming data reset.