Commit Graph

29 Commits

Author SHA1 Message Date
Ümit Tunç b494d45ed8 Add currency test data and enhance FetchCurrencyRates job with TCMB integration
- Introduced a new JSON file containing currency rates for various currencies, including USD, EUR, and GBP, to standardize currency data representation.
- Enhanced the FetchCurrencyRates job to fetch USD data from TCMB if not available, improving data reliability.
- Added logging for TCMB data fetching process to assist in monitoring and debugging.

These changes collectively improve the accuracy and robustness of currency rate handling in the Truncgil Finance application.
2025-07-05 09:48:07 +03:00
Ümit Tunç 41eaf7c6df Update gold rate naming convention in FetchGoldRates job
- Changed the abbreviation for "22AYARBILEZIK" from "YIB" to "YIA" to improve clarity and consistency in the naming convention for gold rates.

This change enhances the accuracy of the data representation in the FetchGoldRates job within the Truncgil Finance application.
2025-04-22 10:36:45 +03:00
Ümit Tunç 93c7f74356 Enhance FetchGoldRates job with improved data handling and logging
- Added logging for data-socket-key values to assist in debugging and monitoring.
- Refined the extraction of gold rates to include specific metal types (Gold, Palladium, Platinum, Silver) based on the data attributes.
- Updated the user agent and accept language headers for improved compatibility with the data source.
- Enhanced the naming convention for gold rates to ensure clarity and consistency in the data structure.

These changes collectively improve the functionality and maintainability of the FetchGoldRates job in the Truncgil Finance application.
2025-04-22 10:15:14 +03:00
Ümit Tunç c37373c083 Enhance TimeDateController API documentation
- Updated method descriptions for fetching server time and date to improve clarity.
- Added grouping and subgroup annotations for better organization in API documentation.
- These changes collectively enhance the usability and clarity of the TimeDateController in the Truncgil Finance application.
2025-01-21 22:50:38 +03:00
Ümit Tunç 0ab592ecbc Refactor CurrencyController to enhance API documentation and response messages
- Updated method documentation to clearly describe the fetching of currency, crypto, and gold rates.
- Improved response messages to include all relevant rates (currency, crypto, and gold) for better clarity.
- Added grouping and subgroup annotations to API methods for improved organization in documentation.
- Enhanced consistency in method descriptions across the controller.

These changes collectively improve the clarity and usability of the CurrencyController in the Truncgil Finance application.
2025-01-21 22:50:30 +03:00
Ümit Tunç 0d6e449808 Refactor Console Kernel to include MergeCurrencyAndGoldRates job
- Added the MergeCurrencyAndGoldRates job to the Console Kernel, ensuring it is now part of the job dispatching process.
- This change improves the overall functionality of scheduled tasks related to currency and gold rates, enhancing data integration within the Truncgil Finance application.
2025-01-21 22:29:17 +03:00
Ümit Tunç 9409a4dbd9 Refactor CurrencyController to improve error handling and update messages
- Reordered the dispatching of jobs in the runAllFetchs method to ensure proper execution sequence.
- Updated API response messages from Turkish to English for consistency and clarity.
- Enhanced error messages for data retrieval failures to provide clearer feedback to users.
- Improved documentation comments to reflect the changes in functionality.

These changes collectively enhance the usability and clarity of the CurrencyController in the Truncgil Finance application.
2025-01-21 22:29:08 +03:00
Ümit Tunç a46f286ce2 Add FetchCryptoCurrencyRates job to Console Kernel
- Introduced the FetchCryptoCurrencyRates job in the Console Kernel to facilitate the fetching of cryptocurrency rates.
- This addition enhances the scheduled tasks functionality, allowing for better integration of cryptocurrency data within the application.
2025-01-21 21:47:01 +03:00
Ümit Tunç bf016af07c Refactor RouteServiceProvider to remove custom rate limiting for API requests
- Removed the custom rate limiter for API requests in RouteServiceProvider, simplifying the boot method.
- This change streamlines the routing setup and prepares for potential future enhancements in request handling.
2025-01-21 21:28:39 +03:00
Ümit Tunç 61c7a77431 Add FetchCryptoCurrencyRates job to scheduled tasks and clean up RouteServiceProvider 2025-01-21 21:28:33 +03:00
Ümit Tunç 09e981f94b Implement crypto currency rates feature and enhance API responses
- Added a new job to fetch crypto currency rates from an external source and store them in a JSON file.
- Updated the CurrencyController to include methods for retrieving current crypto currency rates and rates by name.
- Enhanced the API to return detailed metadata for crypto currency rates, including timestamps and update information.
- Updated the API routes to support new endpoints for crypto currency rates.
- Modified the merged rates JSON to include crypto currency data alongside existing currency and gold rates.
- Improved the welcome view to display additional crypto currency information, enhancing user experience.

These changes collectively expand the functionality of the Truncgil Finance application, providing users with comprehensive access to crypto currency data.
2025-01-21 19:27:03 +03:00
Ümit Tunç 30dd0c5b8d Enhance currency and gold rates API with custom throttling and improved responses
- Implemented a custom throttle middleware to limit requests to 2 per 30 seconds, enhancing API stability.
- Updated API responses to include Turkish messages for successful updates and error handling.
- Refactored the CurrencyController to integrate the new throttling logic and improve response clarity.
- Enhanced the Scribe documentation to reflect changes in API behavior and response formats.
- Updated views to improve branding and user experience, including dynamic content adjustments.

These changes collectively improve the API's performance, usability, and branding for the Truncgil Finance application.
2025-01-21 18:28:39 +03:00
Ümit Tunç 74d2e3e602 - Updated CurrencyController to enhance API responses for currency and gold rates.
- Added metadata to the responses, including timestamps and the time since the last update, improving data context for users.
- Enhanced method descriptions with relevant emojis for better readability and understanding.
- Refactored response handling to ensure consistent JSON structure across all rate retrieval methods.
- These changes improve the clarity and usability of the API, providing users with more informative responses.
2025-01-21 11:06:42 +03:00
Ümit Tunç 677da3892d Update RunAllFetchs command description for clarity
- Changed the command description to provide a clearer understanding of its functionality, specifying that it runs all fetch jobs for currency and gold rates. This enhances documentation and usability for developers interacting with the command.
2025-01-20 23:47:17 +03:00
Ümit Tunç 32119b6911 Add TimeDateController for server time and date API endpoints</message>
<message>
- Introduced TimeDateController with two new endpoints: `/server-time` and `/server-date`.
- Implemented methods to return the current server time and date in JSON format.
- Enhanced API functionality by providing easy access to server time and date information.
2025-01-20 22:43:52 +03:00
Ümit Tunç 63aa362100 Enhance runAllFetchs method in CurrencyController for error handling and response formatting
- Wrapped job dispatching calls in a try-catch block to handle potential exceptions during the fetching of currency and gold rates.
- Added JSON response for both success and error scenarios, improving the API's feedback mechanism for clients.
- Updated method documentation to reflect the return type of the method.

These changes improve the robustness and user experience of the currency and gold rates update process.
2025-01-20 22:11:35 +03:00
Ümit Tunç ed0ff822ed Refactor CurrencyController to improve method documentation and simplify rate retrieval
- Updated PHPDoc comments for methods to enhance clarity, specifically for `getAllRates`, `getCurrentRates`, `getGoldRates`, `getCurrencyRateByName`, and `getGoldRateByName`.
- Removed commented-out job dispatching code to streamline the `getAllRates` method.
- Adjusted method descriptions to be more concise and focused on their functionality.

These changes enhance the maintainability and readability of the CurrencyController, facilitating better management of financial data.
2025-01-17 23:37:54 +03:00
Ümit Tunç 3217d8693e Enhance CurrencyController with detailed method documentation and new functionalities
- Added comprehensive PHPDoc comments to all methods in the CurrencyController for better code clarity and maintainability.
- Introduced new methods: `getAllRates`, `getCurrentRates`, `getGoldRates`, `getCurrencyRateByName`, and `getGoldRateByName` to improve data retrieval from JSON files.
- Ensured all methods return appropriate JSON responses, enhancing the API's usability.

These changes improve the overall documentation and functionality of the CurrencyController, facilitating better management of financial data.
2025-01-17 23:32:56 +03:00
Ümit Tunç a26622c550 Refactor CurrencyController to enhance rate fetching and introduce new methods
- Replaced the `getCurrentRates` method with `runAllFetchs` to dispatch fetching jobs for currency and gold rates synchronously.
- Added `getAllRates`, `getGoldRates`, and `getGoldRateByName` methods to improve data retrieval from respective JSON files.
- Updated error messages for clarity and consistency.
- Streamlined JSON file handling by using variables for file paths, enhancing maintainability.

These changes improve the CurrencyController's functionality and organization, facilitating better management of financial data.
2025-01-17 23:28:29 +03:00
Ümit Tunç 7f09c56967 Enhance FetchGoldRates job to include update date and improve gold name formatting
- Added an 'Update_Date' field to store the current timestamp when fetching gold rates.
- Refactored gold name formatting to ensure consistency by converting names to uppercase and replacing specific substrings with standardized abbreviations.
- Improved maintainability by using a full name variable for gold types before abbreviation.

