Skip to content

Latest commit

 

History

History
179 lines (122 loc) · 4.61 KB

README(EN).md

File metadata and controls

179 lines (122 loc) · 4.61 KB

CRUD APP 2 🗂️

PostgresSQL PHP Laravel Vue

PT-BREN


Summary

Second repository of the project Only Crud , where I develop the same project with different stacks to evaluate and compare the performance of each, as well as the positives and negatives of their use.

The entire process was documented live, and the result will be posted later on my social media! Connect with me on LinkedIn to find out the final result!

📚 Stack

CRUD 2:

  • PostgresSQL
  • PHP
  • Laravel
  • Blade
  • Vue.js

📌 Project Requirements

How the 'only crud' project works

"Using the defined stack, create a CRUD for products respecting the following rules"

Each product must have:

  • Identification code
  • Name
  • Price

In the application, the user should be able to:

  • Register a new product
  • Edit an existing product
  • Delete an existing product
  • View all registered products in a table or list

Not allowed:

  • Repeating technologies used in the previous stack (except HTML, CSS, and JS)
  • Using any kind of code generated by AI and similar technologies

Allowed:

  • Referencing the documentation of the technology you are using
  • Consulting forums, as long as you do not directly copy code without understanding what it does

The entire development process must be documented:

  • The entire development process must be recorded live
  • The application must be developed live

🚀 Project Setup

⚠️ Prerequisites

To run the application, make sure you have installed:

  • PHP 8.2.12
  • Composer 2.6.6
  • Npm 10.2.3

Server

Clone this repository and navigate to the '/server' folder:

    git clone https://github.com/only-crud-organization/crud-2.git
  cd server

After cloning the repository, install the dependencies using Composer:

  composer install

Before starting the project, make sure to set up your environment: Copy the .env.example file to .env and adjust the settings, including the database credentials (in my case, I configured it for PostgreSQL, but you can use any database you prefer).

    DB_CONNECTION=YOUR_DB
    DB_HOST=YOUR_HOST
    DB_PORT=YOUR_PORT
    DB_DATABASE=YOUR_DB
    DB_USERNAME=YOUR_USERNAME
    DB_PASSWORD=YOUR_DB_PASSWORD

Then, run the migrations to create the tables in the database, using:

    php artisan migrate

Next, to test the backend of the application or start the server, use:

    php artisan serve

Client

Navigate to the '/client' folder:

    cd client

Install the dependencies using npm or yarn:

    npm i

How to Test

Finally, after starting the server, test the application with the command:

  npm run dev