Employee Handbook Generator
Run ID: 69cc2c37fdffe128046c53972026-03-31HR
PantheraHive BOS
BOS Dashboard

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

Step 1: Analyze Requirements - Employee Handbook Generator

This document outlines the comprehensive requirements analysis, design specifications, wireframe descriptions, color palettes, and user experience (UX) recommendations for the "Employee Handbook Generator" tool. The goal is to create a robust, intuitive, and legally informed platform that enables companies to generate professional employee handbooks efficiently.


1. Requirements Analysis

The core requirement is to generate a comprehensive employee handbook. This involves a structured approach to policy creation, customization, and final output.

1.1 Core Handbook Content Sections

The generator must support the following essential sections, with detailed sub-policies and customizable content:

  1. Welcome & Introduction:

* Welcome message from leadership.

* Company mission, vision, and values.

* Purpose of the handbook and legal disclaimer (not a contract).

* Employment-at-will statement (if applicable).

  1. General Employment Policies:

* Equal Employment Opportunity (EEO) statement.

* Anti-Harassment and Anti-Discrimination policy.

* Workplace Conduct and Professionalism.

* Conflict of Interest.

* Confidentiality and Data Protection.

* Intellectual Property.

* Workplace Safety and Health.

* Drug-Free Workplace.

* Workplace Violence Prevention.

* Social Media Policy.

* Technology and Communication Systems Usage.

* Dress Code and Appearance.

* Remote Work / Hybrid Work Policy (if applicable).

  1. Compensation & Benefits:

* Pay Periods and Overtime.

* Performance Reviews and Salary Adjustments.

* Health Insurance (Medical, Dental, Vision).

* Retirement Plans (e.g., 401(k)).

* Life Insurance and Disability Benefits.

* Employee Assistance Programs (EAP).

* Tuition Reimbursement / Professional Development.

* Expense Reimbursement.

  1. Leave Policies:

* Paid Time Off (PTO) / Vacation Policy.

* Sick Leave Policy.

* Company Holidays.

* Bereavement Leave.

* Jury Duty Leave.

* Family and Medical Leave Act (FMLA) policy (if applicable).

* Parental Leave (Maternity/Paternity).

* Military Leave.

* Personal Leave of Absence.

* Short-Term and Long-Term Disability Leave.

  1. Performance & Disciplinary Actions:

* Performance Management and Expectations.

* Disciplinary Procedures.

* Grievance and Complaint Resolution Process.

* Anti-Retaliation Policy.

  1. Separation of Employment:

* Resignation Procedures.

* Termination Procedures.

* Exit Interviews.

* Return of Company Property.

* Final Paycheck and Benefits Continuation (COBRA).

  1. Compliance & Acknowledgment:

* Americans with Disabilities Act (ADA) statement.

* HIPAA Privacy (if applicable).

* OSHA Compliance.

* State-specific legal requirements (e.g., paid sick leave laws).

* Employee Handbook Acknowledgment Form (printable and signable).

1.2 Customization & Flexibility

  • Company Branding: Ability to upload company logo, specify company name, address, and contact information.
  • Policy Selection: Users can enable or disable specific policies and sections relevant to their company.
  • Content Editing: WYSIWYG editor for customizing text within each policy, adding specific company details, and inserting custom sections.
  • Placeholder Variables: Dynamic insertion of company-specific details (e.g., [COMPANY_NAME], [COMPANY_ADDRESS]) throughout the handbook.
  • Legal Disclaimers: Automated insertion of standard legal disclaimers, with options for user review and acknowledgment.

1.3 Output & Delivery

  • PDF Generation: Primary output format, professionally formatted, hyperlinked table of contents.
  • DOCX Generation (Optional): Ability to download an editable Word document for further internal adjustments.
  • Printable Acknowledgment: A separate, formatted page for employees to sign and return.

2. Detailed Design Specifications

2.1 Functional Specifications

  • User Authentication & Authorization:

* Secure login process for HR administrators/authorized users.

* Role-based access control (e.g., view-only, edit, publish).

  • Company Profile Management:

* Dedicated section to input and store company details (name, logo, address, industry, number of employees, legal entity type).

* This data populates placeholders throughout the handbook.

  • Handbook Project Management:

* Dashboard to view, create, edit, duplicate, and delete multiple handbook projects.

* Versioning control to track changes and revert to previous versions.

  • Policy Configuration Interface:

* Categorized list of policies and sections.

* Toggle switches to enable/disable policies.

* Conditional logic: If a policy is enabled, present relevant sub-options or required fields (e.g., if FMLA is enabled, ask for company size).

  • Content Editor:

* Rich Text Editor (WYSIWYG) with standard formatting tools (bold, italic, underline, lists, headings, links).

* Macro/placeholder insertion tool for company-specific variables.

* Ability to add, reorder, and delete custom sections.

  • Preview Functionality:

* Real-time or

gemini Output

The following content is a comprehensive and professionally drafted Employee Handbook, designed to serve as a foundational document for your organization. It covers essential policies, benefits, conduct expectations, leave procedures, and compliance guidelines. Please review, customize with your specific company details, and disseminate to your employees.


Welcome to [Company Name]: Your Guide to Success

Introduction: Your Journey Starts Here

Welcome to the team at [Company Name]! We are thrilled to have you join our growing family. This Employee Handbook is designed to be your essential guide, providing you with a clear understanding of our company culture, policies, procedures, and the benefits available to you.

At [Company Name], we believe that our success is built upon the talent, dedication, and professionalism of our employees. This handbook outlines the expectations we have for each other, ensures a fair and respectful workplace, and helps you understand how you contribute to our collective mission.

Please take the time to read through this handbook carefully. It is an important resource that will answer many of your questions and help you integrate smoothly into our organization. Should you have any questions after reviewing, please do not hesitate to reach out to your manager or the Human Resources department.

We are excited about your future with [Company Name] and look forward to achieving great things together!

Sincerely,

The Leadership Team at [Company Name]


Table of Contents

  1. Our Company & Culture

* Welcome Message from Leadership

* Our Vision, Mission, and Values

* Our Commitment to You

  1. Employment Basics

* Employment-At-Will

* Equal Employment Opportunity (EEO)

* Hiring & Onboarding

* Performance Management & Development

  1. Workplace Conduct & Expectations

* Code of Conduct

* Professionalism & Respect

* Anti-Harassment & Discrimination Policy

* Diversity, Equity, and Inclusion (DEI)

* Conflict Resolution

  1. Compensation & Benefits

* Compensation Philosophy

* Pay Periods & Overtime

* Comprehensive Benefits Package Overview

  1. Time Off & Leave Policies

* Paid Time Off (PTO)

* Company Holidays

* Sick Leave

* Bereavement Leave

* Family & Medical Leave Act (FMLA)

* Jury Duty Leave

* Military Leave

6. Workplace Safety & Security

* Safety Procedures

* Emergency Preparedness

* Workplace Violence Prevention

* Data & Information Security

  1. Use of Company Property & Resources

* Company Equipment

* Internet, Email & Communication Systems

* Social Media Policy

* Expense Reimbursement

  1. Confidentiality & Intellectual Property

* Confidential Information

* Intellectual Property

  1. Employee Development & Growth

* Learning & Development

* Performance Reviews & Feedback

  1. Disciplinary Action & Termination

* Progressive Discipline

* Termination of Employment

* Exit Procedures

  1. Compliance & Legal

* Non-Discrimination & Anti-Retaliation

* Americans with Disabilities Act (ADA)

* Whistleblower Policy

* Data Privacy

* Drug-Free Workplace Policy

  1. Important Disclaimers
  2. Employee Acknowledgement Form
  3. Contact Information

1. Our Company & Culture

Welcome Message from Leadership

On behalf of the entire leadership team, I extend a heartfelt welcome to you. We are genuinely excited that you've chosen to build your career with [Company Name]. We believe in fostering an environment where innovation thrives, collaboration is celebrated, and every individual feels valued and empowered to make a significant impact. Your unique skills and perspectives are vital to our continued growth and success. We look forward to seeing you flourish here.

Our Vision, Mission, and Values

Our Vision: [Insert Company Vision Statement - e.g., To be the leading innovator in our industry, creating unparalleled value for our customers and communities.]

