Web Development

PHP ve Python tabanlı projelerim, web teknolojileri üzerine aldığım notlar ve kod örnekleri.

Projects

No projects yet in this category.

Notes

TradeMaster: Algorithmic Trading and Financial Data Analysis Platform

TradeMaster is a personal trading bot project that instantly processes data from financial markets (Cryptocurrency / BIST / Forex) and creates decision mechanisms based on complex technical analysis strategies. 

### Project Goal To scan hundreds of parities simultaneously, which are impossible to monitor manually, capture potential buy-sell opportunities through indicators such as RSI, MACD, and Bollinger Bands, and minimize emotional decisions. 

### Technical Architecture * **Backend:** Laravel (Data management and API service) * **Data Processing:** Python & Pandas (Financial analysis and calculations) * **Integrations:** CCXT Library / Exchange APIs * **Notification System:** Telegram Bot & Email services * **Database:** MySQL structure optimized for instant price movements. 

### Highlighted Features The system sends instant notifications thanks to Cron Jobs running in the background when situations suitable for the determined strategies occur (e.g., "Notify when RSI falls below 30"). It also measures the success of strategies with historical (Backtest) simulations.

Related project: trademaster

Laravel Artisan Guide: Working Magic with the Keyboard

The terminal is the most loyal friend of Laravel developers. **Artisan** is Laravel's command-line interface, and it condenses dozens of tasks we would do manually into seconds.

Here are the life-saving commands you'll often need in your project, and what they do:

## 1. Basic Commands (Starter Pack)

These are used to get the project up and running and to understand the environment.

* `php artisan serve`
* Starts your project on a local server (localhost:8000).
* `php artisan list`
* Dumps a list of all the commands you can use.
* `php artisan help [command_name]`
* Shows how to use a command and which parameters it accepts.
* `php artisan tinker`
* **My favorite!** Opens a "playground" where you can run database queries and play with models without writing code.

---

## 2. "Make" Family (Generators)

Instead of right-clicking and saying "New File" to create files, use these. Template codes come automatically.

* `php artisan make:model Urun -m`
* Creates a Model named `Urun`. The `-m` suffix means "Prepare its migration file as well".
* `php artisan make:controller UrunController --resource`
* Creates a full Controller with ready-made methods like index, create, store.
* `php artisan make:request UrunKayitRequest`
* Creates a special request file to separate form validation processes from the controller.
* `php artisan make:seeder UrunSeeder`
* Creates a file to add fake or test data to the database.

---

## 3. Database Operations (Migrations)

Managing database tables has never been easier.

* `php artisan migrate`
* Runs pending migration files and creates tables in the database.
* `php artisan migrate:rollback`
* Reverts the last operation (Saves lives if you make a mistake).
* `php artisan migrate:fresh --seed`
* **Warning!** Deletes all tables, recreates them, and seeds them with test data. Ideal for starting from scratch during development.

---

## 4. Cleaning and Performance (Cache)

Sometimes the changes you make (especially .env or route changes) are not immediately reflected. Here's the solution:

* `php artisan optimize:clear`
* **One Shot:** Clears everything, including routes, views, config, and cache.
* `php artisan route:list`
* Lists all URLs in your project and which Controller they go to.
* `php artisan config:cache`
* Caches the configuration files for performance when taking the project live (production).

---

### A Little Tip

If you're too lazy to type the commands, you can define abbreviations (aliases) in your terminal. For example, writing just `pa` instead of `php artisan`.

*May your code be clean and your bugs few!*

Related project: laravel-personel-website