β οΈ ALPHA SOFTWARE - This project is in active development and is considered experimental. Use at your own risk. APIs may change without notice.
Clutch-Node is a blockchain-based ridesharing platform that aims to improve urban mobility by leveraging blockchain technology to create a decentralized, efficient, and secure system for ridesharing.
Created and maintained by Mehran Mazhar
- Decentralized System: Eliminates intermediaries, allowing users to connect directly.
- Secure Transactions: Utilizes blockchain technology to ensure the security and privacy of all transactions.
- User Empowerment: Provides users with more control over their ridesharing experiences.
- Eco-friendly Options: Encourages the use of electric and hybrid vehicles to reduce carbon footprint.
- Docker
- Docker Compose
- Rust 1.70+ (for local development)
This project automatically builds and publishes Docker images to Docker Hub at 9194010019/clutch-node when code is pushed to the main branch.
Our Docker images feature several optimizations for production use:
- π¦ Minimal Size: Debian Slim base (~50MB) with stripped binaries
- π Security: Non-root user execution with minimal dependencies
- β‘ Performance: Optimized binary with clang compiler
- π‘οΈ Health Checks: Built-in container health monitoring
- π± Multi-Arch: Supports AMD64 and ARM64 architectures
- π¨ Fast Builds: Optimized layer caching for dependencies
Our Docker images are highly optimized using Debian Slim for minimal size and maximum compatibility.
# Pull the latest image (typically ~100MB)
docker pull 9194010019/clutch-node:latest
# Run a single node
docker run --rm -p 8081:8081 9194010019/clutch-node:latest
# Run with custom config
docker run --rm -p 8081:8081 -v ${PWD}/config:/app/config 9194010019/clutch-node:latest --env node1
# Health check
docker run --rm 9194010019/clutch-node:latest --version# Build locally
.\scripts\docker-build.ps1
# Build and push to Docker Hub
.\scripts\docker-build.ps1 -Push
# Build with custom tag
.\scripts\docker-build.ps1 -Tag "dev" -Push# Run full development environment
docker-compose up -d
# View logs
docker-compose logs -f node1
# Stop all services
docker-compose downTo enable automatic Docker image publishing, add these secrets to your GitHub repository:
- Go to your repository β Settings β Secrets and variables β Actions
- Add the following secrets:
DOCKERHUB_USERNAME: Your Docker Hub usernameDOCKERHUB_TOKEN: Docker Hub access token (create at hub.docker.com/settings/security)
The GitHub Action will automatically:
- Build Docker images on push to main branch
- Push to
9194010019/clutch-node:latest - Create additional tags for branches and commits
- Update the Docker Hub repository description
To get started with Clutch-Node, follow these steps:
-
Clone the repository:
git clone https://github.com/MehranMazhar/clutch-node cd clutch-node -
Start the application:
cargo run -- --env node1
Set the LIBCLANG_PATH environment variable:
ECHO %LIBCLANG_PATH%
SET LIBCLANG_PATH=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\Llvm\x64\binContributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
Distributed under the Apache License 2.0. See LICENSE for more information.
Mehran Mazhar
- GitHub: @MehranMazhar
- Website: MehranMazhar.com
- Email: mehran.mazhar@gmail.com
If you have any questions or comments, please feel free to contact us at mehran.mazhar@gmail.com.
The project is built using Docker to ensure a consistent environment. The provided Dockerfile handles all dependencies and builds the project in release mode.
docker build -t clutch-node .To run multiple nodes, you need to specify different networks and ports:
docker network create clutch-network1
docker network create clutch-network2
docker network create clutch-network3
docker-compose up node1
docker-compose up node2
docker-compose up node3