This is a Next.js application that provides OTP (One-Time Password) generation and verification services.
- OTP Generation
- OTP Verification
- Email-based OTP delivery
Before you begin, ensure you have met the following requirements:
- Node.js (v14 or later)
- npm (v6 or later)
-
Clone the repository:
git clone https://github.com/KshitijShukla30/OTPCHECKING.git cd otp-service
-
Install the dependencies:
npm install
To run the application in development mode:
npm run dev
The application will be available at http://localhost:3000
.
To create a production build:
npm run build
To start the production server:
npm start
src/components/
: React componentssrc/pages/
: Next.js pagessrc/services/
: API servicessrc/context/
: React context for state managementsrc/app/
: Global styles
- Tailwind CSS configuration is in
tailwind.config.js
- PostCSS configuration is in
postcss.config.mjs
The application uses the following API routes:
-
/api/otp/generate
: POST request to generate an OTP- Request body:
{ email, type, organization, subject }
- Response:
{ message }
- Request body:
-
/api/otp/verify
: POST request to verify an OTP- Request body:
{ email, otp }
- Response:
{ message }
- Request body:
These routes are handled by the OTP service hosted at https://otp-service-beta.vercel.app
.