Skip to content

This project is a package tracking system designed to manage and monitor the delivery process. It includes functionalities for handling delivery information, tracking statuses, and managing carrier details. The system is built using Laravel and leverages Docker for containerization, ensuring a consistent development environment.

Notifications You must be signed in to change notification settings

vlalef/projeto-rastreamento

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tracking Project

Index

  1. Introduction
  2. Prerequisites
  3. Initial Project Setup
  4. Starting the Project
  5. Viewing the Database
  6. Testing via Postman
  7. Contact

Introduction

This project is a package tracking system designed to manage and monitor the delivery process. It includes functionalities for handling delivery information, tracking statuses, and managing carrier details. The system is built using Laravel and leverages Docker for containerization, ensuring a consistent development environment.

Prerequisites

Installing Prerequisites on Linux

  1. Docker - Official Documentation:
  • Ensure that you have docker already installed on your machine. If not, follow the steps below to install it:
      sudo apt-get update
      sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
      curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
      sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
      sudo apt-get update
      sudo apt-get install -y docker-ce
      sudo usermod -aG docker ${USER}
  1. Docker Compose - Official Documentation:
  • Ensure that you have Docker Compose already installed on your machine. If not, follow the steps below to install it:
      sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
      sudo chmod +x /usr/local/bin/docker-compose
  1. Node.js and NPM - Official Documentation Node and Official Documentation NPM:
  • Ensure that you have Node.js and NPM already installed on your machine. If not, follow the steps below to install them:
    curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
    sudo apt-get install -y nodejs

Initial Project Setup

  1. Clone the repository:
    git clone https://github.com/vlalef/projeto-rastreamento.git
    cd projeto-rastreamento

Starting the Project

To start the project using Docker, follow the steps below in the root directory of the project projeto-rastreamento:

  1. Copy the .env.example file to .env inside the projeto-rastreamento subdirectory:

     cp projeto-rastreamento/.env.example projeto-rastreamento/.env
  2. Install Composer dependencies inside the container:

    docker-compose run --rm app composer install
  3. Generate the Laravel application key:

    docker-compose run --rm app php artisan key:generate
  4. Build and start the containers:

    docker-compose up --build -d
  5. Run the migrations to create the tables:

    docker-compose exec app php artisan migrate:fresh
  6. Seed the database:

    docker-compose exec app php artisan db:seed

Viewing the Database

To view the database, we recommend using pgAdmin. Follow the steps below to install and configure pgAdmin on Linux:

  • First, get the IP address of the container which is running the database to configure pgAdmin:
  docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' CONTAINER_ID (laravel_db)
  1. Install pgAdmin:
      curl https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo apt-key add
      sudo sh -c 'echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'
      sudo apt install pgadmin4
      sudo /usr/pgadmin4/bin/setup-web.sh
  2. Configure pgAdmin:
    • Open pgAdmin and register a new server.
    • In the General tab, fill in the Name field with LaravelDB.
    • In the Connection tab, fill in the fields:
      • Host name/address: The IP address of the container running the database.
      • Port: 5432
      • Maintenance database: laravel
      • Username: laravel
      • Password: laravel

Testing via Postman

To test the API endpoints, you can use Postman. Follow the steps below:

  1. Install Postman - Official Documentation:
    • Download and install Postman from the official website or install it via snapstore:
    sudo snap install postman
  2. Make a request:
    • Open Postman
    • Create a new GET request
    • Set the URL to http://localhost:8000/api/entregas/{cpf}, replacing {cpf} with the actual CPF.
    • Click on the Send button to make the request.

Contact

LinkedIn

About

This project is a package tracking system designed to manage and monitor the delivery process. It includes functionalities for handling delivery information, tracking statuses, and managing carrier details. The system is built using Laravel and leverages Docker for containerization, ensuring a consistent development environment.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages