This repository contains two distinct applications:
- Dell File Comparator: A Flask-based web application designed to compare transaction records between two files (TAR and ECB) and identify discrepancies.
- ShipKeep Co: A React-based frontend application for a fictional cruise booking company.
- File upload interface for TAR and ECB files
- Automated comparison of transaction records
- Detailed discrepancy reporting
- CSV file format support
-
Clone the repository
-
Navigate to the
Time_Keep_Co
directory -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Start the application:
python run.py
-
Open http://localhost:5000 in your browser
-
Upload TAR and ECB files for comparison
-
View discrepancy results
-
Composite Key Strategy
key = (row["SPA"].strip(), row["Service Code"].strip())
- Using tuple as dictionary key for O(1) lookups
- Combines SPA and Service Code for unique record identification
- Enables efficient comparison between files
-
Record Storage Format
record = { "Charge": clean_currency(row["Charge"]), "Stop Date": clean_date(row["Stop Date"]), "New Charge": clean_currency(row["New Charge"]) }
- Normalized data structure
- Pre-cleaned values for comparison
- Minimal memory footprint
-
Two-Pass Approach
First Pass: TAR → ECB (find missing/mismatched in ECB) Second Pass: ECB → TAR (find missing in TAR)
-
Comparison Logic
For each record: 1. Check existence (O(1) lookup) 2. If exists, compare fields: - Charge amount - Stop date - New charge 3. Track discrepancy type and values
-
Performance Considerations
- Time Complexity: O(n + m) where n, m are file sizes
- Space Complexity: O(n + m) for storing records
- Memory Usage: ~100MB per 500K records
-
Unit Test Categories
1. Data Loading Tests - File format variations - Character encodings - Missing columns 2. Cleaning Tests - Currency formats - Date formats - Edge cases 3. Comparison Tests - Missing records - Value mismatches - Large datasets
-
Performance Benchmarks
Small Files (1K records): < 0.1 seconds Medium Files (50K records): < 1.5 seconds Large Files (500K records): < 10 seconds
Time_Keep_Co/
├── app/
│ ├── templates/
│ ├── __init__.py
│ └── routes.py
├── utils/
│ ├── data_loader.py
│ ├── data_cleaner.py
│ └── comparator.py
├── config.py
├── run.py
└── README.md
Logs are stored in
app.log
and include:
- File processing events
- Error tracking
- Application status
The application handles:
- Invalid file formats
- Missing required fields
- File processing errors
- Data comparison issues
-
Current Limitations
- Single-threaded processing
- In-memory data structures
- Synchronous file I/O
-
Scaling Solutions
Short-term: - Batch processing - Memory-mapped files - Parallel comparison Long-term: - Distributed processing - Database integration - Microservice architecture
- User-friendly interface for cruise booking
- Responsive design using Tailwind CSS
- Authentication (Login and Signup)
- Featured destinations and cruise details
- Clone the repository
- Navigate to the
shipkeep-app
directory 3. Install frontend dependencies:
cd frontend
npm install
-
Install backend dependencies:
cd ../backend python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt
-
Start the backend server:
source venv/bin/activate # On Windows: venv\Scripts\activate flask run
-
Start the frontend server:
cd ../frontend npm start
-
Open http://localhost:3000 in your browser
shipkeep-app/
├── backend/
│ ├── app.py
│ ├── requirements.txt
│ └── venv/
├── frontend/
│ ├── public/
│ ├── src/
│ ├── package.json
│ └── README.md
└── README.md
In the frontend
directory, you can run:
npm start
: Runs the app in development mode.npm run build
: Builds the app for production.npm test
: Launches the test runner.npm run eject
: Ejects the configuration files.
- Using concurrently to run both the frontend and backend servers at the same time.
- Adding
"proxy": "http://127.0.0.1:5000",
topackage.json
to resolve CORS issues.
This project was bootstrapped with Create React App.
For more information, refer to the Create React App documentation.
This repository showcases two distinct applications demonstrating skills in both backend and frontend development. The Dell File Comparator focuses on data comparison and discrepancy reporting, while ShipKeep Co provides a user-friendly interface for cruise booking. Both applications are designed with scalability and user experience in mind.