Performance Review Writer
Run ID: 69cbaeb861b1021a29a8b59e2026-03-31HR
PantheraHive BOS
BOS Dashboard

Generate comprehensive performance reviews with goal assessments, competency ratings, development plans, and constructive feedback frameworks.

Research Topic: Comprehensive Performance Review Generation

This document outlines the essential components, best practices, common pitfalls, and foundational frameworks required for generating comprehensive, effective, and professional performance reviews. This research forms the critical basis for developing a robust performance review writer tool.


1. Introduction to Comprehensive Performance Reviews

A comprehensive performance review is a structured assessment of an employee's work performance over a specific period. Its primary purposes are to:

  • Evaluate past performance against set goals and expectations.
  • Identify strengths and areas for development.
  • Provide constructive feedback.
  • Facilitate career growth and development planning.
  • Align individual contributions with organizational objectives.
  • Inform decisions regarding compensation, promotions, and training.

Effective performance reviews are objective, fact-based, forward-looking, and foster a culture of continuous improvement and open communication.


2. Essential Components of a Comprehensive Performance Review

A robust performance review should include the following sections:

  • Employee Information:

* Employee Name, Job Title, Department, Employee ID.

* Manager Name, Manager Title.

* Review Period (Start Date - End Date).

* Date of Review.

  • Overall Performance Summary:

* A concise executive summary of the employee's performance during the review period.

* Highlights key achievements and overarching areas for improvement.

* Sets the tone for the rest of the review.

  • Goal Assessment & Achievement:

* Review of Previous Goals: List each goal set at the beginning of the review period.

* Performance Against Goals: For each goal, provide:

* Detailed description of the goal.

* Specific metrics or success criteria.

* Actual outcome or achievement status (e.g., Exceeded, Met, Partially Met, Not Met).

* Contextual explanation and specific examples supporting the assessment.

* Impact of the achievement or non-achievement on team/company objectives.

  • Competency & Skill Ratings:

* Defined Competencies: List core competencies relevant to the role and organization (e.g., Communication, Teamwork, Problem-Solving, Leadership, Adaptability, Technical Skills, Initiative, Customer Focus, Strategic Thinking).

* Rating Scale: Apply a consistent, clearly defined rating scale (e.g., 1-5, Needs Development, Meets Expectations, Exceeds Expectations, Outstanding).

* Specific Examples: For each competency, provide concrete examples and observable behaviors that justify the given rating. Detail instances where the employee demonstrated the competency effectively or where development is needed.

  • Strengths & Key Accomplishments:

* Identification of Strengths: Detail specific areas where the employee consistently excels and adds significant value.

* Key Accomplishments: Highlight 2-3 major achievements or projects where the employee made a notable positive impact.

Impact Analysis: Explain how* these strengths and accomplishments benefited the team, department, or organization.

  • Areas for Development & Improvement:

* Specific Areas: Clearly articulate 1-2 specific areas where the employee needs to develop or improve performance. Avoid vague statements.

* Behavioral Focus: Frame feedback around observable behaviors, not personality traits.

* Impact of Development Needs: Explain the potential negative impact if these areas are not addressed, or the positive impact if they are.

* Constructive Feedback Framework: Apply a structured approach (e.g., STAR method) to provide feedback (Situation, Task, Action, Result) for clarity and objectivity.

  • Development Plan:

* Actionable Steps: Outline specific, measurable, achievable, relevant, and time-bound (SMART) actions the employee will take to address development areas.

* Resources: Identify resources, training, courses, mentoring, or projects that will support the development.

* Timeline: Establish a realistic timeline for completing development actions.

* Success Metrics: Define how progress and successful completion of the development plan will be measured.

* Manager Support: Detail how the manager will support the employee's development.

  • Future Goals & Objectives:

* New SMART Goals: Establish 2-3 new goals for the upcoming review period, aligned with individual career aspirations and organizational priorities.

* Alignment: Ensure these goals contribute to department and company objectives.

  • Employee Comments:

* A dedicated section for the employee to provide their own perspective, self-assessment, agreement/disagreement with feedback, and any additional comments.

  • Signatures:

* Manager Signature & Date.

* Employee Signature & Date (acknowledging receipt and discussion, not necessarily agreement).


3. Best Practices for Writing Effective Performance Reviews

  • Be Specific and Objective: Use concrete examples, data, and observable behaviors to support all assessments. Avoid generalizations, subjective opinions, or vague statements.
  • Focus on Behaviors, Not Personality: Evaluate what the employee does and how they do it, rather than who they are.
  • Be Timely and Regular: Reviews should reflect performance over the entire period, supported by ongoing documentation, not just recent events.
  • Balance Strengths and Development Areas: Provide a holistic view. Acknowledge achievements and areas of excellence alongside growth opportunities.
  • Forward-Looking: Emphasize growth, development, and future contributions. The review should be a springboard for future success.
  • Align with Company Goals and Values: Connect individual performance and development to the broader organizational mission and values.
  • Use a Consistent Rating Scale: Ensure fairness, transparency, and comparability across the organization.
  • Maintain a Professional and Constructive Tone: Language should be respectful, empathetic, and focused on improvement. Avoid emotional, accusatory, or overly critical language.
  • Gather Multi-Source Feedback (360-degree): Incorporate input from peers, direct reports, and other stakeholders where appropriate, for a more comprehensive view.
  • Prepare Thoroughly: Collect all necessary data, notes, project outcomes, and previous feedback before drafting the review.
  • No Surprises: All feedback, especially regarding development areas, should have been discussed with the employee throughout the review period, not just presented at the annual review.

4. Common Pitfalls to Avoid

  • Recency Bias: Overemphasizing recent performance (positive or negative) while neglecting earlier performance in the review period.
  • Leniency/Strictness Bias: Consistently rating all employees too high or too low, regardless of actual performance.
  • Halo/Horn Effect: Allowing one outstanding (halo) or poor (horn) trait/incident to overshadow the entire performance review.
  • Central Tendency Bias: Rating most employees as "average" or "meets expectations" to avoid conflict or difficult conversations.
  • Lack of Specificity: Providing vague feedback that doesn't offer actionable insights for improvement.
  • Attribution Bias: Attributing success or failure to internal traits rather than external factors or vice versa.
  • Focusing Only on Weaknesses: Neglecting to acknowledge and celebrate strengths and achievements, leading to demotivation.
  • Emotional or Subjective Language: Using personal opinions, generalizations, or emotionally charged words instead of objective observations.
  • Procrastination: Rushing the review process, leading to poorly written, inaccurate, or incomplete assessments.
  • Comparison to Others: Directly comparing an employee's performance to that of a colleague within the review document. Focus solely on the individual's performance against their goals and competencies.

5. Frameworks and Methodologies for Performance Reviews

  • SMART Goals:

* Specific: Clearly defined, not vague.

* Measurable: Quantifiable or verifiable.

* Achievable: Realistic and attainable.

* Relevant: Aligned with job role and organizational objectives.

* Time-bound: Has a clear deadline.

Application*: Essential for setting and assessing goals accurately.

  • STAR Method (for Feedback):

* Situation: Describe the context or background.

* Task: Explain the specific task or objective.

* Action: Detail the specific actions taken by the employee.

* Result: Describe the outcome or consequence of the actions.

Application*: Provides a structured way to deliver specific, behavioral feedback (both positive and constructive).

  • Competency-Based Reviews:

* Focus on evaluating employees against a predefined set of skills, behaviors, and attributes critical for success in their role and the organization.

Application*: Ensures consistency and alignment with organizational values and strategic needs.

  • 360-Degree Feedback:

* Gathers feedback from multiple sources: manager, peers, direct reports, and sometimes external stakeholders.

Application*: Offers a well-rounded perspective on an employee's performance and impact.

  • Continuous Feedback Model:

* Moves beyond annual reviews to ongoing, real-time feedback and coaching throughout the year.

Application*: Reduces "no surprises" issues and fosters continuous development. The annual review becomes a summary and future planning session.


6. Data and Evidence Gathering (Pre-Writing Phase)

Before writing any performance review, thorough data collection is paramount to ensure objectivity and accuracy.

  • Performance Metrics & KPIs:

* Sales figures, project completion rates, customer satisfaction scores, quality metrics, efficiency rates, budget adherence.

* Any quantifiable data related to the employee's role and goals.

  • Previous Performance Reviews & Goals:

* Review past assessments, development plans, and previously set goals to track progress and identify trends.

  • One-on-One Meeting Notes:

* Documentation from regular check-ins, discussions about progress, challenges, and achievements.

  • Project Documentation & Deliverables:

* Records of contributions to specific projects, reports, presentations, or other work products.

  • Peer Feedback:

* Structured or informal input from colleagues who regularly collaborate with the employee.

  • Self-Assessments:

* The employee's own reflection on their performance, achievements, and development areas provides valuable insight and promotes self-awareness.

  • Customer/Client Feedback:

* If applicable, feedback from external clients or internal stakeholders the employee interacts with.

  • Training & Development Records:

* Participation in workshops, courses, certifications, or mentoring programs.

  • Email Correspondence/Communication Logs:

* Evidence of communication effectiveness, collaboration, or problem-solving.


This comprehensive research provides the foundational knowledge required to develop an intelligent and effective "Performance Review Writer" tool, ensuring that generated reviews are detailed, professional, actionable, and aligned with best practices.

gemini Output

Elevate Your Team's Performance with Our AI-Powered Review Writer

Streamline Your Performance Management Process and Foster Growth

Crafting comprehensive, insightful, and fair performance reviews can be a time-consuming and challenging task. Yet, they are crucial for employee development, engagement, and overall organizational success. Our AI-powered Performance Review Writer is designed to transform this process, enabling managers and HR professionals to generate detailed, professional reviews with unparalleled efficiency and quality.

Say goodbye to generic templates and hours spent agonizing over wording. Our sophisticated platform helps you deliver meaningful feedback that inspires growth, clarifies expectations, and drives your team towards higher achievements.


Key Features & Benefits: What Our Performance Review Writer Delivers

Our tool is built on a robust framework that covers all essential aspects of a holistic performance evaluation. Each review is meticulously crafted to be actionable, fair, and aligned with your organizational goals.

1. Precise Goal Assessments & Achievement Tracking

Headline: Quantify Success: Objective Goal Assessment

Our system intelligently analyzes an employee's performance against their established goals and KPIs. We help you articulate:

  • Clear Achievement Status: Easily determine whether goals were met, exceeded, or require further attention.
  • Impact Analysis: Describe the tangible impact of the employee's contributions on team and company objectives.
  • Contextual Nuance: Incorporate relevant factors that influenced goal attainment, providing a balanced perspective.
  • Forward-Looking Goal Setting: Suggest improvements or adjustments for future goal planning based on past performance.

2. Structured Competency Ratings & Behavioral Insights

Headline: Uncover Strengths & Areas for Development with Competency-Based Feedback

Beyond just goal achievement, understanding how an employee operates is vital. Our writer provides a framework for evaluating core competencies:

  • Standardized Rating Scales: Utilize consistent rating scales (e.g., Exceeds Expectations, Meets Expectations, Needs Development) for various competencies like communication, teamwork, problem-solving, leadership, and adaptability.
  • Behavioral Examples: Generate specific, illustrative examples that justify competency ratings, making feedback concrete and easy to understand.
  • Alignment with Company Values: Ensure that competency evaluations reflect and reinforce your organization's core values and desired behaviors.
  • Tailored Feedback: Customize competency sets to match specific job roles and organizational requirements.

