Employee Handbook Generator
Run ID: 69b6fa0b896970b089464a3d2026-03-29HR
PantheraHive BOS
BOS Dashboard

Generate a comprehensive employee handbook with company policies, benefits overview, code of conduct, leave policies, and compliance sections.

As a professional AI assistant within PantheraHive, I have executed the "Employee Handbook Generator" workflow for the HR category. Below is a comprehensive employee handbook tailored to your specifications, focusing on "AI Technology."


Employee Handbook: SynthAI Labs

I. Welcome to SynthAI Labs

Welcome to SynthAI Labs! We are thrilled to have you join our team of innovators and pioneers in the field of Artificial Intelligence. This handbook is designed to serve as your essential guide to our company's policies, procedures, benefits, and expectations. It reflects our commitment to fostering a collaborative, ethical, and cutting-edge work environment.

At SynthAI Labs, we believe that our employees are our greatest asset. Your talent, dedication, and passion for AI technology are what drive our success and enable us to push the boundaries of what's possible. We encourage you to familiarize yourself with the contents of this handbook, as it outlines the framework for a productive and rewarding experience here.

This handbook is a general statement of our current policies and practices and is not intended to be a contract of employment. SynthAI Labs reserves the right to modify, revoke, suspend, terminate, or change any policies, procedures, or benefits mentioned in this handbook at any time, with or without notice, at its sole discretion.

Our Vision: To be the global leader in responsible and transformative AI solutions.

Our Mission: To develop intelligent systems that enhance human capabilities, solve complex challenges, and contribute positively to society, all while upholding the highest ethical standards.

Our Values:

  • Innovation: Constantly exploring new frontiers in AI.
  • Integrity: Operating with honesty, transparency, and ethical responsibility.
  • Collaboration: Fostering a supportive and inclusive environment where diverse ideas thrive.
  • Excellence: Striving for the highest quality in our research, development, and products.
  • Responsibility: Committing to the safe, fair, and beneficial application of AI.

II. Company Policies

This section outlines the fundamental policies that govern our workplace at SynthAI Labs.

A. Employment Basics

  1. Equal Employment Opportunity (EEO): SynthAI Labs is an equal opportunity employer. We are committed to creating a diverse and inclusive workplace where all employees and applicants receive equal consideration regardless of race, color, religion, gender, sexual orientation, gender identity or expression, national origin, age, disability, genetic information, marital status, veteran status, or any other legally protected status.
  2. At-Will Employment: Employment with SynthAI Labs is "at-will." This means that either the employee or the company can terminate the employment relationship at any time, with or without cause, and with or without notice, subject to applicable laws.
  3. Confidentiality & Non-Disclosure: Due to the proprietary nature of our AI research and development, all employees are required to sign a Confidentiality and Non-Disclosure Agreement (NDA) upon hire. This agreement prohibits the unauthorized disclosure of company trade secrets, intellectual property, client data, and other confidential information. This includes, but is not limited to, algorithms, datasets, models, code, project plans, and business strategies.
  4. Intellectual Property (IP) Ownership: All inventions, discoveries, improvements, designs, works of authorship, algorithms, models, datasets, and other intellectual property created or conceived by an employee during their employment, related to the company's business or made with company resources, are the sole property of SynthAI Labs. Employees are required to sign an Invention Assignment Agreement.
  5. Data Privacy & Security: Protecting sensitive data is paramount. Employees must adhere to strict data privacy and security protocols, including secure handling of client data, research data, and internal company information. Unauthorized access, use, disclosure, modification, or destruction of data is strictly prohibited. All AI models and systems must be developed with data privacy by design principles.
  6. Work Hours & Attendance: Our standard workweek is [e.g., 40 hours, Monday to Friday]. Specific work hours may vary by department or role. Employees are expected to maintain regular and punctual attendance. Absences or tardiness must be reported to your manager in advance whenever possible.
  7. Remote Work Policy: [If applicable, specify policy, e.g., Hybrid, Fully Remote, or On-site with exceptions]. For remote work, employees must ensure a secure and productive environment, maintain data security, and be available during core business hours.
  8. Dress Code: We maintain a professional yet comfortable work environment. Business casual attire is generally appropriate. Specific safety gear may be required in certain lab or testing environments.
  9. Workplace Safety: SynthAI Labs is committed to providing a safe and healthy workplace. All employees are responsible for adhering to safety guidelines, reporting hazards, and participating in safety training.
  10. Anti-Harassment & Discrimination: SynthAI Labs has zero tolerance for harassment or discrimination of any kind, including sexual harassment. Any employee who believes they have been subjected to harassment or discrimination should report it immediately to their manager or the HR Department.
  11. Drug-Free Workplace: SynthAI Labs is committed to maintaining a drug-free workplace. The unlawful manufacture, distribution, dispensation, possession, or use of controlled substances is prohibited.
  12. Social Media Policy: Employees are expected to exercise good judgment and professionalism when using social media, especially when discussing company-related topics or representing SynthAI Labs. Do not disclose confidential information or engage in activities that could damage the company's reputation.
  13. Use of Company Property: Company property, including computers, software, networks, AI tools, and data, is provided for business use. Incidental personal use is permitted but should not interfere with work duties, violate company policies, or involve illegal activities. Employees have no expectation of privacy when using company systems.

B. AI Technology Specific Policies

  1. Ethical AI Use Policy:

* Fairness & Non-Bias: We commit to developing AI systems that are fair, transparent, and minimize bias. Employees must actively identify and mitigate potential biases in data, algorithms, and model outputs.

* Accountability: We hold ourselves accountable for the impact of our AI systems. Employees must document decisions, understand system limitations, and be prepared to explain AI behaviors.

* Transparency & Explainability: Where feasible and appropriate, our AI systems should be designed to be transparent and explainable, allowing users to understand their reasoning and outcomes.

* Human Oversight: Critical AI systems should incorporate human oversight and intervention capabilities to ensure ethical outcomes and prevent autonomous harm.

  1. AI Model Development & Deployment Guidelines:

* Robustness & Reliability: AI models must be rigorously tested for robustness, reliability, and security before deployment.

* Validation & Verification: All models must undergo thorough validation and verification processes, including performance metrics, edge case testing, and adversarial attack simulations.

* Version Control & Documentation: Comprehensive version control, documentation of model architecture, training data, and performance metrics are mandatory for all AI projects.

  1. Data Governance for AI:

* Data Sourcing: All data used for AI training must be legally and ethically sourced, with appropriate consent and privacy considerations.

* Data Anonymization/Pseudonymization: Sensitive data must be anonymized or pseudonymized where possible to protect individual privacy.

* Data Lifecycle Management: Strict policies govern the collection, storage, processing, and deletion of all data used in AI development.

  1. Bias Mitigation in AI Systems:

* Employees are required to undergo training on identifying and mitigating algorithmic bias.

* Regular audits and evaluations of AI systems for fairness and bias are mandatory, with remediation plans for identified issues.

  1. Responsible AI Innovation:

* We encourage innovative and responsible AI research. Employees are encouraged to explore novel AI applications while considering potential societal impacts, risks, and ethical implications.

* Proactive risk assessment and mitigation strategies are integral to every AI project.

  1. AI Tool Usage & Access:

* Access to proprietary AI tools, platforms, and datasets is granted based on job function and requires approval.

* Unauthorized use or sharing of access credentials is strictly prohibited.

* Employees must use company-approved AI tools and platforms; use of unapproved external AI tools for company work is generally prohibited due to data security and IP concerns.

III. Benefits Overview

SynthAI Labs is committed to providing a comprehensive and competitive benefits package to support the well-being and professional growth of our employees.

  1. Health & Wellness:

* Medical Insurance: [Details, e.g., PPO/HMO options, employer contribution].

* Dental Insurance: [Details].

* Vision Insurance: [Details].

* Employee Assistance Program (EAP): Confidential counseling and support services for personal and work-related issues.

* Wellness Programs: [e.g., Gym reimbursements, health challenges, mental health resources].

  1. Retirement Plans:

* 401(k) Plan: [Details, e.g., eligibility, company matching contributions, vesting schedule].

  1. Paid Time Off (PTO):

* A consolidated bank of hours for vacation, sick leave, and personal time. Accrual rates and carryover policies are detailed in the "Leave Policies" section.

  1. Professional Development & Training:

* Learning & Development Stipend: Annual stipend for conferences, courses, certifications, and workshops relevant to AI technology and professional growth.

* Internal Training Programs: Access to in-house seminars, workshops, and expert talks on advanced AI topics, tools, and ethical considerations.

* Tuition Reimbursement: Support for employees pursuing higher education related to their roles or the company's strategic goals.

  1. Other Perks:

* Tech Stipend: [e.g., For home office setup, internet, or personal tech upgrades].

* Meal & Snack Program: [e.g., On-site meals, stocked kitchens].

* Commuter Benefits: [e.g., Public transport subsidies, parking assistance].

* AI Research Grants: Opportunities for employees to apply for internal grants to pursue innovative AI research projects.

IV. Code of Conduct

Our Code of Conduct outlines the ethical principles and behavioral expectations that guide our actions and decisions at SynthAI Labs.

  1. Professionalism & Respect: Treat all colleagues, clients, partners, and stakeholders with respect, courtesy, and professionalism. Foster an inclusive environment free from harassment, discrimination, or bullying.
  2. Integrity & Honesty: Conduct all business activities with the highest degree of integrity and honesty. Do not engage in any form of deception, fraud, or misrepresentation.
  3. Conflict of Interest: Avoid situations where personal interests could conflict with the best interests of SynthAI Labs. Disclose any potential conflicts of interest to your manager or HR.
  4. Compliance with Laws & Regulations: Adhere to all applicable local, state, federal, and international laws and regulations, including those specific to data privacy, intellectual property, and AI governance.
  5. Reporting Violations: Employees are encouraged to report any suspected violations of this Code of Conduct, company policies, or legal requirements without fear of retaliation.
  6. Confidentiality: Uphold the strict confidentiality of all proprietary company information, client data, and intellectual property. This extends beyond your employment with SynthAI Labs.
  7. Ethical Use of AI: As an AI technology company, our ethical responsibilities are paramount. Always consider the societal impact of your work, strive for fairness, transparency, and accountability in AI development, and adhere to our Ethical AI Use Policy.

V. Leave Policies

SynthAI Labs provides various leave options to support our employees' personal and family needs.

  1. Paid Time Off (PTO):

* Accrual: Employees begin accruing PTO from their first day of employment. [Specify accrual rate, e.g., X hours per pay period].

* Usage: PTO can be used for vacation, personal appointments, or illness. All PTO requests should be submitted through [HR system] and approved by your manager in advance, except in emergency situations.

* Carryover: [Specify carryover policy, e.g., up to X hours can be carried over to the next year; any excess is forfeited].

  1. Company Holidays:

* SynthAI Labs observes [Number] paid holidays annually, including [List common holidays, e.g., New Year's Day, Memorial Day, Independence Day, Labor Day, Thanksgiving Day, Christmas Day, etc.]. A full list of observed holidays is provided annually.

  1. Family & Medical Leave Act (FMLA):

* Eligible employees may take up to 12 weeks of unpaid, job-protected leave for specific family and medical reasons, in accordance with the FMLA.

  1. Bereavement Leave:

* Employees may take up to [e.g., 3-5] days of paid bereavement leave for the death of an immediate family member.

  1. Jury Duty Leave:

* Employees summoned for jury duty will receive paid leave for the duration of their service. Proof of jury service is required.

  1. Military Leave:

* Employees who are members of the armed forces are granted leave in accordance with the Uniformed Services Employment and Reemployment Rights Act (USERRA).

  1. Parental Leave:

* [Specify policy, e.g., X weeks of paid leave for primary caregivers, Y weeks for secondary caregivers following birth or adoption].

VI. Compliance Sections

SynthAI Labs is committed to full compliance with all applicable laws and regulations.

A. Legal Compliance

  1. EEO Statement: SynthAI Labs is an Equal Employment Opportunity employer. This policy applies to all terms and conditions of employment, including recruitment, hiring, placement, promotion, termination, layoff, recall, transfer, leaves of absence, compensation, and training.
  2. Americans with Disabilities Act (ADA) Compliance: SynthAI Labs complies with the ADA and provides reasonable accommodations to qualified individuals with disabilities unless doing so would cause undue hardship.
  3. Fair Labor Standards Act (FLSA) Compliance: All employees are classified as either exempt or non-exempt in accordance with the FLSA. Non-exempt employees are eligible for overtime pay for hours worked over 40 in a workweek.
  4. Occupational Safety and Health Administration (OSHA) Compliance: We adhere to OSHA standards to ensure a safe working environment. Employees are expected to follow all safety procedures and report any unsafe conditions.
  5. Health Insurance Portability and Accountability Act (HIPAA): While not a healthcare provider, if SynthAI Labs handles Protected Health Information (PHI) through any AI solutions, we are committed to full HIPAA compliance regarding the privacy and security of such data.
  6. General Data Protection Regulation (GDPR) / California Consumer Privacy Act (CCPA): As an AI company operating globally or handling data from residents of certain regions, SynthAI Labs is committed to compliance with GDPR, CCPA, and other relevant data privacy regulations concerning the collection, processing, and storage of personal data. Employees involved in data handling or AI model training must be trained on these regulations.

B. Company-Specific Compliance

  1. Data Security & Privacy Regulations (AI Specific): All employees involved in the development, deployment, or use of AI systems must adhere to SynthAI Labs' internal data security and privacy policies, which are designed to exceed industry standards and comply with international AI-specific data governance frameworks. This includes secure coding practices for AI, secure model deployment, and ongoing monitoring for data breaches.
  2. Intellectual Property Protections (AI Specific): Strict adherence to the Intellectual Property Assignment Agreement is mandatory. This protects our proprietary algorithms, models, datasets, and research. Unauthorized use or sharing of company IP, including open-source contributions of company-developed AI components without explicit approval, is prohibited.
  3. Export Control Regulations: Employees involved in developing or exporting AI technologies that could have dual-use (civilian and military) applications must be aware of and comply with all applicable export control regulations (e.g., ITAR, EAR).
  4. Reporting Mechanisms: SynthAI Labs maintains an open-door policy. Employees are encouraged to discuss concerns with their manager, HR, or through an anonymous reporting hotline [if applicable, provide details]. Retaliation against employees who report concerns in good faith is strictly prohibited.
  5. Handbook Disclaimer: This handbook is a guide for employees and is not intended to create a contract of employment, express or implied, between SynthAI Labs and any employee. The policies, procedures, and benefits described herein are subject to change at the sole discretion of SynthAI Labs, with or without notice.

Next Steps & Recommendations:

  1. Review and Customize: This handbook is a template. [Company Name] should replace "SynthAI Labs" throughout. Fill in specific details for benefits (e.g., insurance providers, 401k match), PTO accrual rates, and specific remote work policies.
  2. Legal Counsel Review: It is highly recommended that this handbook be reviewed by legal counsel specializing in employment law to ensure full compliance with all applicable federal, state, and local regulations relevant to your specific location and industry.
  3. Distribution and Acknowledgment: Once finalized, distribute the handbook to all employees. Require each employee to sign an acknowledgment form confirming they have received, read, and understood the handbook's contents.
  4. Training: Conduct introductory training sessions for new hires and periodic refreshers for all employees, especially on critical sections like the Code of Conduct, Ethical AI Use, and Data Privacy.
  5. Regular Updates: Establish a process for regularly reviewing and updating the handbook (e.g., annually or as laws/policies change) to ensure it remains current and relevant.
  6. HR Point of Contact: Clearly designate the HR department or a specific individual as the primary point of contact for any questions or clarifications regarding the handbook.

This comprehensive handbook provides a robust foundation for SynthAI Labs, emphasizing the unique considerations of an AI technology company.

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