Complete Course Creator
Run ID: 69b6f9fe896970b0894648cd2026-03-29Education
PantheraHive BOS
BOS Dashboard

Generate a full course with lessons, quizzes, and flashcards

Workflow Step 1: Generate Study Plan - Output

App: aistudygenius

Step Name: generate_study_plan

Input Topic: AI Technology

Input Description: Test run

Input Execution Time: 5 min


Course Study Plan: AI Technology - A 5-Minute Primer

This study plan outlines a highly condensed, introductory course on AI Technology, designed for rapid comprehension within a 5-minute timeframe. It focuses on delivering core concepts and essential vocabulary efficiently.

1. Course Title

AI Technology: Your 5-Minute Essential Guide

2. Course Description

This ultra-concise course provides a rapid introduction to Artificial Intelligence (AI) technology. Learners will quickly grasp fundamental definitions, key subfields like Machine Learning and Deep Learning, significant real-world applications, and emerging ethical considerations. Ideal for anyone seeking a swift overview of AI's landscape.

3. Learning Objectives

Upon completing this 5-minute primer, learners will be able to:

  • Define Artificial Intelligence (AI) and its primary goals.
  • Identify the core differences between Machine Learning and Deep Learning.
  • Recognize at least three common applications of AI in daily life.
  • State one major ethical consideration related to AI development.

4. Course Structure & Content Outline

The course is divided into four very short modules, each designed to be consumed in approximately 1-2 minutes, culminating in a quick quiz and summary.

  • Module 1: What is AI? (Approx. 1 minute)

* Lesson 1.1: Defining AI: What is Artificial Intelligence? (Intelligence demonstrated by machines)

Key Concept:* Mimicking human cognitive functions.

* Lesson 1.2: A Brief History & Types: From Turing to today; narrow vs. general AI.

Key Concept:* ANI (Artificial Narrow Intelligence) is prevalent today.

  • Module 2: The Pillars of Modern AI (Approx. 2 minutes)

* Lesson 2.1: Machine Learning (ML): Learning from data without explicit programming.

Key Concepts:* Supervised, Unsupervised, Reinforcement Learning (brief overview).

* Lesson 2.2: Deep Learning (DL): Neural Networks for complex pattern recognition.

Key Concepts:* Inspired by the human brain; powers advanced AI.

  • Module 3: AI in Action & Considerations (Approx. 1 minute)

* Lesson 3.1: Real-World Applications: Examples in Computer Vision (facial recognition), Natural Language Processing (chatbots), and Robotics.

Key Concept:* AI is integrated into many daily technologies.

* Lesson 3.2: Ethical & Societal Impact: Bias, privacy, job displacement.

Key Concept:* Responsible AI development is crucial.

  • Module 4: Quick Recap & Next Steps (Approx. 1 minute)

* Lesson 4.1: Key Takeaways: Summarize the main points.

* Lesson 4.2: Further Exploration: Suggest resources for deeper learning (optional, high-level).

5. Assessment Strategy (Quizzes)

Given the 5-minute duration, the assessment will be a single, very short quiz (2-3 questions) focused on immediate recall of fundamental definitions and examples.

  • Quiz Format: Multiple-choice or True/False.
  • Focus Areas:

* Definition of AI.

* Distinction between ML and DL.

* Recognition of AI applications.

* Basic ethical awareness.

  • Example Quiz Question Type: "Which of the following is an example of AI in daily life?" or "Machine Learning involves..."

6. Flashcard Strategy

Flashcards will be used to reinforce key vocabulary and core concepts, enabling quick memorization.

  • Key Terms for Flashcards:

* Front: AI (Artificial Intelligence) | Back: Machines mimicking human intelligence.

* Front: Machine Learning (ML) | Back: AI learning from data without explicit programming.

* Front: Deep Learning (DL) | Back: Subset of ML using neural networks.

* Front: Neural Network | Back: Computational model inspired by the brain.

* Front: Computer Vision | Back: AI enabling machines to "see" and interpret images.

* Front: Natural Language Processing (NLP) | Back: AI for understanding and generating human language.

* Front: AI Ethics | Back: Concerns about bias, privacy, and societal impact.

  • Recommendation: Each flashcard should contain a term on the front and a concise, one-sentence definition or example on the back.

Step 2: aistudygenius

Workflow Step Execution: generate_flashcards

App Used: aistudygenius

Workflow: Complete Course Creator

Step: 2 of 3 - Generate Flashcards

Topic: AI Technology

Description: Test run


Flashcards for "AI Technology" Course

Here is a comprehensive set of flashcards designed to help learners memorize key terms, definitions, and concepts within the field of AI Technology. These flashcards are generated to cover foundational knowledge, core algorithms, applications, and ethical considerations, providing an effective study tool for the course.


AI Technology Flashcards

Category: Foundational Concepts

  1. Term: Artificial Intelligence (AI)

Definition: The simulation of human intelligence in machines that are programmed to think like humans and mimic their actions.

  1. Term: Machine Learning (ML)

Definition: A subset of AI that enables systems to learn from data, identify patterns, and make decisions with minimal human intervention.

  1. Term: Deep Learning (DL)

Definition: A subset of Machine Learning that uses artificial neural networks with multiple layers (deep neural networks) to learn complex patterns from data.

  1. Term: Artificial General Intelligence (AGI)

Definition: Hypothetical AI with human-level cognitive abilities across a wide range of tasks, capable of learning and applying intelligence to any intellectual task a human can.

  1. Term: Artificial Narrow Intelligence (ANI)

Definition: AI designed and trained for a particular task (e.g., Siri, self-driving cars, recommendation systems). Also known as Weak AI.

  1. Term: Data Set

Definition: A collection of related data used to train and test machine learning models.

  1. Term: Algorithm

Definition: A set of rules or instructions followed by a computer to solve a problem or perform a computation.

Category: Machine Learning Algorithms & Techniques

  1. Term: Supervised Learning

Definition: A type of ML where the model learns from labeled data, meaning both input features and desired output labels are provided.

  1. Term: Unsupervised Learning

Definition: A type of ML where the model learns from unlabeled data, identifying patterns and structures without explicit guidance.

  1. Term: Reinforcement Learning

Definition: A type of ML where an agent learns to make decisions by performing actions in an environment to maximize a cumulative reward.

  1. Term: Regression

Definition: A supervised learning task that predicts a continuous output value (e.g., house prices, temperature).

  1. Term: Classification

Definition: A supervised learning task that predicts a categorical output label (e.g., spam/not spam, disease/no disease).

  1. Term: Clustering

Definition: An unsupervised learning task that groups similar data points together into clusters.

  1. Term: Feature Engineering

Definition: The process of selecting, transforming, and creating new features from raw data to improve model performance.

  1. Term: Overfitting

Definition: A phenomenon where a model learns the training data too well, including its noise, leading to poor performance on unseen data.

  1. Term: Underfitting

Definition: A phenomenon where a model is too simple to capture the underlying patterns in the data, resulting in poor performance on both training and test data.

Category: Deep Learning & Neural Networks

  1. Term: Artificial Neural Network (ANN)

Definition: A computational model inspired by the structure and function of biological neural networks, consisting of interconnected nodes (neurons) organized in layers.

  1. Term: Neuron (Node)

Definition: The basic computational unit of a neural network, which receives inputs, applies a transformation, and produces an output.

  1. Term: Activation Function

Definition: A function applied to the output of a neuron to introduce non-linearity into the network, allowing it to learn complex patterns. (e.g., ReLU, Sigmoid, Tanh).

  1. Term: Backpropagation

Definition: An algorithm used to train neural networks by calculating the gradient of the loss function with respect to the network's weights and updating them.

  1. Term: Convolutional Neural Network (CNN)

Definition: A type of deep learning network primarily used for image processing and computer vision tasks, using convolutional layers to extract features.

  1. Term: Recurrent Neural Network (RNN)

Definition: A type of deep learning network designed to process sequential data (e.g., text, time series) by maintaining an internal state (memory).

Category: AI Subfields & Applications

  1. Term: Natural Language Processing (NLP)

Definition: A field of AI that focuses on enabling computers to understand, interpret, and generate human language.

  1. Term: Computer Vision

Definition: A field of AI that enables computers to "see," interpret, and understand visual information from the real world.

  1. Term: Robotics

Definition: The interdisciplinary field concerned with the design, construction, operation, and use of robots.

  1. Term: Autonomous Vehicles

Definition: Vehicles capable of sensing their environment and operating without human input, using AI technologies like computer vision and sensor fusion.

Category: Ethics & Explainability

  1. Term: AI Ethics

Definition: A field of study exploring the moral principles and values that should guide the design, development, and deployment of artificial intelligence.

  1. Term: Algorithmic Bias

Definition: Systematic and repeatable errors in a computer system that create unfair outcomes, such as favoring one group over others, often due to biased training data.

  1. Term: Explainable AI (XAI)

Definition: An emerging field in AI that aims to make AI models more transparent and understandable to humans, providing insights into their decision-making processes.


Recommendations for Use:

  • Regular Review: Encourage users to review these flashcards regularly, perhaps daily, to reinforce learning.
  • Active Recall: Advise users to practice active recall by trying to define the term before flipping the card, rather than just reading.
  • Spaced Repetition: Suggest using a spaced repetition system (SRS) like Anki or Quizlet, which are designed to optimize learning and retention by showing cards at increasing intervals.
  • Self-Assessment: Users can use these flashcards to quiz themselves or a partner, identifying areas where further study is needed.
  • Integration with Lessons: These flashcards should be used in conjunction with the course lessons, providing a quick reference and review tool for the material covered.

This set of flashcards provides a solid foundation for mastering the key concepts of AI Technology, complementing the course lessons and quizzes.

Step 3: aistudygenius

Workflow Execution: Complete Course Creator - Step 3 of 3: Generate Quiz

App: aistudygenius

Topic: AI Technology

Description: Test run

This output provides a comprehensive set of quizzes designed to assess understanding for a course on "AI Technology," based on the previously generated course lessons. Each quiz is structured per lesson, featuring multiple-choice questions and short-answer prompts to encourage both recall and deeper critical thinking.


Generated Quizzes for "AI Technology" Course

Below are the quizzes, organized by assumed lesson topics. Each quiz includes questions, multiple-choice options (where applicable), and the correct answers.

Quiz 1: Introduction to AI & Its History

Lesson Focus: Defining AI, its subfields, historical milestones, and the concept of strong vs. weak AI.

Instructions: Choose the best answer for multiple-choice questions and provide a concise response for short-answer questions.

  1. Multiple Choice: Which of the following is considered a subfield of Artificial Intelligence?

a) Thermodynamics

b) Machine Learning

c) Quantum Physics

d) Organic Chemistry

* Correct Answer: b) Machine Learning

  1. Multiple Choice: Who is often referred to as the "Father of AI" for his foundational work on computation and the concept of machine intelligence?

a) Albert Einstein

b) Alan Turing

c) Isaac Newton

d) Marie Curie

* Correct Answer: b) Alan Turing

  1. Short Answer: Briefly explain the difference between "Strong AI" (Artificial General Intelligence) and "Weak AI" (Artificial Narrow Intelligence).

* Suggested Answer: Strong AI refers to AI that can understand, learn, and apply intelligence to any intellectual task that a human can, possessing consciousness and self-awareness. Weak AI, conversely, is designed and trained for a specific task or narrow range of tasks, without genuine human-like intelligence or consciousness.


Quiz 2: Machine Learning Fundamentals

Lesson Focus: Core concepts of machine learning, supervised vs. unsupervised learning, common algorithms (regression, classification, clustering), and model evaluation.

Instructions: Choose the best answer for multiple-choice questions and provide a concise response for short-answer questions.

  1. Multiple Choice: In supervised learning, what does the model learn from?

a) Unlabeled data patterns

b) Data with predefined input-output pairs

c) Through trial and error with rewards

d) Human expert feedback only

* Correct Answer: b) Data with predefined input-output pairs

  1. Multiple Choice: Which of the following is an example of a classification task?

a) Predicting house prices based on features

b) Grouping customers into segments

c) Identifying whether an email is spam or not spam

d) Recommending products to users

* Correct Answer: c) Identifying whether an email is spam or not spam

  1. Short Answer: Define "overfitting" in the context of machine learning and suggest one method to mitigate it.

* Suggested Answer: Overfitting occurs when a machine learning model learns the training data too well, including its noise and specific details, leading to poor performance on new, unseen data. One method to mitigate overfitting is using regularization techniques (e.g., L1/L2 regularization), cross-validation, or increasing the amount of training data.


Quiz 3: Deep Learning & Neural Networks

Lesson Focus: Introduction to neural networks, perceptrons, multi-layer perceptrons, activation functions, backpropagation, and types of deep learning architectures (CNNs, RNNs).

Instructions: Choose the best answer for multiple-choice questions and provide a concise response for short-answer questions.

  1. Multiple Choice: What is the primary function of an activation function in a neural network?

a) To normalize the input data

b) To introduce non-linearity into the network

c) To randomly initialize weights

d) To calculate the loss function

* Correct Answer: b) To introduce non-linearity into the network

  1. Multiple Choice: Which deep learning architecture is particularly well-suited for image recognition tasks?

a) Recurrent Neural Network (RNN)

b) Generative Adversarial Network (GAN)