3. Actionable Development Plans & Growth Roadmaps

Headline: Empower Growth: Craft Personalized Development Pathways

The most effective reviews don't just look back; they look forward. Our tool helps you create impactful development plans:

  • Targeted Skill Enhancement: Identify specific skills or knowledge areas where an employee can grow, directly linked to performance observations.
  • SMART Development Goals: Generate Specific, Measurable, Achievable, Relevant, and Time-bound development objectives.
  • Resource Recommendations: Suggest relevant training courses, mentorship opportunities, stretch assignments, or learning resources.
  • Progress Tracking Framework: Outline clear steps and timelines for monitoring development progress and accountability.

4. Constructive Feedback Frameworks for Meaningful Dialogue

Headline: Foster Openness: Deliver Balanced, Impactful Feedback

Delivering constructive criticism effectively is an art. Our framework ensures feedback is:

  • Balanced: Integrates both strengths and areas for improvement, creating a positive and motivating tone.
  • Specific & Objective: Focuses on observable behaviors and outcomes, avoiding vague generalizations.
  • Impact-Oriented: Explains the impact of behaviors on the individual, team, and organization.
  • Forward-Looking: Provides clear recommendations and solutions for improvement rather than just pointing out deficiencies.
  • Empathetic Tone: Helps managers phrase feedback in a supportive and encouraging manner, promoting psychological safety.

Why Choose Our Performance Review Writer?

  • Time-Saving: Drastically reduce the time spent writing reviews, freeing up valuable management and HR resources.
  • Consistency & Fairness: Ensure a standardized, objective, and equitable review process across your entire organization.
  • Enhanced Quality: Generate well-articulated, professional, and insightful reviews that truly drive performance.
  • Employee Engagement: Provide employees with clear, actionable feedback that motivates them to develop and excel.
  • Customizable Output: Adapt the generated content to perfectly fit your company's unique culture, values, and review templates.

Ready to Transform Your Performance Reviews?

Stop dreading performance review season and start leveraging it as a powerful tool for growth and success. Our AI-powered Performance Review Writer is your partner in creating a high-performance culture.

[Call to Action Button] Get Started Now

[Call to Action Link] Request a Demo & See It in Action

gemini Output

As a professional AI assistant, I have executed the final step in the "Performance Review Writer" workflow. This output delivers a comprehensive, polished, and professionally formatted performance review, incorporating goal assessments, competency ratings, development plans, and a constructive feedback framework.

This deliverable serves as a detailed example, demonstrating the structure and content quality you can expect. It is designed to be directly actionable, providing a robust template for conducting effective performance evaluations.


Performance Review: Senior Software Engineer

Review Period: January 1, 2023 – December 31, 2023

Date of Review: January 15, 2024


1. Employee Information

  • Employee Name: Alex Chen
  • Employee ID: AC001
  • Job Title: Senior Software Engineer
  • Department: Product Development
  • Manager Name: Sarah Lee
  • Date of Hire: March 10, 2020

2. Overall Performance Summary

Alex Chen has demonstrated a strong year of performance as a Senior Software Engineer, consistently contributing to key projects and exhibiting technical excellence. Alex has met or exceeded expectations in most areas, particularly in project delivery, code quality, and mentorship. While technical skills are a clear strength, there are opportunities for growth in proactive cross-functional communication and delegating tasks more effectively to junior team members. Overall, Alex is a highly valuable asset to the team, and with targeted development, is well-positioned for future leadership roles.


3. Goal Assessment

This section evaluates progress and achievement against established goals for the review period.

Rating Scale:

  • Not Met: Significant deviation from target.
  • Partially Met: Achieved some aspects, but fell short of the full target.
  • Met Expectations: Fully achieved the goal.
  • Exceeded Expectations: Achieved the goal and delivered additional value or impact.

| Goal | Target Date | Status | Rating | Comments

performance_review_writer.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);}});}