A full-stack NFT auction platform built with NestJS backend, React frontend, and Ethereum smart contracts.
- View Auctions: Browse ongoing NFT auctions
- View NFTs: Display available NFTs for auction (Not available in the Frontend)
- Admin Controls: Manage auction prices and whitelist addresses
- Backend: NestJS API with PostgreSQL database
- Frontend: React web application
- Blockchain: Ethereum smart contracts integration
- Node.js (v18+)
- Docker & Docker Compose
- Git
git clone <repository-url>
cd yordan-upskill-api
cd contracts-api-backend
docker-compose up -d
# Install dependencies
npm install
# Create environment file
cp .env.example .env
# Edit .env with your database and blockchain configuration
# Run migrations
npm run migration:run
# Start backend
npm run start:dev
Backend runs on http://localhost:3000
cd ../contracts-api-frontend
# Install dependencies
npm install
# Start frontend
npm start
Frontend runs on http://localhost:3000
(React default)
GET /contract/nfts
Get all available NFTs for auction.
GET /contract/auctions
Get all ongoing auctions.
Update Price
PATCH /contract/admin/sales/price
Content-Type: application/json
{
"callerAddress": "0x...",
"newPrice": "0.1"
}
Add to Whitelist
PATCH /contract/admin/sales/whitelist
Content-Type: application/json
{
"callerAddress": "0x...",
"address": "0x..."
}
Remove from Whitelist
DELETE /contract/admin/sales/whitelist
Content-Type: application/json
{
"callerAddress": "0x...",
"address": "0x..."
}
Create .env
file in contracts-api-backend/
:
# Database Configuration
DB_HOST=localhost
DB_PORT=5432
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_DATABASE=auction_platform
# Blockchain Configuration
WS_URL=wss://your-websocket-endpoint
PRIVATE_KEY=your_private_key
# Smart Contract Addresses
AUCTION_FACTORY=0x...
NFT_CONTRACT=0x...
# API Configuration
PORT=3000
Create .env
file in contracts-api-frontend/
:
# API Configuration
REACT_APP_API_BASE_URL=http://localhost:3000
# Generate new migration
npm run migration:generate
# Run migrations
npm run migration:run
# Revert last migration
npm run migration:revert
MIT License