Our Mission: [Insert Company Mission Statement - e.g., To deliver exceptional products/services through cutting-edge technology, sustainable practices, and a commitment to customer satisfaction.]

Our Core Values: These values guide our decisions, actions, and interactions every day:

  • Integrity: We act with honesty, transparency, and ethical conduct in all we do.
  • Innovation: We embrace creativity, continuous improvement, and forward-thinking solutions.
  • Collaboration: We foster teamwork, open communication, and mutual respect to achieve shared goals.
  • Customer Focus: We are dedicated to understanding and exceeding the expectations of our customers.
  • Excellence: We strive for the highest standards in our work and commit to continuous learning and growth.
  • [Add any other specific company values]

Our Commitment to You

[Company Name] is committed to creating a positive, supportive, and engaging workplace. We pledge to:

  • Provide a safe and healthy work environment.
  • Offer opportunities for professional development and growth.
  • Recognize and reward your contributions.
  • Promote a culture of respect, diversity, and inclusion.
  • Maintain open lines of communication.

2. Employment Basics

Employment-At-Will

[Company Name] maintains an "employment-at-will" relationship with its employees. This means that either the employee or [Company Name] may terminate the employment relationship at any time, with or without cause, and with or without notice, subject to applicable federal and state laws. Nothing in this handbook is intended to create a contract of employment, express or implied, for a definite term.

Equal Employment Opportunity (EEO)

[Company Name] is an Equal Opportunity Employer. We are committed to providing a workplace free from discrimination and harassment. All employment decisions, including those related to recruitment, hiring, training, promotion, compensation, benefits, and termination, are based on qualifications, merit, and business needs, without regard to race, color, religion, sex, national origin, age, disability, veteran status, sexual orientation, gender identity, or any other characteristic protected by law.

Hiring & Onboarding

Our hiring process is designed to identify individuals who share our values and possess the skills necessary to contribute to our success. Once hired, our comprehensive onboarding program will help you acclimate to your new role, understand our operations, and connect with your colleagues.

Performance Management & Development

We believe in continuous growth. Performance management at [Company Name] is an ongoing process involving regular feedback, goal setting, and formal performance reviews. These discussions are designed to help you understand your strengths, identify areas for development, and align your contributions with company objectives. We encourage proactive engagement in your own professional development.


3. Workplace Conduct & Expectations

Code of Conduct

Our Code of Conduct outlines the fundamental principles that govern our behavior and interactions at [Company Name]. It is built on our core values and ensures a professional, respectful, and ethical workplace for everyone. All employees are expected to:

  • Act with Integrity: Be honest and transparent in all business dealings. Avoid conflicts of interest.
  • Respect Others: Treat colleagues, customers, partners, and vendors with courtesy and dignity, regardless of differences.
  • Follow Laws and Policies: Adhere to all applicable laws, regulations, and company policies.
  • Protect Company Assets: Safeguard company property, information, and reputation.
  • Maintain Confidentiality: Protect sensitive company and client information.
  • Promote a Safe Environment: Contribute to a workplace free from harassment, discrimination, and violence.

Professionalism & Respect

Employees are expected to maintain a professional demeanor and appearance appropriate for their role and our workplace environment. This includes:

  • Communication: Communicate respectfully, clearly, and constructively, whether in person, via email, or other channels.
  • Attendance & Punctuality: Be reliable, arrive on time for work and meetings, and notify your manager promptly of any anticipated absences or delays.
  • Dress Code: Adhere to the company's dress code policy, which is [describe briefly, e.g., business casual / professional / casual depending on role]. Consult your manager if you are unsure.
  • Work Ethic: Demonstrate dedication, responsibility, and a commitment to quality in all tasks.

Anti-Harassment & Discrimination Policy

[Company Name] has zero tolerance for harassment or discrimination of any kind. This includes, but is not limited to, harassment based on race, color, religion, sex (including pregnancy), national origin, age, disability, veteran status, sexual orientation, gender identity, or any other protected characteristic. Harassment includes unwelcome verbal, physical, or visual conduct that creates an intimidating, hostile, or offensive work environment.

  • Reporting: If you experience or witness harassment or discrimination, you must report it immediately to your manager, HR department, or another member of leadership.
  • Investigation: All reports will be thoroughly and promptly investigated with confidentiality maintained to the extent possible.
  • No Retaliation: [Company Name] strictly prohibits retaliation against any employee who reports harassment or discrimination in good faith or participates in an investigation.

Diversity, Equity, and Inclusion (DEI)

We are committed to fostering a diverse, equitable, and inclusive workplace where every employee feels a sense of belonging and has an equal opportunity to thrive. We believe that diverse perspectives drive innovation and strengthen our company. We strive to create an environment where differences are celebrated, and all voices are heard and respected.

Conflict Resolution

Disagreements or conflicts can arise in any workplace. We encourage employees to resolve minor issues directly and respectfully. If a conflict cannot be resolved, or if it involves sensitive issues, employees should:

  1. Discuss the issue with their direct manager.
  2. If the issue remains unresolved or involves the manager, contact the HR department.

All concerns will be handled professionally and confidentially to the extent possible.


4. Compensation & Benefits

Compensation Philosophy

[Company Name] is committed to providing fair, competitive, and equitable compensation that attracts, motivates, and retains high-performing employees. Our compensation structure is designed to recognize individual contributions, align with market rates, and reflect the company's overall success.

Pay Periods & Overtime

  • Pay Period: Employees are paid [e.g., bi-weekly / semi-monthly] on [e.g., Friday / 15th and last day of the month].
  • Method of Payment: Payments are made via direct deposit.
  • Overtime: Non-exempt employees are eligible for overtime pay at one and a half (1.5) times their regular hourly rate for hours worked over 40 in a workweek, in accordance with federal and state laws. All overtime must be pre-approved by your manager.

Comprehensive Benefits Package Overview

[Company Name] offers a comprehensive benefits package designed to support the health, financial well-being, and work-life balance of our employees and their families. Eligibility for specific benefits may vary based on employment status (full-time, part-time) and length of service.

  • Health Insurance:

* Medical, Dental, and Vision coverage options.

* [Briefly mention key features, e.g., multiple plan tiers, employer contribution, effective date].

  • Retirement Plans:

* [e.g., 401(k) plan] with [e.g., employer matching contributions].

* Eligibility requirements and vesting schedules apply.

  • Life & Disability Insurance:

* Company-

gemini Output

This document outlines a comprehensive, detailed, and professional Employee Handbook for your organization. It is designed to serve as a foundational guide for all employees, covering essential policies, benefits, code of conduct, leave policies, and compliance information.

This deliverable is structured to be immediately actionable, requiring you to customize specific details such as company name, contact information, and specific policy parameters (e.g., PTO accrual rates, holiday lists, benefit provider details).


[Company Name] Employee Handbook

Effective Date: [Date of Implementation]

Version: 1.0


Table of Contents

  1. Welcome to [Company Name]

* A Message from Leadership

* Our Mission, Vision, and Values

  1. About Your Employment

* Employment At-Will

* Equal Employment Opportunity (EEO)

* Anti-Harassment and Anti-Discrimination Policy

* Workplace Safety and Health

* Confidentiality and Data Protection

* Use of Company Property and Resources

* Social Media Policy

* Drug and Alcohol-Free Workplace

* Dress Code and Professional Appearance

* Performance Management and Reviews

* Disciplinary Action

* Termination of Employment

  1. Employee Benefits Overview

* Health Insurance (Medical, Dental, Vision)

* Retirement Plans (e.g., 401(k))

* Paid Holidays

* Other Benefits (Life Insurance, Disability, EAP, etc.)

  1. Code of Conduct and Ethics

* Professionalism and Respect

* Integrity and Ethical Behavior

* Conflict of Interest

* Reporting Misconduct

  1. Leave Policies

* Paid Time Off (PTO) / Vacation

* Sick Leave

* Bereavement Leave

* Jury Duty Leave

* Family and Medical Leave Act (FMLA)

* Other Leaves of Absence (Military Leave, Voting Leave, etc.)

  1. Compliance and Legal Information

* Americans with Disabilities Act (ADA)

* Worker's Compensation

* Personnel Records and Privacy

* Whistleblower Protection

* Workplace Violence Prevention

  1. Handbook Disclaimers
  2. Employee Acknowledgment Form

1. Welcome to [Company Name]

A Message from Leadership

Welcome to [Company Name]! We are thrilled to have you join our team. This handbook is designed to be a comprehensive guide to our company culture, policies, and expectations. It outlines the principles that govern our workplace, the benefits we offer, and the responsibilities we all share in creating a productive, respectful, and inclusive environment.

At [Company Name], we believe that our success is directly linked to the success and well-being of our employees. We are committed to fostering a workplace where every individual feels valued, respected, and empowered to contribute their best work. We encourage you to familiarize yourself with the contents of this handbook and to reach out to your manager or the HR Department with any questions.

Thank you for choosing to be a part of [Company Name]. We look forward to achieving great things together!

Sincerely,

The Leadership Team

Our Mission, Vision, and Values

  • Our Mission: \[Insert Company Mission Statement - e.g., "To innovate and deliver exceptional solutions that empower our clients to achieve their goals."]
  • Our Vision: \[Insert Company Vision Statement - e.g., "To be the leading provider of [industry/service] by fostering a culture of excellence, collaboration, and continuous improvement."]
  • Our Core Values:

* Innovation: We embrace creativity and continuously seek new ways to improve.

* Collaboration: We believe in teamwork and mutual support to achieve shared success.

* Integrity: We act with honesty, transparency, and ethical conduct in all our dealings.

* Customer Focus: We are dedicated to understanding and exceeding the expectations of our clients.

* Employee Growth: We invest in the development and well-being of our employees.


2. About Your Employment

Employment At-Will

Employment with [Company Name] is "at-will." This means that either you or the company may terminate the employment relationship at any time, with or without cause, and with or without notice, subject to applicable law. No representative of [Company Name] has the authority to enter into any agreement with you for employment for a specified period of time or to make any promises or commitments contrary to the foregoing, unless such agreement is in writing and signed by an authorized executive of the company.

Equal Employment Opportunity (EEO)

[Company Name] is an Equal Opportunity Employer. We are committed to providing a workplace free from discrimination and harassment. All employment decisions are based on business needs, job requirements, and individual qualifications, without regard to race, color, religion, sex (including pregnancy, gender identity, and sexual orientation), national origin, age, disability, genetic information, or any other characteristic protected by federal, state, or local law.

Anti-Harassment and Anti-Discrimination Policy

[Company Name] has a zero-tolerance policy for harassment and discrimination of any kind. This includes, but is not limited to, harassment based on race, color, religion, sex, national origin, age, disability, or any other legally protected characteristic. Harassment can take many forms, including verbal, physical, or visual conduct that creates an intimidating, hostile, or offensive work environment.

  • Reporting Procedure: Any employee who believes they have been subjected to harassment or discrimination, or who witnesses such conduct, is encouraged to report it immediately to their manager, the HR Department, or any member of the leadership team. All reports will be handled promptly, discreetly, and investigated thoroughly.
  • Non-Retaliation: [Company Name] strictly prohibits retaliation against any employee for reporting harassment or discrimination in good faith, or for participating in an investigation of such a complaint.

Workplace Safety and Health

The safety and well-being of our employees are paramount. [Company Name] is committed to providing a safe and healthy work environment.

  • Employee Responsibilities:

* Adhere to all safety rules and procedures.

* Report any unsafe conditions, hazards, or equipment immediately to your supervisor.

* Report all work-related injuries or illnesses, no matter how minor, to your supervisor and HR immediately.

* Participate in required safety training.

  • Emergency Procedures: Familiarize yourself with emergency exits, fire extinguishers, and evacuation plans. Information is posted in common areas and will be reviewed during onboarding.

Confidentiality and Data Protection

During your employment, you may have access to confidential and proprietary information belonging to [Company Name], its clients, and partners. This includes, but is not limited to, trade secrets, financial data, marketing strategies, client lists, employee records, and product designs.

  • Policy: Employees are strictly prohibited from disclosing, copying, or using confidential information for any purpose other than fulfilling their job duties. This obligation continues even after your employment with [Company Name] ends.
  • Data Security: Employees must adhere to all company policies regarding data security, including password protection, secure storage of electronic and physical documents, and proper use of company devices.

Use of Company Property and Resources

Company property, including equipment, vehicles, software, and electronic communication systems (email, internet, phones), is provided for business purposes.

  • Policy:

* Company property must be used responsibly, efficiently, and for legitimate business purposes.

* Incidental personal use of company resources (e.g., internet, email) is permitted but should not interfere with work duties, incur significant costs, or violate company policies.

* Employees should have no expectation of privacy when using company resources. [Company Name] reserves the right to monitor and access all data and communications on its systems and devices.

* Any damage, loss, or theft of company property must be reported immediately.

Social Media Policy

Employees are encouraged to be responsible and professional when using social media, whether for personal or business purposes.

  • Guidelines:

* Do not disclose confidential or proprietary company information.

* Do not post discriminatory, harassing, defamatory, or offensive content.

* Be mindful that your online conduct can reflect on [Company Name]. If you identify yourself as an employee of [Company Name], ensure your posts are consistent with our values and professional standards.

* Do not engage in discussions about clients, partners, or employees that could compromise confidentiality or create a negative impression.

Drug and Alcohol-Free Workplace

[Company Name] is committed to maintaining a drug and alcohol-free workplace to ensure the safety, health, and productivity of all employees.

  • Policy: The unlawful manufacture, distribution, possession, or use of controlled substances, and the consumption of alcohol, on company premises or during work hours is strictly prohibited. Employees must not report to work under the influence of illegal drugs or alcohol.
  • Testing: [Company Name] reserves the right to conduct drug and alcohol testing as permitted by law, including pre-employment, reasonable suspicion, post-accident, and random testing.
  • Consequences: Violation of this policy will result in disciplinary action, up to and including termination of employment.

Dress Code and Professional Appearance

Employees are expected to dress in a manner appropriate for a professional business environment and their specific job duties.

  • General Guidelines: Business casual attire is generally appropriate. Clothing should be neat, clean, well-maintained, and professional.
  • Client-Facing Roles: Employees in client-facing roles may be required to adhere to a more formal dress code, as specified by their manager.
  • Safety: Certain roles may require specific protective clothing or gear, which must be worn as directed.
  • HR Department can provide clarification on appropriate dress if needed.

Performance Management and Reviews

[Company Name] is committed to supporting employee growth and development. Our performance management process includes:

  • Goal Setting: Regular discussions between employees and managers to set clear, measurable goals.
  • Regular Feedback: Ongoing feedback and coaching to help employees improve and succeed.
  • Performance Reviews: Formal performance reviews will be conducted [e.g., annually, semi-annually] to assess performance, discuss achievements, identify areas for development, and set future objectives.

Disciplinary Action

When an employee's conduct or performance falls below established standards, [Company Name] may implement progressive disciplinary action. The specific action taken will depend on the severity and nature of the infraction, and the employee's past record.

  • Examples of Disciplinary Actions: Verbal warning, written warning, performance improvement plan, suspension (paid or unpaid), and termination of employment.
  • Examples of Misconduct: Insubordination, violation of company policies, poor performance, unauthorized absences, theft, harassment, or other behaviors detrimental to the company.

Termination of Employment

Employment with [Company Name] may be terminated by either the employee or the company.

  • Voluntary Termination: Employees are requested to provide at least two (2) weeks' written notice to their manager and the HR Department.
  • Involuntary Termination: [Company Name] may terminate employment for various reasons, including poor performance, misconduct, policy violations, or business needs.
  • Final Paycheck: Final paychecks, including any accrued and unused vacation/PTO (as per state law and company policy), will be issued in accordance with applicable state laws.
  • Company Property Return: All company property (e.g., laptops, keys, ID badges) must be returned on or before the last day of employment.

3. Employee Benefits Overview

[Company Name] offers a comprehensive benefits package designed to support the health, financial well-being, and work-life balance of our eligible employees. Specific details regarding eligibility, enrollment, and plan options are available from the HR Department.

Health Insurance (Medical, Dental

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