Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved README #50

Open
Rickythegreat1 opened this issue Oct 22, 2023 · 0 comments
Open

Improved README #50

Rickythegreat1 opened this issue Oct 22, 2023 · 0 comments

Comments

@Rickythegreat1
Copy link

Prerequisites

Before you start, make sure you have these programs installed on your computer:

  • Git: For cloning the project repository.
  • Composer: For managing PHP dependencies.
  • Node.js and npm: For managing JavaScript packages.
  • PHP (version 7.3 or higher): The programming language used.
  • MySQL or any other SQL database system: For storing data.

👉 Note: If you don't have these installed, you won't be able to set up the project. Search online for installation guides for each program based on your operating system.

Local Installation Steps

Step 1: Install and Configure SQL Server

  1. What to Do: Install an SQL server like MySQL.
  2. How to Do It:
    • Go to the MySQL download page.
    • Download the installer suitable for your operating system.
    • Run the installer and follow the on-screen instructions.
  3. After Installation: Open your SQL management tool (like MySQL Workbench) and create a new database. Name it anything you like, for example, triangle_pos.
  4. What Could Go Wrong:
    • Installation fails: Make sure you're downloading the correct version for your operating system.
    • Can't create a database: Ensure the SQL server is running and you're using the correct credentials.

Step 2: Clone the Repository

  1. What to Do: Download the project onto your computer.
  2. How to Do It:
    • Open your terminal (Command Prompt, PowerShell, Terminal, etc.).
    • Navigate to the folder where you want the project to be. Use cd your_folder_name to navigate.
    • Run the following command:
    git clone https://github.com/FahimAnzamDip/triangle-pos.git
  3. What Could Go Wrong:
    • If it says git is not recognized, it means Git is not installed. Install it first.
    • Make sure you're in the folder where you want the project to be. Use ls or dir to check the current folder's contents.

Step 3: Navigate to Project Directory

  1. What to Do: Move into the project's folder in the terminal.
  2. How to Do It:
    • Your terminal should still be open.
    • Run this command:
    cd triangle-pos
  3. What Could Go Wrong:
    • If it says No such file or directory, make sure you cloned the project in the previous step.

Step 4: Install Composer Dependencies

  1. What to Do: Get the PHP packages that the project needs.
  2. How to Do It:
    • In the terminal, make sure you're in the triangle-pos folder.
    • Run this command:
    composer install
  3. What Could Go Wrong:
    • If it says composer is not recognized, Composer is not installed. Install it first.
    • If you get other errors, make sure your internet connection is stable.

Step 5: Install NPM Packages

  1. What to Do: Get the JavaScript packages and prepare the front-end assets.
  2. How to Do It:
    • In the terminal, still in the triangle-pos folder, run:
    npm install
    npm run dev
  3. What Could Go Wrong:
    • If it says npm is not recognized, Node.js and npm are not installed. Install them first.
    • If you get other errors, make sure your internet connection is stable.

Step 6: Setup Environment File

  1. What to Do: Create a configuration file for the project.
  2. How to Do It:
    • In the terminal, still in the triangle-pos folder, run:
    cp .env.example .env
    php artisan key:generate
  3. What Could Go Wrong:
    • If you get an error like No such file or directory, make sure the .env.example file exists in the triangle-pos folder.

Step 7: Configure Database in .env

  1. What to Do: Tell the project how to connect to your database.
  2. How to Do It:
    • Open the .env file using a text editor like Notepad or VSCode.
    • Find these lines and fill in your database details:
    DB_CONNECTION=mysql
    DB_HOST=127.0.0.1
    DB_PORT=3306
    DB_DATABASE=your_database_name
    DB_USERNAME=your_database_user
    DB_PASSWORD=your_database_password
  3. What Could Go Wrong:
    • If you put in the wrong details, the project won't be able to connect to the database. Double-check your database name, username, and password.

Step 8: Run Migrations and Seeds

  1. What to Do: Create tables in your database and fill them with starter data.
  2. How to Do It:
    • In the terminal, still in the triangle-pos folder, run:
    php artisan migrate --seed
  3. What Could Go Wrong:
    • If you get an error, make sure your database details in .env are correct and your SQL server is running.

Step 9: Create Symbolic Link for Storage

  1. What to Do: Make sure the project can save files like images.
  2. How to Do It:
    • In the terminal, still in the triangle-pos folder, run:
    php artisan storage:link
  3. What Could Go Wrong:
    • If you get an error, make sure the storage/app/public folder exists in the triangle-pos folder.

Step 10: Start Development Server

  1. What to Do: Make the project accessible through a web browser.
  2. How to Do It:
    • In the terminal, still in the triangle-pos folder, run:
    php artisan serve
  3. What Could Go Wrong:
    • If you get an error like Port 8000 already in use, another program is using that port. You can specify a different port by running php artisan serve --port=8080.

Step 11: Access the Application

  1. What to Do: Open the project in your web browser to make sure it works.
  2. How to Do It:
    • Open your web browser.
    • In the address bar, type http://localhost:8000 or http://127.0.0.1:8000 and press Enter.
  3. What Could Go Wrong:
    • If the page doesn't load, make sure the development server is running (Step 10) and you're using the correct address.

Admin Credentials

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant