Skip to content

Dicky1234-dotcom/smile-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

SMILE Backend

Backend API for SMILE testnet automation bot.

Features

  • ✅ Testnet discovery & scoring
  • ✅ Eligibility checking
  • ✅ Custom task parsing
  • ✅ CORS enabled
  • ✅ Free hosting on Vercel

Deploy to Vercel

From Phone:

  1. Upload to GitHub

    • Create new repo: smile-backend
    • Upload these files
  2. Deploy on Vercel

    • Go to vercel.com
    • New Project → Import smile-backend
    • Click Deploy
    • Done!
  3. Copy Your URL

    • You'll get: https://smile-backend-xyz.vercel.app
    • Use this in your frontend settings

From Desktop:

# Install Vercel CLI
npm i -g vercel

# Deploy
cd backend
vercel --prod

API Endpoints

GET /

Health check

{
  "status": "online",
  "name": "SMILE Backend",
  "version": "2.0.0"
}

GET /api/testnets

Get all active FREE testnets

[
  {
    "id": "scroll-sepolia",
    "name": "Scroll Sepolia",
    "score": 95,
    "tasks": [...]
  }
]

GET /api/testnets/new?completed[]=id1&completed[]=id2

Get only new testnets (excluding completed)

POST /api/check-eligibility

Check wallet eligibility

{
  "addresses": ["0x123...", "0x456..."]
}

Response:

[
  {
    "address": "0x123...",
    "eligible": true,
    "amount": "1250.50",
    "testnet": "scroll-sepolia"
  }
]

POST /api/parse-task

Parse custom task text

{
  "text": "Claim scroll faucet, swap 0.1 ETH to USDC"
}

Response:

{
  "testnet": "Scroll Sepolia",
  "network": "scroll",
  "steps": [
    {
      "action": "claim_faucet",
      "canAutomate": true
    },
    {
      "action": "swap_tokens",
      "amountMin": 0.09,
      "amountMax": 0.11,
      "canAutomate": true
    }
  ]
}

Environment Variables

None required! Works out of the box.

Local Development

npm install
npm start

Server runs on http://localhost:3000

Cost

$0/month on Vercel free tier

  • 100GB bandwidth
  • 100K requests/day
  • Serverless functions

Dependencies

  • express: Web server
  • cors: Cross-origin requests

Total size: ~1MB

Notes

  • Testnets are currently mocked
  • In production, add real scrapers for:
    • CryptoRank
    • Layer3
    • Galxe
    • Twitter (via Nitter)
  • Add cron jobs for automatic updates
  • Add database for user data (optional)

Support

Issues? Check:

  1. Vercel deployment logs
  2. Browser console errors
  3. CORS is enabled ✓
  4. Endpoints return JSON ✓

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors