Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/idea: add a secret script to challenge users in the terminal #25

Open
glaucia86 opened this issue Feb 19, 2025 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@glaucia86
Copy link
Member

🎯 Goal:

Create a Node.js script that prompts users to enter a secret code to unlock a hidden message.

🛠 Steps to Implement:

  1. In lessons/01-intro-to-genai/characters/, create a new file called secret-scroll.js.

  2. Add the following script:

  console.log("\n🔍 You have discovered the Lost Scroll of Alexandria! 🏺");
  console.log("To complete your journey, enter the secret code:");

  process.stdin.once("data", (data) => {
      const input = data.toString().trim();
      if (input === "ALEXANDRIA-300BC") {
          console.log("\n✨ The Scroll reveals a hidden message:");
          console.log("🚀 'JavaScript + AI = The Future!'");
          console.log("🔗 Check out this secret resource: https://aka.ms/AI-JS-Hidden-Guide\n");
      } else {
          console.log("\n❌ Incorrect code! Try again.");
      }
      process.exit();
  });
  1. The link https://aka.ms/AI-JS-Hidden-Guide must be created beforehand.

    • This guide should contain special JavaScript + AI tips, tricks, and resources.

    • Possible contents:

      Exclusive AI prompts for JavaScript developers
      Best practices for integrating LLMs in JavaScript applications
      Links to official OpenAI/Azure AI documentation
      Sample AI-powered projects in JavaScript

  2. Add the following command to package.json:

    "scripts": {
      "start": "node characters/app.js",
      "decipher-scroll": "node characters/secret-scroll.js"
    }
  3. Test by running:

    npm run decipher-scroll
  4. Ensure that entering "ALEXANDRIA-300BC" displays the secret message and directs the user to the guide.


Expected Outcome: users who discover the hidden command and enter the correct secret code unlock a special resource page filled with AI & JavaScript learning materials.

@glaucia86 glaucia86 added the enhancement New feature or request label Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant