{"id":29351988,"url":"https://github.com/theastralprogrammer0/ticquette","last_synced_at":"2026-04-12T06:34:25.351Z","repository":{"id":302136121,"uuid":"1010840715","full_name":"theAstralProgrammer0/ticquette","owner":"theAstralProgrammer0","description":"This is the backend dApp for generating leasing NFTs, featuring a Hardhat smart contract and an Express.js backend API.","archived":false,"fork":false,"pushed_at":"2025-07-08T19:26:36.000Z","size":798,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-08T20:35:33.215Z","etag":null,"topics":["abi","blockchain","defi","erc-721","ethereum","ethers","express","hardhat","ipfs","metamask","mongodb","nft","openzeppelin","pinata","rate-limiting","redis","rest-api","smart-contracts","solidity","web3"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theAstralProgrammer0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-29T22:49:16.000Z","updated_at":"2025-07-07T06:00:04.000Z","dependencies_parsed_at":"2025-06-30T19:44:58.145Z","dependency_job_id":null,"html_url":"https://github.com/theAstralProgrammer0/ticquette","commit_stats":null,"previous_names":["theastralprogrammer0/ticquette"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/theAstralProgrammer0/ticquette","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theAstralProgrammer0%2Fticquette","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theAstralProgrammer0%2Fticquette/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theAstralProgrammer0%2Fticquette/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theAstralProgrammer0%2Fticquette/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theAstralProgrammer0","download_url":"https://codeload.github.com/theAstralProgrammer0/ticquette/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theAstralProgrammer0%2Fticquette/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264370965,"owners_count":23597681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["abi","blockchain","defi","erc-721","ethereum","ethers","express","hardhat","ipfs","metamask","mongodb","nft","openzeppelin","pinata","rate-limiting","redis","rest-api","smart-contracts","solidity","web3"],"created_at":"2025-07-09T00:32:31.113Z","updated_at":"2025-10-08T02:57:48.211Z","avatar_url":"https://github.com/theAstralProgrammer0.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ticquette NFT Project\n\n## Overview\nTicquette is a decentralized application (dApp) that revolutionizes kiosk\nrental through blockchain technology and NFTs. The platform enables seamless\nrental of digital kiosks, vending machines, and interactive terminals using\nNon-Fungible Tokens as proof of ownership and access rights.\nThis is the backend dApp for generating leasing NFTs, featuring a Hardhat smart\ncontract and an Express.js backend API.\n\n## 📁 Repository Structure\n\n```\nticquette/\n│\n├── smart-contract/                 # Hardhat Smart Contract\n│   ├── contracts/                  # Solidity source files\n│   │   └── TicquetteNFT.sol        # ERC-721 lease-enabled NFT contract\n│   ├── scripts/                    # Deployment scripts\n│   │   └── deploy.js               # Deploy to networks\n│   ├── test/                       # Smart contract tests\n│   │   └── TicquetteNFT.test.js    # Mocha/Chai test suite\n│   ├── artifacts/                  # Compilation artifacts (includes ABI)\n│   ├── hardhat.config.js           # Hardhat configuration\n│   ├── package.json                # NPM metadata \u0026 scripts\n│   └── .env                        # Network \u0026 private key settings\n│\n├── backend-api/                    # Express.js Backend API\n│   ├── src/\n│   │   ├── controllers/            # Route handlers\n│   │   │   ├── appController.js    # /status, /stats\n│   │   │   ├── userController.js   # POST /users\n│   │   │   └── nftController.js    # POST /mint, GET /nfts, GET /nft/:tokenId\n│   │   ├── routes/                 # Express routers\n│   │   │   ├── index.js            # Mounts all routes under /api\n│   │   │   ├── userRoutes.js       # /users\n│   │   │   └── nftRoutes.js        # /mint, /nfts, /nft/:tokenId\n│   │   ├── models/                 # Mongoose schemas\n│   │   │   ├── User.js\n│   │   │   └── NFT.js\n│   │   ├── utils/                  # Helper modules\n│   │   │   ├── ipfsUtils.js        # Pinata IPFS integration\n│   │   │   ├── contractUtils.js    # ethers.js contract wrapper\n│   │   │   └── validation.js       # Metadata validation\n│   │   ├── config/                 # Configuration clients\n│   │   │   ├── db.js               # MongoDB client\n│   │   │   └── redis.js            # Redis client\n│   │   └── server.js               # Express server entry\n│   ├── package.json\n│   └── .env                        # DB, Redis, Pinata, RPC settings\n│\n└── README.md                       # Project overview \u0026 instructions\n```\n\n---\n\n## 🔧 Prerequisites\n\n* **Node.js** v16+ and **npm**\n* **MongoDB** locally or remote\n* **Redis** locally or remote\n* **Hardhat** (`npm install --global hardhat`)\n* **Pinata** account for IPFS pinning\n\n## 🏗️ Smart Contract Setup \u0026 Deployment\n\n1. **Install dependencies**\n\n   ```bash\n   cd smart-contract\n   npm install\n   ```\n\n2. **Configure `.env`**\n\n   ```env\n   SEPOLIA_URL=https://eth-sepolia.alchemyapi.io/v2/your-key\n   PRIVATE_KEY=0x...\n   CONTRACT_ADDRESS=\n   ETHERSCAN_API_KEY=...\n   ```\n\n3. **Compile \u0026 Deploy**\n\n   ```bash\n   npx hardhat compile\n   npx hardhat run scripts/deploy.js --network sepolia\n   ```\n\n4. **ABI Extraction**  (optional)\n\n   ```bash\n   npm run extract-abi\n   ```\n\n---\n\n## 🚀 Backend API Setup \u0026 Running\n\n1. **Install dependencies**\n\n   ```bash\n   cd backend-api\n   npm install\n   ```\n\n2. **Configure `.env`**\n\n   ```env\n   PORT=5000\n   DB_HOST=localhost\n   DB_PORT=27017\n   DB_DATABASE=ticquette_nft\n   REDIS_URL=redis://localhost:6379\n   SEPOLIA_URL=https://eth-sepolia.alchemyapi.io/v2/your-key\n   PRIVATE_KEY=0x...\n   CONTRACT_ADDRESS=0x...\n   PINATA_API_KEY=\n   PINATA_SECRET_API_KEY=\n   FRONTEND_URL=http://localhost:3000\n   ```\n\n3. **Start services**\n\n   * MongoDB: `mongod`\n   * Redis: `redis-server`\n\n4. **Run server**\n\n   ```bash\n   npm run dev\n   ```\n\n---\n\n## 🔍 Exploring API Endpoints\n\nAll endpoints are prefixed with `/api`:\n\n| Method | Endpoint            | Description                            |\n| ------ | ------------------- | -------------------------------------- |\n| GET    | `/api/status`       | Health check (Redis \u0026 MongoDB)         |\n| GET    | `/api/stats`        | Collection counts (users, NFTs)        |\n| POST   | `/api/users`        | Create or fetch user by wallet address |\n| POST   | `/api/mint`         | Mint a new Ticquette NFT               |\n| GET    | `/api/nfts`         | List all minted NFTs                   |\n| GET    | `/api/nft/:tokenId` | Fetch a specific NFT by its token ID   |\n\n### Example: Create User\n\n```bash\ncurl -X POST http://localhost:5000/api/users \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ \"walletAddress\": \"0xAbC...123\" }'\n```\n\n### Example: Mint NFT\n\n```bash\ncurl -X POST http://localhost:5000/api/mint \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"walletAddress\": \"0xAbC...123\",\n    \"useOfSpace\": \"Office\",\n    \"description\": \"Monthly Lease\",\n    \"dimensionOfSpace\": \"10x20x8\",\n    \"lga\": \"Central\",\n    \"state\": \"Lagos\",\n    \"country\": \"NG\",\n    \"durationOfLease\": 31536000\n  }'\n```\n\n### Example: Fetch NFT by Token ID\n\n```bash\ncurl http://localhost:5000/api/nft/0\n```\n\n---\n\n## 📚 Testing \u0026 Development\n\n* **Smart Contract Tests**: `cd smart-contract \u0026\u0026 npm test`\n* **Backend Tests**: `cd backend-api \u0026\u0026 npm test`\n\n---\n\n## 🌐 License\n\nMIT © Ticquette Team\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheastralprogrammer0%2Fticquette","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheastralprogrammer0%2Fticquette","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheastralprogrammer0%2Fticquette/lists"}