This project is a website aimed at providing assistance and resources related to artificial intelligence. It includes registration, login, and other functionalities implemented using Google Apps Script for backend operations.
- Registration: Users can register using their email, username, phone number, designation, company, and password. Duplicate emails prompt a popup notifying the user of the existing account.
- Password Constraints: Passwords must include at least 1 capital letter, 1 small letter, 1 digit, and 1 special character.
- Login: Registered users can log in using their email and password.
- OTP Verification: After registration, users receive an OTP via email for verification.
- Login Redirect: Upon successful login, users are redirected to a landing page.
- Navigation Bar: The landing page displays a navigation bar with options.
- User Welcome: Upon login, users are greeted with a welcome message and their username.
- Tutorial Video: A tutorial video is displayed on the landing page.
- Contact Us: Users can contact the support team by clicking the "Contact Us" button.
- Button Highlights: The register button gets highlighted upon clicking, and when the login button is clicked, it is highlighted while the register button returns to its normal color.
- Button 1: Directs users to the home page.
- Button 2: Redirects users to google.com.
- Email Validation: The user's provided email address is validated to ensure it's not already registered.
- Saving User Data: If the email is unique, the user's registration data including email, username, phone number, designation, company, and password is saved to a spreadsheet.
- Generating OTP: After successful registration, an OTP (One-Time Password) is generated. For demonstration purposes, the OTP is fixed as "6789".
- Sending Email with OTP: The OTP is sent to the user's provided email address for verification.
- Redirecting to OTP Page: Finally, the user is redirected to an OTP verification page.
- Form Submission: When a user submits the login form, the
doPost()function inlogin.jsis triggered. - Data Retrieval: The script retrieves the entered email and password from the form submission.
- Data Validation: It then compares the provided email and password with the data stored in a Google Sheets document.
- Matching Credentials: If the entered email and password match with any row in the spreadsheet, the user is redirected to the landing page.
- Invalid Credentials: If no match is found, an error message indicating "Invalid credentials" is returned.
The doPost() function interacts with Google Apps Script to handle form submissions and perform data validation. It utilizes the SpreadsheetApp service to access and retrieve data from a Google Sheets document.
- Clone this repository to your local machine.
- Set up a Google Apps Script project and deploy the
doPost()functions for registration and login. - Replace
'1-F2mRYeTd-0Em8fOh1IB7KqwOumsPDWjYUVhYlRn55M'with the ID of your Google Spreadsheet. - Customize the email templates and OTP generation as needed.
- Host your website on GitHub Pages and update the URLs in the Google Apps Script functions accordingly.
- Open the website.
- Register with a valid email, ensuring the password meets the specified constraints.
- Upon duplicate email entry, a popup will notify the user of the existing account.
- Verify your email using the OTP sent.
- Log in with your registered email and password.
- Explore the website features, including the tutorial video.
- Use the "Contact Us" button to reach out for support.
- Navigate between pages using the navigation bar.
- Click "Button 1" to return to the home page.
- Click "Button 2" to navigate to google.com.
- HTML
- CSS
- JavaScript
- Google Apps Script
- Google Sheets
The website is deployed using GitHub Pages. We utilized GitHub Pages to host the website directly from the GitHub repository. This deployment method allows for easy sharing and access to the website without the need for additional hosting services.
Deployed Website: AI-help.in