c) Convolutional Neural Network (CNN)

d) Autoencoder

* Correct Answer: c) Convolutional Neural Network (CNN)

  1. Short Answer: Briefly explain the concept of "backpropagation" in neural networks.

* Suggested Answer: Backpropagation is an algorithm used to train neural networks by efficiently calculating the gradient of the loss function with respect to the weights of the network. It propagates the error backward through the network, layer by layer, to adjust the weights and minimize the error.


Quiz 4: Natural Language Processing (NLP) & Computer Vision

Lesson Focus: NLP tasks (tokenization, sentiment analysis, machine translation), common NLP models (word embeddings, Transformers), Computer Vision tasks (object detection, image segmentation), and key CV techniques.

Instructions: Choose the best answer for multiple-choice questions and provide a concise response for short-answer questions.

  1. Multiple Choice: Which NLP task involves breaking down text into smaller units like words or phrases?

a) Sentiment Analysis

b) Machine Translation

c) Tokenization

d) Named Entity Recognition

* Correct Answer: c) Tokenization

  1. Multiple Choice: In Computer Vision, what is the goal of "object detection"?

a) To classify an entire image into one category

b) To generate new, realistic images

c) To identify and locate one or more objects within an image

d) To remove noise from an image

* Correct Answer: c) To identify and locate one or more objects within an image

  1. Short Answer: What is the main advantage of using Transformer models over traditional RNNs for sequence-to-sequence tasks in NLP?

* Suggested Answer: Transformers utilize self-attention mechanisms, allowing them to process all parts of an input sequence in parallel, capturing long-range dependencies more effectively than RNNs. This parallelism also makes them much faster to train on large datasets.


Quiz 5: AI Ethics, Applications, and Future Trends

Lesson Focus: Ethical considerations in AI (bias, privacy, accountability), real-world applications across industries, and emerging trends in AI research.

Instructions: Choose the best answer for multiple-choice questions and provide a concise response for short-answer questions.

  1. Multiple Choice: Which of the following is a significant ethical concern regarding AI systems?

a) Their ability to process data quickly

b) The potential for algorithmic bias

c) Their need for large datasets

d) The computational power required for training

* Correct Answer: b) The potential for algorithmic bias

  1. Multiple Choice: AI is increasingly being used in healthcare for tasks such as:

a) Manual data entry

b) Predictive diagnostics and drug discovery

c) Traditional surgical procedures

d) Patient registration only

* Correct Answer: b) Predictive diagnostics and drug discovery

  1. Short Answer: Provide an example of how AI can be applied in the field of environmental conservation.

* Suggested Answer: AI can be used in environmental conservation for tasks such as monitoring deforestation using satellite imagery and computer vision, predicting wildlife migration patterns, optimizing energy consumption in smart grids, or identifying sources of pollution.


Recommendations and Next Steps

  • Integrate into Learning Management System (LMS): Upload these quizzes into your chosen LMS (e.g., Moodle, Canvas, Teachable) to allow learners to take them directly.
  • Automated Grading: For multiple-choice questions, configure automated grading to provide immediate feedback to learners.
  • Manual Review for Short Answers: For short-answer questions, establish clear rubrics for manual grading to ensure consistency and fairness.
  • Feedback Mechanism: Implement a system for learners to receive detailed feedback on their answers, especially for incorrect responses, to reinforce learning.
  • Quiz Settings: Consider settings such as time limits, number of attempts allowed, and whether answers are revealed immediately or after submission.
  • Difficulty Adjustment: As the course progresses, consider increasing the complexity and depth of the quiz questions.
  • Performance Analytics: Utilize quiz performance data to identify areas where learners might be struggling, allowing you to refine lesson content or provide additional support.
  • Regular Updates: Periodically review and update quiz questions to ensure they remain relevant to the evolving field of AI Technology.

This comprehensive set of quizzes will significantly enhance the learning experience by providing valuable assessment opportunities for your "AI Technology" course.

