Skip to content

Priyank911/FNA-Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

πŸš€ FNA-Backend - Blockchain Handler & NFT Creator

A Node.js backend for managing blockchain interactions and NFT creation. This project enables users to mint, manage, and retrieve NFTs securely via smart contracts.

🌟 Features

βœ… NFT Creation - Generate unique NFTs with metadata storage.
βœ… Smart Contract Interaction - Connects to Ethereum blockchain using Web3.js.
βœ… Secure Environment - Uses .env for storing sensitive credentials.
βœ… JSON Metadata Handling - Stores and retrieves NFT details in MediaNFT.json.
βœ… Express.js API - Provides REST endpoints for NFT operations.


πŸ— Project Structure

πŸ“‚ node_modules/ - Dependencies managed by npm.
πŸ“„ .env - Stores private blockchain credentials.
πŸ“„ MediaNFT.json - Stores NFT metadata.
πŸ“„ index.js - Main backend logic for handling requests.
πŸ“„ package.json - Project dependencies and configurations.
πŸ“„ package-lock.json - Ensures dependency consistency.


βš™οΈ Installation & Setup

1️⃣ Clone the Repository

git clone https://github.com/Priyank911/FNA-Backend.git
cd FNA-Backend

2️⃣ Install Dependencies

npm install

3️⃣ Set Up Environment Variables

Create a .env file and add your blockchain credentials:

INFURA_API_KEY=your_infura_api_key
PRIVATE_KEY=your_wallet_private_key
CONTRACT_ADDRESS=your_deployed_smart_contract_address

4️⃣ Start the Server

node index.js

5️⃣ Access API


πŸ”— API Endpoints

Method Endpoint Description
POST /mint Mints a new NFT.
GET /nft/:id Retrieves metadata of a specific NFT.
GET /all-nfts Fetches all stored NFTs.

πŸ“¦ Deployment

πŸš€ Deploy with PM2 (Process Manager)

npm install -g pm2
pm2 start index.js --name "FNA-Backend"

☁️ Deploy on Vercel

vercel --prod

πŸš€ Future Enhancements

πŸ”Ή Multi-chain support (Polygon, Binance Smart Chain, etc.).
πŸ”Ή IPFS integration for decentralized storage.
πŸ”Ή Advanced NFT metadata enrichment.


🀝 Contributions

Contributions are welcome! Open a PR or raise an issue.


πŸ“œ License

Licensed under MIT License.


πŸ”— Stay Connected: GitHub Repository

πŸ’‘ "Empowering NFT creation with seamless blockchain integration!" πŸš€

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published