Skip to content

Latest commit

 

History

History
120 lines (82 loc) · 3.14 KB

README.md

File metadata and controls

120 lines (82 loc) · 3.14 KB

NFT-Bidding-Platform

Import Packages

# For interacting with Google Cloud Storage services
go get cloud.google.com/go/storage@v1.40.0

# A robust library for sending emails
go get github.com/go-mail/mail@v2.3.1

# For validating structs and fields against certain criteria
go get github.com/go-playground/validator/v10@v10.19.0

# Provides methods for creating and validating JSON Web Tokens (JWT)
go get github.com/golang-jwt/jwt/v5@v5.2.1

# Used for generating, parsing, and inspecting UUIDs
go get github.com/google/uuid@v1.6.0

# Loads environment variables from a `.env` file
go get github.com/joho/godotenv@v1.5.1

# A PDF document generator
go get github.com/jung-kurt/gofpdf@v1.16.2

# A high performance, extensible, minimalist Go web framework
go get github.com/labstack/echo/v4@v4.11.4

# The official Go SDK for interacting with Razorpay payment gateway
go get github.com/razorpay/razorpay-go@v1.3.2

# A cron library for scheduling jobs to run at fixed times or intervals
go get github.com/robfig/cron/v3@v3.0.1

# The official MongoDB driver for the Go language
go get go.mongodb.org/mongo-driver@v1.14.0

# Provides additional cryptography packages
go get golang.org/x/crypto@v0.21.0

# The Go implementation of gRPC, a high performance, open-source universal RPC framework
go get google.golang.org/grpc@v1.62.1

Start App in Terminal

go run main.go ./env/dev/.env.auth
go run main.go ./env/dev/.env.nft
go run main.go ./env/dev/.env.user

Generate a Proto File Command

Auth

protoc --go_out=. --go_opt=paths=source_relative \
    --go-grpc_out=. --go-grpc_opt=paths=source_relative \
    modules/auth/authPb/authPb.proto

NFT

protoc --go_out=. --go_opt=paths=source_relative \
    --go-grpc_out=. --go-grpc_opt=paths=source_relative \
    modules/nft/nftPb/nftPb.proto

User

protoc --go_out=. --go_opt=paths=source_relative \
    --go-grpc_out=. --go-grpc_opt=paths=source_relative \
    modules/user/userPb/userPb.proto

Google Cloud Setup for Image Uploading

Prerequisites

  • Google Cloud Platform account
  • Python 3.8 to 3.12 (for GCP CLI installation)
  • Go environment

Step 1: Create a GCP Account

Ensure you have an account on Google Cloud Platform. If not, sign up at Google Cloud.

Step 2: Create a New GCP Project

  1. After logging in, navigate to your GCP Dashboard.
  2. Click New Project and follow the prompts to create your project.

Step 3: Create a Storage Bucket

  1. Go to the Cloud Storage section in your GCP Console.
  2. Click Create bucket and follow the steps:
    • Name your bucket: Follow GCP naming conventions.
    • Choose where to store your data: Select Mumbai for the location.
    • Configure your storage class and access control: Use Fine-grained for access control.
    • Set public access prevention: Initially set to Enforced.

Step 4: Configure Bucket for Public Access

Later, you can modify the bucket settings to allow public access to specific objects as needed.

Step 5: Install GCP CLI

Check your Python version:

python3 -V