Welcome to the purchase orders CRUD application! This project is built from scratch with a focus on clean code and efficient functionality. This README will guide you through the project structure, key components, and setup instructions.
Note: This project is a proof of concept, created with the primary purpose of providing a deep dive into the code base. It aims to illustrate how components are connected to each other in a basic and simple project. Please note that this project may not be ready for production use and is intended for POC purposes.
This application serves purchase orders, allowing users to show/create/update and delete purchase orders. The project emphasizes a clean and well-organized codebase to ensure maintainability and extensibility.
MySQL: The application uses MySQL as the database and using LARAVEL ORM to storing and managing data.
- PurchaseOrder
- PurchaseOrderItem
- Category
The PurchaseOrderController
is the primary controller responsible for handling the purchase orders requests. This controller ensures that the CRUD process is streamlined and encapsulates the business logic.
File: ShortUrlController.php
I have utilized Laravel's factory feature to streamline the process of generating dummy data for testing purposes, enhancing the efficiency of our development workflow.
I have employed Laravel's Request class to validate both create and update requests, ensuring data integrity and consistency.
I have utilized Laravel resources to define the structure of the response body that the API consumer will receive.
The application includes tests to maintain code quality and ensure the reliability of the URL shortening functionality.
Unit tests focus on individual components of services to validate their behavior in isolation. You can run unit tests using the following command:
php artisan test
To set up the application on your local environment, follow these instructions:
git clone https://github.com/abanoubsamaan/tc-back.git
cd tc-back
composer install
cp .env.example .env
php artisan key:generate
php artisan key:generate
php artisan migrate
php artisan db:seed
php artisan serve
Visit http://localhost:8000
in your browser to access the Laravel URL Shortener.