Git Product home page Git Product logo

twilio-nextjs's Introduction

Twilio NextJS Template for 2-step Verification

Screenshot 2023-06-07 at 11 17 46 AM Screenshot 2023-06-07 at 11 17 53 AM Screenshot 2023-06-07 at 11 18 09 AM

Overview

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.

Getting Started

To get started with the twilio-next-template:

  1. Clone the repository to your local machine

  2. Run the following commands:

    npm i
  3. 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 the env variables are located in the .env.example file in the root directory of this repository.

  4. Next, run the following command:

    npm run dev

Then open http://localhost:3000 with your browser to see the result.

Structure

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 for GET and POST 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.

Contributions

This project is open for contributions. We look forward to seeing your ideas and improvements.

License

This project is licensed under the MIT License. See the LICENSE file in the repository root for more information.

Contact

For more information, check out the creators at 9d8.dev. Made by 9d8, a development studio by Cameron Youngblood and Bridger Tower.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.