This document provides step-by-step instructions to set up and run the project in a local development environment or inside containers.
- Docker and Docker Compose installed
- Git installed
- Clone the repository and change into the project directory
git clone <repo-url>
cd Blocker_Manufacturer_Backend- Configure environment variables
To set environment variables locally, create a .env file and add keys like:
BLOCKCHAIN_PROVIDER={YOUR_BLOCKCHAIN_PROVIDER}
BLOCKCHAIN_ACCOUNT={YOUR_BLOCKCHAIN_ACCOUNT}
BLOCKCHAIN_PRIVATE_KEY={YOUR_BLOCKCHAIN_PRIVATE_KEY}
IPFS_API_URL=/dns/ipfs/tcp/5001/httpUse the following command to build the Docker image and start the container in the background:
docker-compose up --build -dYou can configure blockchain nodes, IPFS nodes, and other services in docker-compose.yml to connect to a test network if needed.
- Test API endpoints with
curl, Postman, or similar tools. - Example endpoints:
- POST /api/manufacturer/upload: Upload and register an update file
- GET /api/manufacturer/updates: List registered updates
- Alternatively, you can access Swagger for testing at http://127.0.0.1:5002/api/docs.
- In production, store sensitive secrets (e.g., PRIVATE_KEY, master keys) in a secure secret manager (Vault, KMS, etc.).
- Restrict filesystem permissions for the
crypto/keys/folder. - Use HTTPS, configure CORS properly, and validate all inputs.
If you encounter issues, check the README and source code first, then open an issue in the repository.