These changes enhance the data structure and clarity of the gold rates fetched by the application.
2025-01-17 23:28:17 +03:00
Ümit Tunç 6b5270f341 Add NumberFormatter helper class for number formatting
- Introduced a new helper class `NumberFormatter` with a method `commaToDot` to convert numbers formatted with commas to a dot notation.
- The method also trims whitespace and removes percentage signs for cleaner data handling.

This commit enhances the application's ability to process numerical data consistently, supporting future financial data operations.
2025-01-17 23:06:55 +03:00
Ümit Tunç 25327ac0cc Add RunAllFetchs command to execute currency and gold rate fetching jobs sequentially
- Introduced a new console command `RunAllFetchs` to streamline the execution of `FetchCurrencyRates`, `FetchGoldRates`, and `MergeCurrencyAndGoldRates` jobs.
- Implemented synchronous dispatching of jobs with timing results displayed in a table format for performance monitoring.
- This command enhances the application's ability to fetch and merge financial data efficiently in a single execution step.
2025-01-17 23:01:03 +03:00
Ümit Tunç 3d269c0261 Update scheduling in Console Kernel to run FetchCurrencyRates, FetchGoldRates, and MergeCurrencyAndGoldRates jobs every minute
- Changed the scheduling frequency of the FetchCurrencyRates job from hourly to every minute.
- Added FetchGoldRates and MergeCurrencyAndGoldRates jobs to the schedule, ensuring they also run every minute.
- Introduced a new method `runScheduledCommands` to encapsulate the scheduling logic for better organization and maintainability.

This commit enhances the application's ability to fetch and merge financial data in a timely manner.
2025-01-17 23:00:53 +03:00
Ümit Tunç aa03ed3706 Integrate FetchGoldRates and MergeCurrencyAndGoldRates jobs in CurrencyController
- Added the `FetchGoldRates` job to retrieve gold rates and the `MergeCurrencyAndGoldRates` job to combine currency and gold rates.
- Updated the `getCurrentRates` method to read from a new JSON file `merged/rates.json` instead of the previous `currency/today.json`.
- Commented out the synchronous dispatch of the fetching jobs for future implementation.

This commit enhances the CurrencyController's functionality by preparing it for integrated financial data management.
2025-01-17 22:59:11 +03:00
Ümit Tunç 11106995d4 Add MergeCurrencyAndGoldRates job to combine currency and gold rates
- Introduced a new job class `MergeCurrencyAndGoldRates` to handle the merging of currency and gold rate data.
- Implemented a method to retrieve data from JSON files stored in the application.
- Merged the fetched currency and gold data into a single array.
- Stored the combined data in a new JSON file for easy access and further processing.

This commit enhances the application's ability to manage and utilize financial data by integrating currency and gold rates into a unified format.
2025-01-17 22:58:51 +03:00
Ümit Tunç 8730465a42 Add FetchGoldRates job to retrieve and store gold rates
- Introduced a new job class `FetchGoldRates` to handle the fetching of gold rates from an external source.
- Implemented data extraction using DOM parsing to retrieve relevant gold rate information.
- Utilized `NumberFormatter` for consistent number formatting of the fetched values.
- Stored the processed gold rates in a JSON file for easy access and further processing.
- Enhanced the maintainability of the code by organizing the fetching logic and data handling.

This commit establishes a foundation for integrating gold rate data into the application.
2025-01-17 22:58:44 +03:00
Ümit Tunç 86f887a18b Refactor FetchCurrencyRates job to improve data fetching and processing
- Introduced a new helper method `fetchData` to streamline HTTP requests for currency data.
- Replaced direct HTTP calls with the new `fetchData` method for better code organization.
- Utilized `NumberFormatter` for consistent number formatting, replacing the previous `virgulToNokta` method.
- Enhanced data handling for currency rates, ensuring proper type casting and rounding for values.
- Removed commented-out code related to gold rates to clean up the implementation.

These changes enhance the maintainability and readability of the currency fetching logic.
2025-01-17 22:58:34 +03:00
Ümit Tunç de00f293c9 Add method to retrieve currency rate by name in CurrencyController
Implemented a new method `getCurrencyRateByName` in the CurrencyController to fetch the currency rate based on the provided currency name from a JSON file. The method handles cases where the file does not exist or the currency is not found, returning appropriate JSON responses for each scenario.
2025-01-17 21:45:55 +03:00
Ümit Tunç f6ef9fafdc first commit 2025-01-17 21:38:08 +03:00