Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Help Me Name My New Puppy 🐾

A tiny, playful naming-contest web app. Vote for your favorite name and watch the leaderboard update in real time.

Uses Twilio Verify to send a one-time code to each voter's phone, so a phone number can only vote once.

Run it on Replit

Run on Replit

How it works

  1. A voter clicks "Vote" on a name and enters their phone number.
  2. The server calls verifyService.verifications.create() to send a one-time code via SMS.
  3. The voter enters the code, and the server calls verifyService.verificationChecks.create() to confirm it.
  4. If the code is valid, the vote is recorded and that phone number is marked as having voted.

The core integration lives in lib/verify.js — two small functions that wrap the Twilio Verify API.

Setup

  1. Create a Twilio account and a Verify Service in the Twilio Console.

  2. Copy .env.example to .env and fill in your credentials:

    cp .env.example .env
    TWILIO_ACCOUNT_SID=       # found on your Twilio Console dashboard
    TWILIO_API_KEY=           # create one at console.twilio.com/us1/account/keys-credentials/api-keys, starts with "SK"
    TWILIO_API_SECRET=        # shown once when you create the API key — copy it then
    TWILIO_VERIFY_SERVICE_SID=  # found on your Verify Service page, starts with "VA"
    

    On Replit, add these as Secrets instead of a .env file.

Run it locally

npm install
npm start

Then open http://localhost:3000.

Stack

  • Express server with in-memory storage (server.js)
  • Twilio Verify for phone number verification (lib/verify.js)
  • Static HTML/CSS/JS frontend (public/)
  • No database, no user accounts — just names, vote counts, and a set of verified phone numbers

About

Add phone verification to a Replit app with Twilio Verify

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages