Spanish
Este proyecto fue desarrollado como proyecto académico para un Master de Blockchain Engineer y también fue un proyecto final entregable para CodeCrypto de finalización de primer ciclo, en donde se establece desarrollar una dapp para (el caso elegido) poder visualizar y auditar la trazabilidad de productos,
logrando la transparencia e inmutabilidad en blockchain para el mismo.
Para lograr este cometido, se realiza a través del siguiente stack:
- React 19.2
- NestJS (Backend)
- Docker (Dockerización PostegreSQL)
- Shadcn / TailwindCSS
- Zustand
- React-Query
- axios (Peticiones HTTP)
- Foundry (para desarrollo y testing de smart contract)
Actualmente la carpeta LogisticTrazability queda preparada para funcionar como monorepo liviano:
dapp-trazability/=> frontend React/Vitelogistic-backend/=> backend NestJS- raíz => contratos Foundry, documentación y scripts compartidos
Licencia de uso:
Este proyecto se distribuye únicamente para fines académicos, de estudio, revisión y referencia técnica. No se permite su uso comercial. Ver LICENSE.md.
Para poder testear y probar esta dapp es necesario seguir los siguientes pasos:
-
Clonar Repositorio:
bash git clone <URL_GITLAB> -
Instalar dependencias del monorepo desde la raíz (recomendado con pnpm):
bash pnpm install -r -
Si prefieres instalar por paquete, todavía puedes hacerlo entrando a
dapp-trazability/ologistic-backend/. -
Si no tienes docker instalado o descargado, procede primero a ésto, y, luego, procede a realizar:
bash docker compose up -d -
Renombra en archivo .env.template a .env
-
Descargar e instalar foundry (si es que no lo tienes instalado) para poder desplegar los contratos con el script o verificar los test:
- Descargar foundry en tu PC:
bash curl -L https://foundry.paradigm.xyz | bash - Instalar foundry:
bash foundryup - Desplegar Contratos con el script:
bash forge script script/Deploy.s.sol --rpc-url http://127.0.0.1:8545 --private-key <PRIVATE_KEY> --broadcast - Una vez desplegado, te mostrará por CLI, las direcciones de los contratos desplegados, copiar esas direcciones y pegarlas en el .env
- Si deseas usarlo con Ganache u otra blockchain, deberas cambiar la url RPC para poder desplegarlo.
- Si, quieres, ejecutar los test, debes ejecutar:
bash forge test -vv
- Descargar foundry en tu PC:
-
Inicia el backend desde la raíz:
bash pnpm dev:backend -
Inicia el frontend desde la raíz:
bash pnpm dev:frontend -
Recuerda tener alguna billetera instalada en el navegador como MetaMask ó Rabitt Wallet y configurada con la red blockchain donde desplegues los smart contract.
-
Accede a http://localhost:5173 ó http://localhost:4123 (dependiendo como hayas ejecutado el frontend) para poder acceder y probar la plataforma.
English
This project was developed as an academic project for a Master in Blockchain Engineer and was also delivered as a final project for CodeCrypto at the end of the first cycle, focused on building a dapp to visualize and audit product traceability,
achieving transparency and immutability in blockchain for the same.
To achieve this task, it is done through the following stack:
*React 19.2
- NestJS (Backend)
- Docker (PostegreSQL Dockerization) *Shadcn/TailwindCSS
- Zustand
- React-Query
- axios (HTTP Requests)
- Foundry (for smart contract development and testing)
This folder is now prepared to work as a lightweight monorepo:
dapp-trazability/=> React/Vite frontendlogistic-backend/=> NestJS backend- root => Foundry contracts, docs, and shared scripts
License:
This project is distributed exclusively for academic, study, review, and technical reference purposes. Commercial use is not permitted. See LICENSE.md.
In order to test and test this dapp, it is necessary to follow the following steps:
-
Clone Repository:
bash git clone <URL_GITLAB> -
Install monorepo dependencies from the root (recommended with pnpm):
bash pnpm install -r -
If you prefer, you can still install dependencies package-by-package inside
dapp-trazability/orlogistic-backend/. -
If you do not have docker installed or downloaded, proceed to this first, and then proceed to do:
bash docker compose up -d -
Rename the file .env.template to .env
-
Download and install foundry (if you do not have it installed) to be able to deploy the contracts with the script or verify the tests:
- Download foundry on your PC:
bash curl -L https://foundry.paradigm.xyz | bash - Install foundry:
bash foundryup - Deploy Contracts with the script:
bash forge script script/Deploy.s.sol --rpc-url http://127.0.0.1:8545 --private-key <PRIVATE_KEY> --broadcast - Once deployed, it will show you through CLI, the addresses of the deployed contracts, copy those addresses and paste them in the .env
- If you want to use it with Ganache or another blockchain, you will have to change the RPC url to be able to deploy it.
- If you want to run the tests, you must run:
bash forge test -vv
- Download foundry on your PC:
-
Start the backend from the repository root:
bash pnpm dev:backend -
Start the frontend from the repository root:
bash pnpm dev:frontend -
Remember to have a wallet installed in the browser such as MetaMask or Rabitt Wallet and configured with the blockchain network where you deploy smart contracts.
-
Access http://localhost:5173 or http://localhost:4123 (depending on how you have run the frontend) to access and test the platform.