NOTE: This is a very complex project with many parts. You may need to prompt Buildy to continue or to complete the work. Sometimes it will appear to finish, but look carefully for it saying something like "Would you like me to continue fixing the build errors and completing the functionality in a new request?". If it does, be sure to reply back "please continue and complete the project". You may also need to help the AI debug the project once it's completed. Follow the training and you'll have your app up and running in no time! [STEP 1] Please create a simple [NICHE MARKET] quiz called [NAME OF YOUR QUIZ]. Please confirm you can do this and I'll send you the specifications. Don't prompt me to connect or integrate anything. Just respond that you understand and ask me for the specifications. [STEP 2] THESE ARE STEPS, DO NOT TYPE THIS INTO THE CHAT. FOLLOW THESE INSTRUCTIONS: Turn on developer mode under "Manage". Activate Backend Functions Click "Add your first variable" Then take your access key from your profitplatform.com crm and name it "access_key" enter your key and save it. [STEP 3] Include an attractive and persuasive Landing page the convinces people they should take the quiz so they can understand exactly how to get [SOLUTION] for [NICHE AUDIENCE]. The quiz should start by asking them their name. It should collect first name as mandatory and last name as optional. The user should answer the quiz questions, but the before they get the answers they are presented with a form to fill in their email address to get the results. It's mandatory to provide their email address before seeing the final results. Here are my quiz questions: [PASTE YOUR QUESTIONS HERE] When the user submits their email at the final step, be sure to immediately display a popup with animation showing we're reviewing their answers and building their recommendations. Then redirect and display the results. The report on the final page should present a uniquely written guide create by making an API call to use AI to submit all the questions and come up with helpful advice for the person who took the survey. Core Features: When the user submits all their information the app will subscribe them to an external email marketing tool using an API. The data will be sent to an external api to subscribe them to a mailing list. You will use a back end function to call an api to subscribe the submitted information to an external endpoint. There's a secret key called "access_key" that you'll use for the secure key. The endpoint to subscribe a user as a lead is: https://www.profitplatform.com/wp-json/pp-site-manager/v1/crm-subscribe/?name=&email=&access_key=&tags=assessment%20lead Use POST for calling this api. The variables are: name: (use the person's full name URL encoded like Firstname%20Lastname) email: (this is the email address of the user submitting the quiz) access_key: (this is the key for this api endpoint. it's stored in supabase in the secret key named "access_key") tags: (this is a static value. do not edit this) Please create any needed backend functions to make this work properly. OPTIONAL NOTES FOR BONUS TRAINING. DO NOT USE THIS UNLESS YOU'VE SEEN THE BONUS TRAINING ON MAKING MONEY FROM YOUR SURVEYS. I want to recommend [SHORT NAME AND DESCRIPTION OF EACH OPTION YOU WANT TO RECOMMEND AT THE END OF THE ASSESSMENT] depending on what they answer in the quiz. If they [DESCRIBE ANSWERS FOR YOUR FIRST FINAL RECOMMENDATION OPTION] - recommend [YOUR FIRST OPTION] If they [DESCRIBE ANSWERS FOR YOUR SECOND FINAL RECOMMENDATION OPTION] - recommend [YOUR SECOND OPTION] Otherwise, recommend [YOUR FINAL OPTION]. Add additional questions that you think can help make the quiz more complete. [THIS SECTION IS OPTIONAL IF YOU WANT TO HAVE ANY ADDITIONAL RECOMMENDATIONS] I also want to recommend [NAME OF YOUR ADDITIONAL RECOMMENDATION] if they answer yes to "[YOUR QUESTION THAT TRIGGERS THIS ADDITIONAL RECOMMENDATION]" Then at the end provide them with a report that includes extensive & detailed information about the best options that apply to them and recommendations along with a link to where they can learn about them. Wherever possible in the report include the following links when they are relevant: [TITLE OF OFFER 1] [DESCRIPTION OF OFFER 1] [LINK FOR OFFER 1] [TITLE OF OFFER 2] [DESCRIPTION OF OFFER 2] [LINK FOR OFFER 2] [TITLE OF OFFER 3] [DESCRIPTION OF OFFER 3] [LINK FOR OFFER 3] [ADD AS MANY LINKS AS YOU NEED (I recommend 3-5)] Be sure to prominently promote these relevant links at the top and bottom of the final report at the end with strong calls to action to click the links. Upon submitting their email address, send via email a link that the user can return back to this full report and read it again later. The email should contain their contact information and their answers. It should also include a prominent link at the top and bottom to return and view their report. The email should encourage them to click and review their report to access the resources from the report. Use compelling language and a simple design to persuade them to view the report. Style the email with: clean typography, proper spacing, a single prominent call-to-action button, and professional colors (greens/blues). Keep styling simple for email client compatibility. Do not use words or phrases likely to trigger email spam filters. Send it to the user at the email address they specified, also send the email to [ENTER YOUR EMAIL ADDRESS HERE]. Please send the email via smtp using the following credentials: When adding the links within the final report use internal redirects instead of direct affiliate links. I need redirect and click tracking feature to include: Be sure to prominently promote these relevant links at the top and bottom of the final report at the end with strong calls to action to click the links. Email a link that the user can return back to this report and read it later. Send it to the user at the email address they specified and also send an email to [ENTER YOUR EMAIL ADDRESS HERE]. Please send the email via smtp using the following credentials: Create the email sending system using: - Supabase Edge Function with denomailer library for SMTP - Server: [YOUR EMAIL SERVER URL], Port 465, TLS enabled - Username: [ENTER YOUR EMAIL] - Password from Supabase secret 'SMTP_PASSWORD' - Frontend form with recipient, subject, and message fields - Use proper error handling and logging. Note that the smtp login is the same as the sending from email address. Please use supabase edge functions to send the email. I've already created the supabase secret key to store the password securely. This key is named "SMTP_PASSWORD" When adding the links to the final report use internal redirects instead of direct affiliate links. I need redirect and click tracking feature to include: Core Features: Affiliate Link Management System Create a centralized configuration file that maps unique IDs to affiliate links Each link should have: id, title, description, URL, and category Use descriptive IDs like 'keto-breads', 'soup-diet', etc. [CUSTOMIZE THE ABOVE EXAMPLE IDS FOR YOUR OFFER TYPES] Redirect Page with Click Tracking Create a /redirect/:linkId route that handles affiliate redirects When users visit /redirect/keto-breads?email=user@email.com, it should: Log the click to a database table with timestamp, link_id, and user_email Immediately redirect to the actual affiliate URL Show a brief loading screen during redirect Database Click Tracking Create a Supabase table called affiliate_clicks with columns: id (UUID, primary key) link_id (text, required) user_email (text, optional) clicked_at (timestamp, default now()) Set up RLS policies to allow anyone to insert clicks and view data Email Integration When generating emails with affiliate links, use redirect URLs instead of direct affiliate links Format: https://yourdomain.com/redirect/link-id?email=user@email.com This makes emails look legitimate and reduces spam filtering Technical Requirements: Use React Router for the redirect route Store affiliate link configuration in a TypeScript file with proper interfaces Use Supabase for click tracking database Implement proper error handling (invalid link IDs should redirect to home) Include a loading spinner during redirect process Benefits of This Approach: Emails appear more professional (your domain vs random affiliate domains) Significantly reduces spam filtering issues Provides click tracking analytics Gives control over the redirect experience Builds user trust with professional appearance Please implement this system so that any content with these offer links use clean redirect URLs like /redirect/product-name instead of exposing long affiliate links directly.