complete_course_creator.md
Download as Markdown
Copy all content
Full output as text
Download ZIP
IDE-ready project ZIP
Copy share link
Permanent URL for this run
Get Embed Code
Embed this result on any website
Print / Save PDF
Use browser print dialog
\n\n\n"); var hasSrcMain=Object.keys(extracted).some(function(k){return k.indexOf("src/main")>=0;}); if(!hasSrcMain) zip.file(folder+"src/main."+ext,"import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport App from './App'\nimport './index.css'\n\nReactDOM.createRoot(document.getElementById('root')!).render(\n \n \n \n)\n"); var hasSrcApp=Object.keys(extracted).some(function(k){return k==="src/App."+ext||k==="App."+ext;}); if(!hasSrcApp) zip.file(folder+"src/App."+ext,"import React from 'react'\nimport './App.css'\n\nfunction App(){\n return(\n
\n
\n

"+slugTitle(pn)+"

\n

Built with PantheraHive BOS

\n
\n
\n )\n}\nexport default App\n"); zip.file(folder+"src/index.css","*{margin:0;padding:0;box-sizing:border-box}\nbody{font-family:system-ui,-apple-system,sans-serif;background:#f0f2f5;color:#1a1a2e}\n.app{min-height:100vh;display:flex;flex-direction:column}\n.app-header{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:40px}\nh1{font-size:2.5rem;font-weight:700}\n"); zip.file(folder+"src/App.css",""); zip.file(folder+"src/components/.gitkeep",""); zip.file(folder+"src/pages/.gitkeep",""); zip.file(folder+"src/hooks/.gitkeep",""); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\nnpm run dev\n\`\`\`\n\n## Build\n\`\`\`bash\nnpm run build\n\`\`\`\n\n## Open in IDE\nOpen the project folder in VS Code or WebStorm.\n"); zip.file(folder+".gitignore","node_modules/\ndist/\n.env\n.DS_Store\n*.local\n"); } /* --- Vue (Vite + Composition API + TypeScript) --- */ function buildVue(zip,folder,app,code,panelTxt){ var pn=pkgName(app); var C=cc(pn); var extracted=extractCode(panelTxt); zip.file(folder+"package.json",'{\n "name": "'+pn+'",\n "version": "0.0.0",\n "type": "module",\n "scripts": {\n "dev": "vite",\n "build": "vue-tsc -b && vite build",\n "preview": "vite preview"\n },\n "dependencies": {\n "vue": "^3.5.13",\n "vue-router": "^4.4.5",\n "pinia": "^2.3.0",\n "axios": "^1.7.9"\n },\n "devDependencies": {\n "@vitejs/plugin-vue": "^5.2.1",\n "typescript": "~5.7.3",\n "vite": "^6.0.5",\n "vue-tsc": "^2.2.0"\n }\n}\n'); zip.file(folder+"vite.config.ts","import { defineConfig } from 'vite'\nimport vue from '@vitejs/plugin-vue'\nimport { resolve } from 'path'\n\nexport default defineConfig({\n plugins: [vue()],\n resolve: { alias: { '@': resolve(__dirname,'src') } }\n})\n"); zip.file(folder+"tsconfig.json",'{"files":[],"references":[{"path":"./tsconfig.app.json"},{"path":"./tsconfig.node.json"}]}\n'); zip.file(folder+"tsconfig.app.json",'{\n "compilerOptions":{\n "target":"ES2020","useDefineForClassFields":true,"module":"ESNext","lib":["ES2020","DOM","DOM.Iterable"],\n "skipLibCheck":true,"moduleResolution":"bundler","allowImportingTsExtensions":true,\n "isolatedModules":true,"moduleDetection":"force","noEmit":true,"jsxImportSource":"vue",\n "strict":true,"paths":{"@/*":["./src/*"]}\n },\n "include":["src/**/*.ts","src/**/*.d.ts","src/**/*.tsx","src/**/*.vue"]\n}\n'); zip.file(folder+"env.d.ts","/// \n"); zip.file(folder+"index.html","\n\n\n \n \n "+slugTitle(pn)+"\n\n\n
\n \n\n\n"); var hasMain=Object.keys(extracted).some(function(k){return k==="src/main.ts"||k==="main.ts";}); if(!hasMain) zip.file(folder+"src/main.ts","import { createApp } from 'vue'\nimport { createPinia } from 'pinia'\nimport App from './App.vue'\nimport './assets/main.css'\n\nconst app = createApp(App)\napp.use(createPinia())\napp.mount('#app')\n"); var hasApp=Object.keys(extracted).some(function(k){return k.indexOf("App.vue")>=0;}); if(!hasApp) zip.file(folder+"src/App.vue","\n\n\n\n\n"); zip.file(folder+"src/assets/main.css","*{margin:0;padding:0;box-sizing:border-box}body{font-family:system-ui,sans-serif;background:#fff;color:#213547}\n"); zip.file(folder+"src/components/.gitkeep",""); zip.file(folder+"src/views/.gitkeep",""); zip.file(folder+"src/stores/.gitkeep",""); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\nnpm run dev\n\`\`\`\n\n## Build\n\`\`\`bash\nnpm run build\n\`\`\`\n\nOpen in VS Code or WebStorm.\n"); zip.file(folder+".gitignore","node_modules/\ndist/\n.env\n.DS_Store\n*.local\n"); } /* --- Angular (v19 standalone) --- */ function buildAngular(zip,folder,app,code,panelTxt){ var pn=pkgName(app); var C=cc(pn); var sel=pn.replace(/_/g,"-"); var extracted=extractCode(panelTxt); zip.file(folder+"package.json",'{\n "name": "'+pn+'",\n "version": "0.0.0",\n "scripts": {\n "ng": "ng",\n "start": "ng serve",\n "build": "ng build",\n "test": "ng test"\n },\n "dependencies": {\n "@angular/animations": "^19.0.0",\n "@angular/common": "^19.0.0",\n "@angular/compiler": "^19.0.0",\n "@angular/core": "^19.0.0",\n "@angular/forms": "^19.0.0",\n "@angular/platform-browser": "^19.0.0",\n "@angular/platform-browser-dynamic": "^19.0.0",\n "@angular/router": "^19.0.0",\n "rxjs": "~7.8.0",\n "tslib": "^2.3.0",\n "zone.js": "~0.15.0"\n },\n "devDependencies": {\n "@angular-devkit/build-angular": "^19.0.0",\n "@angular/cli": "^19.0.0",\n "@angular/compiler-cli": "^19.0.0",\n "typescript": "~5.6.0"\n }\n}\n'); zip.file(folder+"angular.json",'{\n "$schema": "./node_modules/@angular/cli/lib/config/schema.json",\n "version": 1,\n "newProjectRoot": "projects",\n "projects": {\n "'+pn+'": {\n "projectType": "application",\n "root": "",\n "sourceRoot": "src",\n "prefix": "app",\n "architect": {\n "build": {\n "builder": "@angular-devkit/build-angular:application",\n "options": {\n "outputPath": "dist/'+pn+'",\n "index": "src/index.html",\n "browser": "src/main.ts",\n "tsConfig": "tsconfig.app.json",\n "styles": ["src/styles.css"],\n "scripts": []\n }\n },\n "serve": {"builder":"@angular-devkit/build-angular:dev-server","configurations":{"production":{"buildTarget":"'+pn+':build:production"},"development":{"buildTarget":"'+pn+':build:development"}},"defaultConfiguration":"development"}\n }\n }\n }\n}\n'); zip.file(folder+"tsconfig.json",'{\n "compileOnSave": false,\n "compilerOptions": {"baseUrl":"./","outDir":"./dist/out-tsc","forceConsistentCasingInFileNames":true,"strict":true,"noImplicitOverride":true,"noPropertyAccessFromIndexSignature":true,"noImplicitReturns":true,"noFallthroughCasesInSwitch":true,"paths":{"@/*":["src/*"]},"skipLibCheck":true,"esModuleInterop":true,"sourceMap":true,"declaration":false,"experimentalDecorators":true,"moduleResolution":"bundler","importHelpers":true,"target":"ES2022","module":"ES2022","useDefineForClassFields":false,"lib":["ES2022","dom"]},\n "references":[{"path":"./tsconfig.app.json"}]\n}\n'); zip.file(folder+"tsconfig.app.json",'{\n "extends":"./tsconfig.json",\n "compilerOptions":{"outDir":"./dist/out-tsc","types":[]},\n "files":["src/main.ts"],\n "include":["src/**/*.d.ts"]\n}\n'); zip.file(folder+"src/index.html","\n\n\n \n "+slugTitle(pn)+"\n \n \n \n\n\n \n\n\n"); zip.file(folder+"src/main.ts","import { bootstrapApplication } from '@angular/platform-browser';\nimport { appConfig } from './app/app.config';\nimport { AppComponent } from './app/app.component';\n\nbootstrapApplication(AppComponent, appConfig)\n .catch(err => console.error(err));\n"); zip.file(folder+"src/styles.css","* { margin: 0; padding: 0; box-sizing: border-box; }\nbody { font-family: system-ui, -apple-system, sans-serif; background: #f9fafb; color: #111827; }\n"); var hasComp=Object.keys(extracted).some(function(k){return k.indexOf("app.component")>=0;}); if(!hasComp){ zip.file(folder+"src/app/app.component.ts","import { Component } from '@angular/core';\nimport { RouterOutlet } from '@angular/router';\n\n@Component({\n selector: 'app-root',\n standalone: true,\n imports: [RouterOutlet],\n templateUrl: './app.component.html',\n styleUrl: './app.component.css'\n})\nexport class AppComponent {\n title = '"+pn+"';\n}\n"); zip.file(folder+"src/app/app.component.html","
\n
\n

"+slugTitle(pn)+"

\n

Built with PantheraHive BOS

\n
\n \n
\n"); zip.file(folder+"src/app/app.component.css",".app-header{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:60vh;gap:16px}h1{font-size:2.5rem;font-weight:700;color:#6366f1}\n"); } zip.file(folder+"src/app/app.config.ts","import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { provideRouter } from '@angular/router';\nimport { routes } from './app.routes';\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n provideRouter(routes)\n ]\n};\n"); zip.file(folder+"src/app/app.routes.ts","import { Routes } from '@angular/router';\n\nexport const routes: Routes = [];\n"); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\nng serve\n# or: npm start\n\`\`\`\n\n## Build\n\`\`\`bash\nng build\n\`\`\`\n\nOpen in VS Code with Angular Language Service extension.\n"); zip.file(folder+".gitignore","node_modules/\ndist/\n.env\n.DS_Store\n*.local\n.angular/\n"); } /* --- Python --- */ function buildPython(zip,folder,app,code){ var title=slugTitle(app); var pn=pkgName(app); var src=code.replace(/^\`\`\`[\w]*\n?/m,"").replace(/\n?\`\`\`$/m,"").trim(); var reqMap={"numpy":"numpy","pandas":"pandas","sklearn":"scikit-learn","tensorflow":"tensorflow","torch":"torch","flask":"flask","fastapi":"fastapi","uvicorn":"uvicorn","requests":"requests","sqlalchemy":"sqlalchemy","pydantic":"pydantic","dotenv":"python-dotenv","PIL":"Pillow","cv2":"opencv-python","matplotlib":"matplotlib","seaborn":"seaborn","scipy":"scipy"}; var reqs=[]; Object.keys(reqMap).forEach(function(k){if(src.indexOf("import "+k)>=0||src.indexOf("from "+k)>=0)reqs.push(reqMap[k]);}); var reqsTxt=reqs.length?reqs.join("\n"):"# add dependencies here\n"; zip.file(folder+"main.py",src||"# "+title+"\n# Generated by PantheraHive BOS\n\nprint(title+\" loaded\")\n"); zip.file(folder+"requirements.txt",reqsTxt); zip.file(folder+".env.example","# Environment variables\n"); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\npython3 -m venv .venv\nsource .venv/bin/activate\npip install -r requirements.txt\n\`\`\`\n\n## Run\n\`\`\`bash\npython main.py\n\`\`\`\n"); zip.file(folder+".gitignore",".venv/\n__pycache__/\n*.pyc\n.env\n.DS_Store\n"); } /* --- Node.js --- */ function buildNode(zip,folder,app,code){ var title=slugTitle(app); var pn=pkgName(app); var src=code.replace(/^\`\`\`[\w]*\n?/m,"").replace(/\n?\`\`\`$/m,"").trim(); var depMap={"mongoose":"^8.0.0","dotenv":"^16.4.5","axios":"^1.7.9","cors":"^2.8.5","bcryptjs":"^2.4.3","jsonwebtoken":"^9.0.2","socket.io":"^4.7.4","uuid":"^9.0.1","zod":"^3.22.4","express":"^4.18.2"}; var deps={}; Object.keys(depMap).forEach(function(k){if(src.indexOf(k)>=0)deps[k]=depMap[k];}); if(!deps["express"])deps["express"]="^4.18.2"; var pkgJson=JSON.stringify({"name":pn,"version":"1.0.0","main":"src/index.js","scripts":{"start":"node src/index.js","dev":"nodemon src/index.js"},"dependencies":deps,"devDependencies":{"nodemon":"^3.0.3"}},null,2)+"\n"; zip.file(folder+"package.json",pkgJson); var fallback="const express=require(\"express\");\nconst app=express();\napp.use(express.json());\n\napp.get(\"/\",(req,res)=>{\n res.json({message:\""+title+" API\"});\n});\n\nconst PORT=process.env.PORT||3000;\napp.listen(PORT,()=>console.log(\"Server on port \"+PORT));\n"; zip.file(folder+"src/index.js",src||fallback); zip.file(folder+".env.example","PORT=3000\n"); zip.file(folder+".gitignore","node_modules/\n.env\n.DS_Store\n"); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\n## Setup\n\`\`\`bash\nnpm install\n\`\`\`\n\n## Run\n\`\`\`bash\nnpm run dev\n\`\`\`\n"); } /* --- Vanilla HTML --- */ function buildVanillaHtml(zip,folder,app,code){ var title=slugTitle(app); var isFullDoc=code.trim().toLowerCase().indexOf("=0||code.trim().toLowerCase().indexOf("=0; var indexHtml=isFullDoc?code:"\n\n\n\n\n"+title+"\n\n\n\n"+code+"\n\n\n\n"; zip.file(folder+"index.html",indexHtml); zip.file(folder+"style.css","/* "+title+" — styles */\n*{margin:0;padding:0;box-sizing:border-box}\nbody{font-family:system-ui,-apple-system,sans-serif;background:#fff;color:#1a1a2e}\n"); zip.file(folder+"script.js","/* "+title+" — scripts */\n"); zip.file(folder+"assets/.gitkeep",""); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\n## Open\nDouble-click \`index.html\` in your browser.\n\nOr serve locally:\n\`\`\`bash\nnpx serve .\n# or\npython3 -m http.server 3000\n\`\`\`\n"); zip.file(folder+".gitignore",".DS_Store\nnode_modules/\n.env\n"); } /* ===== MAIN ===== */ var sc=document.createElement("script"); sc.src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"; sc.onerror=function(){ if(lbl)lbl.textContent="Download ZIP"; alert("JSZip load failed — check connection."); }; sc.onload=function(){ var zip=new JSZip(); var base=(_phFname||"output").replace(/\.[^.]+$/,""); var app=base.toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")||"my_app"; var folder=app+"/"; var vc=document.getElementById("panel-content"); var panelTxt=vc?(vc.innerText||vc.textContent||""):""; var lang=detectLang(_phCode,panelTxt); if(_phIsHtml){ buildVanillaHtml(zip,folder,app,_phCode); } else if(lang==="flutter"){ buildFlutter(zip,folder,app,_phCode,panelTxt); } else if(lang==="react-native"){ buildReactNative(zip,folder,app,_phCode,panelTxt); } else if(lang==="swift"){ buildSwift(zip,folder,app,_phCode,panelTxt); } else if(lang==="kotlin"){ buildKotlin(zip,folder,app,_phCode,panelTxt); } else if(lang==="react"){ buildReact(zip,folder,app,_phCode,panelTxt); } else if(lang==="vue"){ buildVue(zip,folder,app,_phCode,panelTxt); } else if(lang==="angular"){ buildAngular(zip,folder,app,_phCode,panelTxt); } else if(lang==="python"){ buildPython(zip,folder,app,_phCode); } else if(lang==="node"){ buildNode(zip,folder,app,_phCode); } else { /* Document/content workflow */ var title=app.replace(/_/g," "); var md=_phAll||_phCode||panelTxt||"No content"; zip.file(folder+app+".md",md); var h=""+title+""; h+="

"+title+"

"; var hc=md.replace(/&/g,"&").replace(//g,">"); hc=hc.replace(/^### (.+)$/gm,"

$1

"); hc=hc.replace(/^## (.+)$/gm,"

$1

"); hc=hc.replace(/^# (.+)$/gm,"

$1

"); hc=hc.replace(/\*\*(.+?)\*\*/g,"$1"); hc=hc.replace(/\n{2,}/g,"

"); h+="

"+hc+"

Generated by PantheraHive BOS
"; zip.file(folder+app+".html",h); zip.file(folder+"README.md","# "+title+"\n\nGenerated by PantheraHive BOS.\n\nFiles:\n- "+app+".md (Markdown)\n- "+app+".html (styled HTML)\n"); } zip.generateAsync({type:"blob"}).then(function(blob){ var a=document.createElement("a"); a.href=URL.createObjectURL(blob); a.download=app+".zip"; a.click(); URL.revokeObjectURL(a.href); if(lbl)lbl.textContent="Download ZIP"; }); }; document.head.appendChild(sc); } function phShare(){navigator.clipboard.writeText(window.location.href).then(function(){var el=document.getElementById("ph-share-lbl");if(el){el.textContent="Link copied!";setTimeout(function(){el.textContent="Copy share link";},2500);}});}function phEmbed(){var runId=window.location.pathname.split("/").pop().replace(".html","");var embedUrl="https://pantherahive.com/embed/"+runId;var code='';navigator.clipboard.writeText(code).then(function(){var el=document.getElementById("ph-embed-lbl");if(el){el.textContent="Embed code copied!";setTimeout(function(){el.textContent="Get Embed Code";},2500);}});}