![Screenshot 2023-06-07 at 11 17 46 AM](https://private-user-images.githubusercontent.com/95453018/244148476-6285a1b4-6c94-4326-a286-2fe2d48b6685.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ2MDczNTgsIm5iZiI6MTcyNDYwNzA1OCwicGF0aCI6Ii85NTQ1MzAxOC8yNDQxNDg0NzYtNjI4NWExYjQtNmM5NC00MzI2LWEyODYtMmZlMmQ0OGI2Njg1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI1VDE3MzA1OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIwNDA0YjM0ODVkYzQ2NjFhNDQ5MzJmYTU1ZDhjNWZkMTVlOGM2OGNjZDZkOWE3YzBkYTJmZjk2ODBkMWIzMjEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.iQtyR9UjGvknQgTGpvwIwsmQofKnBBtGQ5UIKh4ZF_s)
![Screenshot 2023-06-07 at 11 17 53 AM](https://private-user-images.githubusercontent.com/95453018/244148492-d405d25c-865f-4b12-ab07-12cc94f0f935.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ2MDczNTgsIm5iZiI6MTcyNDYwNzA1OCwicGF0aCI6Ii85NTQ1MzAxOC8yNDQxNDg0OTItZDQwNWQyNWMtODY1Zi00YjEyLWFiMDctMTJjYzk0ZjBmOTM1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI1VDE3MzA1OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI5NGZjMmRiYTM4OGI5YmJmYTQ1ZmMxZjIzZjFjODA3MjkxMjkyMDlmMzZiYWJlZjU1NTY0YmM5YmRkYjRiMDImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.0PaCa3BqnQa6ITUoKwcVruBf326aYx6hpdk888fkNpA)
![Screenshot 2023-06-07 at 11 18 09 AM](https://private-user-images.githubusercontent.com/95453018/244148502-0a88afcc-3fab-4355-b259-6c8bccbd578d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ2MDczNTgsIm5iZiI6MTcyNDYwNzA1OCwicGF0aCI6Ii85NTQ1MzAxOC8yNDQxNDg1MDItMGE4OGFmY2MtM2ZhYi00MzU1LWIyNTktNmM4YmNjYmQ1NzhkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI1VDE3MzA1OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJlOGViZDJlZWUyYmQ5YTY0OWI5NjM2YWFhYTM3NWM0MjVhNjk4ZWFjMjBiNGU3NjIwMDU5MmVhMzgxOWQ0YjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.NJRRh0TKWKU1pu0a1dQsCjKpfyf6oXn32rLAEp5xWD4)
The twilio-next-template
is a simple and efficient way to get started with Twilio's two-step text verification using the NextJS App Router and Twilio's API. It is primarily built with JavaScript (96.3%) and CSS (3.7%). This application was created to verify phone numbers for user sign-ups to mitigate spam. This project uses DaisyUI and Sonner (for toasts) for UI elements. It is developed and maintained by 9d8, a development studio by Cameron Youngblood and Bridger Tower.
To get started with the twilio-next-template
:
-
Clone the repository to your local machine
-
Run the following commands:
npm i
-
Add a
.env
file with your own API keys from Twilio. To find Twilio API keys, navigate to the Twilio Console. You’ll be able to find your Account SID and Auth Token on the main dashboard of the console. Copy these values and paste them into your.env
file as the values for TWILIO_SID and TWILIO_AUTH_TOKEN respectively. You will also need to create a "verify service" in the Twilio console. Find the service ID of your Twilio service to paste into VERIFICATION_SID. Example names of theenv
variables are located in the.env.example
file in the root directory of this repository. -
Next, run the following command:
npm run dev
Then open http://localhost:3000
with your browser to see the result.
The twilio-next-template
application consists of the following primary directories:
app
: Contains the main application code including:api/twilio/route.js
: The API route for managing text code verification. Includes two route handlers forGET
andPOST
requests.globals.css
: Contains the global CSS styles for the application.layout.js
: Contains the layout components for the application.page.js
: Contains the main page components for the application.
public
: Contains static files used across the application, such as SVG files for visual elements.
This project is open for contributions. We look forward to seeing your ideas and improvements.
This project is licensed under the MIT License. See the LICENSE file in the repository root for more information.
For more information, check out the creators at 9d8.dev. Made by 9d8, a development studio by Cameron Youngblood and Bridger Tower.