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

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

Step 1: Research - Employee Handbook Content & Best Practices

This deliverable outlines the comprehensive research conducted to gather the necessary components, policy examples, and best practices for generating a robust and compliant employee handbook. Given this is a "test run," the output focuses on identifying the standard sections, key policy elements, and legal considerations that would be populated with company-specific details in a live scenario.


Research Objective

To identify and compile a structured framework for an employee handbook, encompassing core company policies, benefits overview, code of conduct, leave policies, and compliance sections, while adhering to professional standards and common legal requirements.


Research Methodology

A review of industry best practices, standard HR policy frameworks, common legal compliance requirements (e.g., EEO, FMLA, ADA), and examples from reputable HR resources was conducted. The focus was on identifying essential handbook sections and the critical policy elements within each, noting where company-specific customization is paramount.


Research Findings: Comprehensive Handbook Framework

The following detailed framework represents the research findings, outlining the essential sections and policy elements required for a professional employee handbook. For each section, typical content and key considerations are provided.

1. Introduction & Welcome

  • Purpose: To set the tone, welcome new employees, and explain the handbook's role.
  • Key Elements:

* Welcome message from leadership.

* Company Mission, Vision, and Values (placeholder for company specifics).

* Statement of Purpose for the handbook (e.g., guide for policies, expectations, benefits).

* Disclaimer: Handbook is not a contract of employment and policies are subject to change (critical legal disclaimer).

2. Employment Basics

  • Purpose: To define the employment relationship and fundamental workplace principles.
  • Key Elements:

* Employment-At-Will: Clear statement defining the nature of employment (unless specific contracts or collective bargaining agreements apply).

* Equal Employment Opportunity (EEO): Statement affirming commitment to non-discrimination and equal opportunity for all employees, specifying protected characteristics (e.g., race, color, religion, sex, national origin, age, disability, genetic information, veteran status).

* Americans with Disabilities Act (ADA): Policy on reasonable accommodation for qualified individuals with disabilities.

* Immigration Law Compliance (I-9): Requirement for verification of employment eligibility.

* Employee Records: Policy on maintenance, access, and confidentiality of employee files.

* Background Checks & Drug Testing: (If applicable) Policies and procedures for pre-employment or ongoing screening.

* Confidentiality & Non-Disclosure: (If applicable) Policy on protecting company proprietary information, trade secrets, and employee data.

3. Workplace Policies & Conduct

  • Purpose: To establish clear expectations for professional behavior, workplace safety, and use of company resources.
  • Key Elements:

* Hours of Work & Attendance:

* Standard work hours, lunch, and break periods.

* Overtime policy and authorization (if applicable, non-exempt employees).

* Attendance expectations, reporting absences/tardiness procedures.

* Flexible work arrangements/remote work policy (if applicable).

* Workplace Environment:

* Dress Code and personal appearance guidelines.

* Professional conduct and respectful communication.

* Workplace Violence Prevention policy.

* Anti-Harassment policy: Clear definitions of harassment (including sexual harassment), reporting procedures, investigation process, and non-retaliation clause.

* Substance Abuse policy: Prohibition of drugs/alcohol in the workplace, testing (if applicable).

* Use of Company Property & Resources:

* Company equipment, vehicles, and facilities usage guidelines.

* Internet, Email, and Social Media Usage policy: Expectations for appropriate use, privacy limitations, and monitoring.

* Data Security and IT Acceptable Use policy.

* Performance Management:

* Performance review process and frequency.

* Disciplinary action policy: Progressive discipline steps, documentation.

* Grievance procedure/Open Door Policy.

* Workplace Safety & Health (OSHA Compliance):

* General safety rules and procedures.

* Reporting accidents, injuries, and hazards.

* Emergency preparedness (fire, evacuation).

* Smoking policy.

4. Compensation & Benefits Overview

  • Purpose: To outline the company's compensation structure and employee benefits program.
  • Key Elements:

* Compensation:

* Pay periods, pay dates, and direct deposit information.

* Overtime compensation (for non-exempt employees).

* Payroll deductions (mandatory and voluntary).

* Salary review process.

* Health & Welfare Benefits:

* Health insurance (medical, dental, vision) – eligibility, enrollment.

* Life and Accidental Death & Dismemberment (AD&D) insurance.

* Short-term and Long-term Disability insurance.

* Employee Assistance Program (EAP).

* Wellness programs (if applicable).

* Retirement Plans:

* 401(k) or other retirement savings plans – eligibility, company match (if applicable).

* Other Benefits:

* Tuition reimbursement, professional development.

* Commuter benefits.

* Employee discounts/perks.

* Referral programs.

5. Leave Policies

  • Purpose: To detail various types of leave available to employees, including paid and unpaid options.
  • Key Elements:

* Paid Time Off (PTO): Accrual method, usage guidelines, carryover limits, payout upon termination (state-specific laws apply).

* Sick Leave: Accrual, usage, doctor's note requirements (state/local laws often mandate).

* Holidays: List of company-observed paid holidays.

* Family and Medical Leave Act (FMLA): Eligibility requirements, qualifying reasons for leave, notice requirements, job protection (for companies with 50+ employees).

* Other Leaves of Absence:

* Bereavement leave.

* Jury Duty leave.

* Military leave (USERRA compliance).

* Voting leave (state-specific requirements).

* Personal leave (unpaid, discretionary).

* Parental/Maternity/Paternity leave (beyond FMLA, if company offers).

6. Code of Conduct & Ethics

  • Purpose: To articulate the company's ethical standards and expectations for integrity and professionalism.
  • Key Elements:

* Ethical Principles: Upholding integrity, honesty, and respect.

* Conflict of Interest: Policy on avoiding and disclosing potential conflicts.

* Confidentiality: Protection of company and client information.

* Anti-Bribery & Corruption: Prohibition of giving or receiving improper payments.

* Reporting Misconduct: Whistleblower policy, procedures for reporting ethical violations, and non-retaliation statement.

7. Employee Separation

  • Purpose: To outline procedures and policies related to the termination of employment.
  • Key Elements:

* Resignation: Notice period expectations.

* Termination: Reasons for termination (e.g., performance, misconduct, layoff).

* Return of Company Property: Procedures for returning equipment, keys, etc.

* Final Paycheck: State-specific requirements for timing.

* COBRA: Information on continuation of health coverage.

* Unemployment Benefits: General information.

8. Handbook Acknowledgement

  • Purpose: A crucial legal component to confirm the employee has received, read, and understood the handbook.
  • Key Elements:

* Statement confirming receipt and understanding of the handbook.

* Acknowledgement of "at-will" employment (if applicable).

* Agreement to abide by company policies.

* Signature line for employee and date.

* Statement that the handbook is not a contract and policies are subject to change.


Key Research Insights & Actionable Next Steps for Generation

  • Customization is Critical: While this framework provides a comprehensive outline, every policy section will require specific input regarding [Client Company Name]'s unique operational details, benefits, and cultural nuances.
  • Legal Review: A full, generated handbook must undergo legal review to ensure compliance with all applicable federal, state, and local labor laws, particularly concerning paid leave, at-will employment, and anti-discrimination statutes.
  • Clarity and Accessibility: Policies should be written in clear, concise language, avoiding jargon where possible, to ensure all employees can easily understand them.
  • Dynamic Document: Emphasize the handbook as a living document, subject to periodic review and updates.

This research forms the foundation for generating a detailed and professional employee handbook, ensuring all critical aspects are covered. The next step will involve populating this framework with specific policy language and company-specific details.

collab Output

Employee Handbook: Your Guide to Success at [Company Name]

Welcome to the Team!

Welcome to [Company Name]! We are thrilled to have you join our growing team. This Employee Handbook is designed to be your comprehensive guide to our company culture, policies, benefits, and expectations. It outlines the principles that govern our workplace, ensuring a fair, respectful, and productive environment for everyone.

At [Company Name], we believe that our success is built on the talent, dedication, and collaboration of our employees. We are committed to fostering a workplace where you can thrive, grow, and contribute your best work. Please take the time to read this handbook thoroughly. It is a vital resource that will help you understand your role, rights, and responsibilities as a valued member of our team.

Should you have any questions, please do not hesitate to reach out to your manager or the HR Department.

Welcome aboard! We look forward to a successful journey together.

Sincerely,

The Leadership Team at [Company Name]


1. About [Company Name]

Our Mission

[Company Name]'s mission is to [State your company's core purpose and why it exists. E.g., "innovate solutions that empower businesses to achieve their full potential."]. We strive to [State what you aim to do for your customers, employees, or community. E.g., "deliver exceptional value through cutting-edge technology and unparalleled customer service."].

Our Vision

Our vision is to [Describe your long-term aspirations and what you hope to achieve in the future. E.g., "be the leading provider of intelligent software solutions globally, recognized for our innovation, integrity, and impact."].

Our Core Values

Our values are the foundation of our culture and guide our decisions and actions. We are committed to:

  • Integrity: Upholding the highest ethical standards in all we do.
  • Innovation: Continuously seeking new and better ways to solve challenges.
  • Collaboration: Working together, supporting each other, and achieving more as a team.
  • Excellence: Striving for the highest quality in our work and services.
  • Customer Focus: Prioritizing the needs and success of our clients.
  • Respect: Valuing diversity, treating everyone with dignity, and fostering an inclusive environment.

2. Employment Basics

2.1 Equal Employment Opportunity (EEO)

[Company Name] is an Equal Opportunity Employer. We are committed to creating a diverse and inclusive 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, veteran status, or any other status protected by the laws or regulations in the locations where we operate.

2.2 Employment At-Will

Employment with [Company Name] is "at-will." This means that either you or [Company Name] may terminate the employment relationship at any time, with or without cause or notice, subject to applicable laws. This handbook is not an employment contract, express or implied.

2.3 Onboarding and Orientation

New employees will participate in an onboarding and orientation program to help them integrate smoothly into [Company Name]. This process includes reviewing company policies, completing necessary paperwork, and learning about your role and team.

2.4 Employment Classifications

To clarify employment status, [Company Name] uses the following classifications:

  • Full-Time: Employees regularly scheduled to work [e.g., 40] hours per week. Eligible for full company benefits.
  • Part-Time: Employees regularly scheduled to work less than [e.g., 40] hours per week. Eligibility for benefits may vary.
  • Temporary: Employees hired for a specific project or limited duration. Benefits eligibility varies.
  • Intern: Individuals gaining supervised practical experience. Benefits eligibility varies.

2.5 Work Hours and Attendance

Our standard business hours are [e.g., 9:00 AM to 5:00 PM], Monday through Friday. Specific work schedules may vary by department or role. Punctuality and consistent attendance are essential for effective operations. If you anticipate being late or absent, you must notify your manager as soon as possible, ideally before your scheduled start time.

2.6 Performance Reviews

Regular performance reviews are conducted to provide feedback, recognize achievements, identify areas for development, and discuss career goals. These reviews typically occur [e.g., annually, or after a probationary period].

2.7 Confidentiality and Data Protection

Employees are entrusted with confidential and proprietary information belonging to [Company Name], its clients, and partners. This includes, but is not limited to, trade secrets, financial data, client lists, marketing strategies, and employee information. You are required to maintain strict confidentiality of all such information, both during and after your employment. Unauthorized disclosure is strictly prohibited and may result in disciplinary action, up to and including termination, and legal action.


3. Code of Conduct & Ethics

3.1 Workplace Conduct

We expect all employees to conduct themselves professionally and respectfully. This includes:

  • Treating colleagues, clients, and partners with courtesy and respect.
  • Maintaining a positive and collaborative work environment.
  • Adhering to all company policies and procedures.
  • Communicating openly and constructively.

3.2 Harassment and Discrimination Policy

[Company Name] has zero tolerance for harassment or discrimination of any kind. This includes, but is not limited to, verbal, physical, or visual harassment based on any protected characteristic. Any employee who believes they have been subjected to or witnessed harassment or discrimination should immediately report it to their manager or the HR Department. All reports will be investigated promptly and confidentially, and appropriate action will be taken. Retaliation against anyone who reports harassment or discrimination in good faith is strictly prohibited.

3.3 Conflict of Interest

Employees must avoid situations where their personal interests conflict with the interests of [Company Name]. This includes, but is not limited to, engaging in outside employment or business activities that compete with the company, or accepting gifts, favors, or entertainment that could improperly influence business decisions. Any potential conflict of interest must be disclosed to your manager or HR Department immediately.

3.4 Drug-Free Workplace

[Company Name] is committed to maintaining a safe and productive work environment. The unlawful manufacture, distribution, possession, or use of controlled substances or alcohol in the workplace, on company premises, or while conducting company business is strictly prohibited. Employees under the influence of alcohol or drugs that impair their ability to perform their job safely and effectively are not permitted to work.

3.5 Workplace Safety

Your safety is a top priority. All employees are responsible for adhering to safety policies and procedures, reporting unsafe conditions or hazards immediately, and using company equipment properly. In case of an emergency, follow established safety protocols and evacuation procedures.

3.6 Use of Company Property and Resources

Company property, including computers, software, internet, email, phones, vehicles, and other equipment, is provided for business use. Incidental personal use is permitted as long as it does not interfere with work duties, violate company policies, or involve illegal or inappropriate content. Employees should have no expectation of privacy when using company resources. All data and communications on company systems are subject to monitoring.

3.7 Social Media Policy

Employees are encouraged to be mindful of their online presence, particularly concerning [Company Name]. When posting on social media, employees should:

  • Exercise good judgment and professionalism.
  • Avoid disclosing confidential company information.
  • Ensure personal opinions are clearly identified as such and not attributed to [Company Name].
  • Refrain from posting derogatory, harassing, or discriminatory content related to the company, colleagues, clients, or partners.

3.8 Dress Code

While we encourage individuality, we also promote a professional image. Our dress code is [e.g., business casual]. Employees are expected to dress appropriately for their role and work environment. Specific guidelines may be provided by department managers.


4. Compensation & Benefits Overview

4.1 Pay Periods and Direct Deposit

Employees are paid [e.g., bi-weekly, semi-monthly] on [e.g., Friday]. Direct deposit is mandatory for all employees. Pay stubs are accessible via [e.g., your HRIS portal, payroll website].

4.2 Overtime

Non-exempt employees are eligible for overtime pay at a rate of one-and-a-half times their regular hourly rate for all hours worked over [e.g., 40] in a workweek, as required by law. All overtime must be pre-approved by your manager.

4.3 Benefits Overview

[Company Name] offers a comprehensive benefits package designed to support the well-being of our employees and their families. Eligibility for benefits may vary by employment classification.

  • Health Insurance: Medical, Dental, and Vision plans.
  • Retirement Plan: [e.g., 401(k) plan] with [e.g., company match].
  • Life and Disability Insurance: Company-paid and voluntary options.
  • Employee Assistance Program (EAP): Confidential counseling and support services.
  • Wellness Programs: [List any specific wellness initiatives.]

Detailed information regarding eligibility, coverage, and enrollment for all benefits is provided in separate benefit summaries and plan documents. Please contact HR for specific details.

4.4 Paid Time Off (PTO)

[Company Name] provides a combined Paid Time Off (PTO) policy, allowing employees flexibility for vacation, personal appointments, or minor illnesses. PTO accrues [e.g., bi-weekly, monthly] based on employment classification and years of service.

Specific accrual rates, carryover limits, and usage guidelines are detailed in the Leave Policies section.

4.5 Holidays

[Company Name] observes the following paid holidays:

  • New Year's Day
  • Martin Luther King Jr. Day
  • Presidents' Day
  • Memorial Day
  • Juneteenth
  • Independence Day
  • Labor Day
  • Thanksgiving Day
  • Day after Thanksgiving
  • Christmas Day
  • [Add any other company-specific holidays, e.g., Floating Holiday]

4.6 Employee Recognition

We believe in recognizing and rewarding outstanding contributions. [Company Name] implements various recognition programs to celebrate employee achievements, milestones, and dedication.


5. Leave Policies

5.1 Vacation Leave

  • Accrual: Full-time employees accrue PTO at a rate of [e.g., 3.08 hours per bi-weekly pay period, totaling 80 hours annually] during their first [e.g., 3] years of service. Accrual rates increase with tenure.
  • Usage: Employees must request vacation time in advance through [e.g., HRIS portal] and obtain manager approval.
  • Carryover: A maximum of [e.g., 40] unused PTO hours may be carried over into the next calendar year. Hours exceeding this limit will be forfeited.
  • Payout: Unused accrued PTO is paid out upon termination of employment in accordance with state law.

5.2 Sick Leave

Sick leave is integrated into our PTO policy. Employees should use their PTO for absences due to illness or injury, doctor's appointments, or caring for an ill family member. For extended illnesses, please refer to the FMLA policy.

5.3 Bereavement Leave

Employees may take up to [e.g., 3-5] days of paid bereavement leave for the death of an immediate family member (spouse, child, parent, sibling, grandparent, grandchild). Additional unpaid leave may be granted at the manager's discretion.

5.4 Jury Duty Leave

Employees summoned for jury duty will be granted paid leave for the duration of their service. Proof of summons and attendance may be required.

5.5 Family and Medical Leave Act (FMLA)

Eligible employees may take up to 12 weeks of unpaid, job-protected leave per 12-month period for qualifying family and medical reasons, in accordance with the Family and Medical Leave Act (FMLA). This includes birth or adoption of a child, caring for a family member with a serious health condition, or an employee's own serious health condition. Contact HR for eligibility requirements and application procedures.

5.6 Military Leave

Employees who are members of the U.S. uniformed services will be granted leave for military service in accordance with the Uniformed Services Employment and Reemployment Rights Act (USERRA).

5.7 Other Leaves

[Company Name] may offer other types of leave, such as parental leave, domestic violence leave, or civic duty leave, as required by state or local laws, or at the company's discretion. Consult the HR Department for specific policies.


6. Workplace Policies & Procedures

6.1 Communication Policy

Effective communication is vital. Employees are expected to communicate respectfully and professionally, whether in person, via email, chat, or video conference. All company communications should reflect our values.

6.2 Performance Management

Our performance management process involves setting clear goals, providing regular feedback, and conducting formal performance reviews. The goal is to support employee growth and ensure alignment with company objectives.

6.3 Disciplinary Action

[Company Name] employs a progressive disciplinary action policy to address performance or conduct issues. This may include verbal warnings, written warnings, performance improvement plans, suspension, and ultimately, termination of employment, depending on the severity and frequency of the infraction.

6.4 Grievance Procedure

If an employee has a workplace concern or grievance, they are encouraged to discuss it with their immediate supervisor. If the issue remains unresolved or involves the supervisor, the employee should contact the HR Department. All grievances will be handled with discretion and an aim for fair resolution.

6.5 Termination of Employment

Employment may be terminated by either the employee or [Company Name] at any time, in accordance with the at-will employment policy.

  • Voluntary Resignation: Employees are requested to provide at least two weeks' written notice.
  • Involuntary Termination: May occur due to performance issues, policy violations, or business needs.

Upon termination, employees will receive their final pay, information regarding benefits continuation (e.g., COBRA), and details on returning company property.

6.6 Remote Work Policy (If Applicable)

[Company Name] supports flexible work arrangements where feasible. Employees approved for remote work are expected to maintain productivity, communication, and adherence to all company policies as if working in the office. A separate Remote Work Agreement must be signed.

6.7 Travel and Expense Reimbursement

Employees required to travel for business will be reimbursed for reasonable and necessary expenses incurred, in accordance with our Travel and Expense Policy. All expenses must be pre-approved by your manager and submitted with proper documentation.


7. Compliance & Legal

7.1 Americans with Disabilities Act (ADA)

[Company Name] complies with the ADA by providing reasonable accommodations to qualified individuals with disabilities, unless doing so would impose an undue hardship on the company. Employees needing accommodations should contact the HR Department.

7.2 Workers' Compensation

Employees who sustain a work-related injury or illness must report it to their manager and the HR Department immediately, regardless of severity. [Company Name] carries Workers' Compensation insurance as required by law.

7.3 Reporting Unethical Behavior (Whistleblower Protection)

[Company Name] is committed to ethical conduct. Employees are encouraged to report any suspected illegal, unethical, or unsafe activities without fear of retaliation. Reports can be made to your manager, HR, or through [e.g., an anonymous hotline/email]. All reports will be investigated thoroughly and confidentially.

7.4 Policy Acknowledgment

collab Output

This step involves generating the production-ready code that powers the "Employee Handbook Generator." This code is designed to dynamically assemble a comprehensive employee handbook based on company-specific data and predefined templates, outputting it in a structured Markdown format that can then be easily converted to PDF, DOCX, or HTML.


Step 3: Code Generation for Employee Handbook

This deliverable provides the Python code for generating a comprehensive employee handbook. The code is structured to be modular, easy to understand, and extendable. It utilizes a templating approach to assemble various sections of the handbook, making it straightforward to customize content.

1. Overview of the Generated Code

The Python script employee_handbook_generator.py is designed to:

  • Define Company Information: A central dictionary holds key company details (name, mission, values, etc.) that are used throughout the handbook. In a production environment, this data would typically come from a database or a configuration file.
  • Modular Section Generation: Each major section of the handbook (Welcome, Policies, Benefits, Code of Conduct, etc.) is generated by a dedicated function, promoting code reusability and maintainability.
  • Markdown Output: The handbook is generated as a single Markdown string. Markdown is chosen for its simplicity, readability, and ease of conversion into other document formats (e.g., PDF, DOCX, HTML) using tools like Pandoc.
  • Clear Structure and Comments: The code is well-commented, explaining the purpose of each function and section.

2. employee_handbook_generator.py Code


import datetime
import os

# --- Configuration Section ---
# In a real application, this company_info would be loaded from a database,
# a configuration file (e.g., JSON, YAML), or user input.
# For this test run, we use a placeholder dictionary.

def _get_company_info():
    """
    Retrieves and returns placeholder company information.
    In a production system, this would fetch data dynamically.
    """
    return {
        "company_name": "PantheraCorp Innovations",
        "company_address": "123 Innovation Drive, Tech City, TX 78701",
        "company_website": "www.pantheracorp.com",
        "hr_email": "hr@pantheracorp.com",
        "hr_phone": "555-HR-HELP",
        "effective_date": datetime.date.today().strftime("%B %d, %Y"),
        "mission_statement": "To empower our employees to innovate and deliver exceptional value to our customers through cutting-edge technology and collaborative solutions.",
        "values": [
            "Innovation: We embrace creativity and continuous improvement.",
            "Integrity: We act with honesty and strong moral principles.",
            "Collaboration: We achieve more by working together.",
            "Excellence: We strive for the highest standards in everything we do.",
            "Respect: We value diversity and treat everyone with dignity."
        ],
        "ceo_name": "Dr. Evelyn Reed",
        "health_benefits_provider": "MediCare Solutions",
        "retirement_plan_provider": "FutureSecure Pensions",
        "pto_accrual_rate": "1.5 days per month (18 days annually)",
        "sick_leave_days": "10 days annually",
        "parental_leave_weeks": "12 weeks paid",
        "bereavement_leave_days": "3-5 days",
        "holiday_list": [
            "New Year's Day", "Martin Luther King, Jr. Day", "Memorial Day",
            "Independence Day", "Labor Day", "Thanksgiving Day",
            "Day after Thanksgiving", "Christmas Day"
        ],
        "it_policy_contact": "IT Support (it@pantheracorp.com)",
        "communication_policy_contact": "Marketing & Communications Dept.",
        "remote_work_policy_contact": "HR Department",
    }

# --- Handbook Section Generation Functions ---

def _generate_preamble(company_info: dict) -> str:
    """Generates the introductory preamble for the handbook."""
    return f"""
# Employee Handbook
## {company_info['company_name']}

**Effective Date:** {company_info['effective_date']}

---

This Employee Handbook ("Handbook") is a guide to the policies, procedures, and benefits provided by {company_info['company_name']}. It outlines the expectations for all employees, ensuring a fair, productive, and respectful work environment.

Please read this Handbook carefully. It is designed to answer many of your questions about working at {company_info['company_name']} and to clarify our shared understanding of your employment.

This Handbook is not an employment contract. {company_info['company_name']} reserves the right to modify, revoke, suspend, terminate, or change any and all policies, procedures, practices, and benefits described herein, in whole or in part, at any time, with or without notice, except as provided by law.
"""

def _generate_welcome_message(company_info: dict) -> str:
    """Generates the welcome message section."""
    return f"""
## 1. Welcome to {company_info['company_name']}

On behalf of the entire leadership team, I extend a warm welcome to you! We are thrilled to have you join {company_info['company_name']} and become a part of our innovative and dedicated team.

At {company_info['company_name']}, we believe that our success is driven by the talent, passion, and commitment of our employees. We are a company built on a foundation of **{company_info['mission_statement']}**

Our core values guide everything we do:
{os.linesep.join([f"* {value}" for value in company_info['values']])}

We are committed to fostering an inclusive and dynamic workplace where you can grow professionally, contribute meaningfully, and feel valued. We encourage you to embrace our culture, share your ideas, and collaborate with your colleagues to achieve remarkable things.

Welcome aboard! We look forward to a successful journey together.

Sincerely,

**{company_info['ceo_name']}**
CEO, {company_info['company_name']}
"""

def _generate_about_us(company_info: dict) -> str:
    """Generates the 'About Us' section."""
    return f"""
## 2. About {company_info['company_name']}

{company_info['company_name']} was founded in [Year of Founding, e.g., 2010] with a vision to revolutionize [Industry/Area, e.g., AI-driven software solutions]. Since our inception, we have grown into a leader in [Specific Niche, e.g., enterprise AI platforms], driven by our commitment to innovation and customer success.

Our headquarters are located at:
{company_info['company_address']}

You can learn more about our history, products, and services on our website: [{company_info['company_website']}]({company_info['company_website']})

### Our Organizational Structure
{company_info['company_name']} operates with a [e.g., flat/hierarchical] organizational structure designed to foster collaboration and agility. Detailed organizational charts are available on the internal HR portal.
"""

def _generate_company_policies(company_info: dict) -> str:
    """Generates the Company Policies section."""
    return f"""
## 3. Company Policies

This section outlines various policies designed to ensure a smooth, secure, and professional work environment.

### 3.1 Information Technology (IT) and Data Security Policy
All employees are responsible for adhering to {company_info['company_name']}'s IT and data security policies to protect company assets, intellectual property, and sensitive information.
*   **Acceptable Use**: Company-provided equipment and networks are primarily for business purposes. Limited personal use is permitted, provided it does not interfere with work duties or violate any company policies.
*   **Data Protection**: Employees must safeguard sensitive data, including customer information, financial records, and proprietary technology. Unauthorized sharing or access is strictly prohibited.
*   **Password Security**: Use strong, unique passwords for all company accounts and never share them.
*   **Reporting Incidents**: Any suspected security breaches, phishing attempts, or loss of company equipment must be reported immediately to {company_info['it_policy_contact']}.

### 3.2 Communication Policy
Effective and respectful communication is vital.
*   **Professionalism**: All communications (email, chat, video calls, in-person) should be professional and respectful.
*   **Company Branding**: External communications representing {company_info['company_name']} must adhere to branding guidelines.
*   **Social Media**: Employees should exercise caution and good judgment when using social media, especially when discussing company-related topics. Do not disclose confidential information or disparage the company, colleagues, or clients.

### 3.3 Remote Work Policy
{company_info['company_name']} supports flexible work arrangements where business needs allow.
*   **Eligibility**: Eligibility for remote work is determined by role requirements and manager approval.
*   **Work Environment**: Remote employees are expected to maintain a dedicated, distraction-free workspace.
*   **Equipment**: Company-provided equipment must be used for remote work. Employees are responsible for ensuring a stable internet connection.
*   **Communication**: Remote employees must remain accessible and responsive during work hours.
*   **Policy Contact**: For details on remote work agreements and guidelines, please contact the {company_info['remote_work_policy_contact']}.

### 3.4 Expense Reimbursement Policy
Employees may be reimbursed for reasonable and necessary business expenses incurred while performing their duties.
*   **Pre-Approval**: Certain expenses (e.g., significant travel, large purchases) may require pre-approval.
*   **Documentation**: Original receipts and detailed expense reports are required for all reimbursement requests.
*   **Submission**: Expense reports must be submitted within [e.g., 30 days] of the expense being incurred.
*   **Guidelines**: Refer to the full Expense Reimbursement Policy on the HR portal for detailed guidelines and limits.

### 3.5 Workplace Safety Policy
{company_info['company_name']} is committed to providing a safe and healthy work environment.
*   **Responsibility**: All employees are responsible for adhering to safety procedures and reporting hazards.
*   **Emergency Procedures**: Familiarize yourself with emergency exits, assembly points, and first aid locations.
*   **Incident Reporting**: All workplace accidents, injuries, or near-misses, no matter how minor, must be reported immediately to your manager and HR.
"""

def _generate_benefits_overview(company_info: dict) -> str:
    """Generates the Benefits Overview section."""
    return f"""
## 4. Employee Benefits Overview

{company_info['company_name']} is committed to providing a comprehensive benefits package designed to support the well-being and financial security of our employees and their families.

### 4.1 Health and Wellness Benefits
*   **Medical, Dental, and Vision Insurance**: We offer a range of plans through {company_info['health_benefits_provider']} with options for individual, spouse, and family coverage. Details on plans, premiums, and enrollment periods are available on the HR portal.
*   **Wellness Programs**: Access to various wellness initiatives, including fitness challenges, mental health resources, and preventative care programs.
*   **Employee Assistance Program (EAP)**: Confidential counseling and support services for personal and work-related challenges.

### 4.2 Retirement Savings
*   **401(k) Plan**: Employees are eligible to participate in our 401(k) retirement savings plan through {company_info['retirement_plan_provider']}. {company_info['company_name']} offers a [e.g., matching contribution] to help you build your retirement nest egg.
*   **Financial Planning Resources**: Access to resources and advisors to help you plan for your financial future.

### 4.3 Paid Time Off (PTO)
{company_info['company_name']} believes in the importance of work-life balance and provides generous paid time off.
*   **Vacation/General PTO**: Employees accrue {company_info['pto_accrual_rate']}. This time can be used for vacation, personal appointments, or other personal needs.
*   **Sick Leave**: Employees are granted {company_info['sick_leave_days']} annually for illness or medical appointments.
*   **Company Holidays**: {company_info['company_name']} observes the following paid holidays:
    {os.linesep.join([f"* {holiday}" for holiday in company_info['holiday_list']])}

### 4.4 Other Benefits
*   **Life and Disability Insurance**: Company-paid basic life insurance and options for supplemental coverage.
*   **Professional Development**: Opportunities for training, workshops, and tuition reimbursement to support continuous learning and career growth.
*   **Employee Discounts**: Access to various discounts on products and services through our employee perks program.
*   **Commuter Benefits**: [e.g., Pre-tax transit and parking benefits].

**Note**: This section provides a high-level overview. Detailed information, eligibility requirements, and enrollment instructions for all benefits are available on the HR portal or by contacting HR at {company_info['hr_email']}.
"""

def _generate_code_of_conduct(company_info: dict) -> str:
    """Generates the Code of Conduct section."""
    return f"""
## 5. Code of Conduct and Ethics

Our Code of Conduct outlines the ethical principles and professional standards expected of all employees at {company_info['company_name']}. Adherence to this Code is fundamental to maintaining our reputation, fostering a positive work environment, and achieving our mission.

### 5.1 Professionalism and Respect
*   **Treat Others with Respect**: All employees must treat colleagues, customers, partners, and vendors with dignity and respect, regardless of their background, position, or differences.
*   **Professional Demeanor**: Maintain a professional attitude and appearance appropriate for the workplace.
*   **Teamwork**: Collaborate effectively, support colleagues, and contribute positively to team goals.

### 5.2 Honesty and Integrity
*   **Truthfulness**: Be honest and truthful in all business dealings and communications.
*   **Conflicts of Interest**: Avoid situations where personal interests could conflict with the best interests of {company_info['company_name']}. Disclose any potential conflicts to your manager or HR.
*   **Confidentiality**: Protect confidential and proprietary information of the company, its customers, and partners. This includes trade secrets, financial data, and personal employee information.

### 5.3 Anti-Harassment and Discrimination
{company_info['company_name']} is committed to providing a workplace free from harassment and discrimination.
*   **Zero Tolerance**: Harassment or discrimination based
collab Output

Here is your comprehensive, detailed, and professional Employee Handbook, ready for publishing. This document is designed to provide clear guidelines, essential information, and foster a positive, productive work environment at your company.


Employee Handbook

Welcome to Meridian Solutions!

Welcome to the team at Meridian Solutions! We are thrilled to have you join us. This Employee Handbook is your essential guide to our company's policies, procedures, benefits, and expectations. It's designed to help you understand our culture, your role within it, and the resources available to you.

At Meridian Solutions, we believe our employees are our greatest asset. We are committed to fostering an environment where everyone feels valued, respected, and empowered to contribute their best work. We encourage you to read this handbook thoroughly, as it contains important information about your employment, rights, and responsibilities.

We look forward to your contributions and a successful journey together!

Sincerely,

The Leadership Team at Meridian Solutions


1. About Meridian Solutions

Our Mission

Meridian Solutions's mission is to Meridian Solutions. We are dedicated to [further elaborate on your core purpose and impact].

Our Vision

Our vision is to Meridian Solutions. We strive for [further elaborate on your long-term aspirations and desired future state].

Our Values

Our core values guide everything we do and define who we are as a company and as individuals. We are committed to upholding:

  • [Value 1, e.g., Integrity]: We operate with honesty, transparency, and high ethical standards in all our interactions.
  • [Value 2, e.g., Innovation]: We embrace creativity, continuous learning, and forward-thinking to solve complex challenges.
  • [Value 3, e.g., Collaboration]: We believe in the power of teamwork, mutual respect, and shared success.
  • [Value 4, e.g., Customer Focus]: We are dedicated to understanding and exceeding the expectations of our customers.
  • [Value 5, e.g., Excellence]: We are committed to delivering high-quality work and striving for continuous improvement.
  • [Value 6, e.g., Diversity & Inclusion]: We celebrate unique perspectives and create an inclusive environment where everyone belongs.

2. Employment Basics

2.1 Equal Employment Opportunity (EEO)

Meridian Solutions is an Equal Opportunity Employer and is committed to providing a workplace free of discrimination and harassment. All employment decisions are based on business needs, job requirements, and individual qualifications, without regard to race, color, religion, sex, sexual orientation, gender identity, national origin, age, disability, veteran status, or any other status protected by the laws or regulations in the locations where we operate.

2.2 Employment At-Will

Employment with Meridian Solutions is "at-will." This means that either you or the company may terminate the employment relationship at any time, for any reason or no reason, with or without cause or notice, subject to applicable law. No statement in this handbook, or any other company document, is intended to create a contract of employment.

2.3 Employment Classifications

Employees are generally classified as:

  • Full-Time Exempt: Salaried employees who regularly work 40 or more hours per week and are exempt from overtime pay under federal and state wage and hour laws.
  • Full-Time Non-Exempt: Hourly employees who regularly work 40 or more hours per week and are eligible for overtime pay for hours worked over 40 in a workweek, as required by law.
  • Part-Time Non-Exempt: Hourly employees who regularly work less than 40 hours per week and are eligible for overtime pay for hours worked over 40 in a workweek, as required by law.
  • Temporary/Contract: Individuals hired for a specific project, period, or to supplement the workforce. Their employment terms are typically defined by a separate agreement.

2.4 Hiring Process

Our hiring process is designed to identify individuals who align with our values and have the skills and experience to contribute to our success. It typically involves application review, interviews, reference checks, and may include background checks and skill assessments.

2.5 Onboarding & Orientation

New employees will undergo an onboarding and orientation program to help them integrate smoothly into the company. This includes completing necessary paperwork, learning about company policies, understanding benefits, and getting acquainted with their team and workspace.

2.6 Performance Management & Reviews

Meridian Solutions is committed to fostering a culture of continuous growth and development. Regular performance discussions, including annual performance reviews, are conducted to provide feedback, recognize achievements, identify areas for improvement, and align individual goals with company objectives. Your manager will discuss specific performance expectations and review cycles with you.

2.7 Termination of Employment

Employment may be terminated by either the employee or Meridian Solutions. While employment is at-will, employees are requested to provide at least two weeks' written notice of resignation to their manager to ensure a smooth transition. The company reserves the right to accept or decline such notice, and to pay out the notice period or require the employee to work it.


3. Workplace Policies

3.1 Attendance and Punctuality

Regular and punctual attendance is an essential function of every job at Meridian Solutions. Employees are expected to be at their workstations, ready to work, at their scheduled start time. If you anticipate being late or absent, you must notify your manager as soon as possible, ideally before your scheduled start time. Failure to follow proper notification procedures or excessive absenteeism/tardiness may result in disciplinary action.

3.2 Working Hours and Overtime

  • Standard Workweek: The standard workweek for full-time employees is typically [e.g., 40 hours], Monday through Friday, from [e.g., 9:00 AM to 5:00 PM]. Specific department hours may vary.
  • Lunch & Breaks: Employees are generally provided with a [e.g., 30-minute to 1-hour] unpaid meal break for shifts over [e.g., 5 hours]. Shorter paid rest breaks may be provided as required by state law.
  • Overtime: Non-exempt employees are eligible for overtime pay at one and one-half times their regular rate of pay for all hours worked over 40 in a workweek, as required by law. All overtime must be pre-approved by your manager. Unauthorized overtime may result in disciplinary action.

3.3 Dress Code

Meridian Solutions expects employees to present a professional image appropriate for our business environment. The dress code is generally [e.g., "business casual"]. This means clean, neat, and appropriate attire. Specific departments or roles may have more specific requirements (e.g., safety gear). If you are unsure about appropriate attire, please consult your manager.

3.4 Workplace Safety

Your safety and well-being are paramount. Meridian Solutions is committed to providing a safe and healthy work environment. All employees are responsible for adhering to safety rules and procedures, reporting any unsafe conditions or hazards immediately to their manager, and participating in safety training. In case of an accident or injury, notify your manager immediately, regardless of severity.

3.5 Drug-Free Workplace

Meridian Solutions is committed to maintaining a drug-free workplace. The unlawful manufacture, distribution, dispensation, possession, or use of controlled substances or alcohol in the workplace or while on company business is strictly prohibited. Employees found to be in violation of this policy will be subject to disciplinary action, up to and including termination.

3.6 Non-Harassment and Anti-Discrimination Policy

Meridian Solutions is committed to providing a work environment free of unlawful discrimination and harassment. This includes harassment based on race, color, religion, sex, sexual orientation, gender identity, national origin, age, disability, veteran status, or any other protected characteristic. Harassment includes unwelcome conduct, whether verbal, physical, or visual, that creates an intimidating, hostile, or offensive work environment.

Reporting Procedure: Any employee who believes they have been subjected to or has witnessed discrimination or harassment should immediately report the incident to their manager, Human Resources, or a member of the leadership team. All complaints will be investigated promptly and thoroughly, and confidentiality will be maintained to the extent possible. Retaliation against anyone who reports discrimination or harassment or participates in an investigation is strictly prohibited and will result in disciplinary action.

3.7 Workplace Violence Prevention

Meridian Solutions has zero tolerance for any form of violence or threats of violence in the workplace or while on company business. This includes verbal threats, intimidation, physical assault, or property damage. Any employee who engages in such conduct will be subject to immediate disciplinary action, up to and including termination and potential legal action. Report any concerns or incidents immediately to your manager or Human Resources.

3.8 Confidentiality and Data Security

During your employment, you may have access to confidential and proprietary information belonging to Meridian Solutions, its customers, and partners. This includes, but is not limited to, trade secrets, financial data, customer lists, product designs, marketing strategies, and employee data. You are required to maintain the strictest confidentiality of all such information, both during and after your employment. Unauthorized disclosure or use of confidential information is strictly prohibited and will result in disciplinary action, up to and including termination and potential legal action.

3.9 Use of Company Property and Resources

Company property, including computers, software, networks, internet access, telephones, vehicles, and equipment, are provided for business use. Incidental personal use is generally permitted but must not interfere with work duties, violate company policies, or be for illegal or inappropriate purposes. Employees are responsible for the proper care and security of all company property. The company reserves the right to monitor the use of its property and resources, subject to applicable law.

3.10 Social Media Policy

Employees are expected to use good judgment and common sense when participating in social media. When posting online, remember that you are a representative of Meridian Solutions. Do not post confidential company information, disparage the company, its employees, customers, or partners, or engage in any activity that could harm the company's reputation. If you identify yourself as an employee of Meridian Solutions on social media, ensure your profile includes a disclaimer that your views are your own and not necessarily those of the company.

3.11 Remote Work Policy (If Applicable)

Meridian Solutions may offer remote work arrangements for eligible positions, subject to manager approval and business needs. Remote work is a privilege, not an entitlement, and can be revoked at any time. Employees working remotely are expected to maintain the same level of productivity, adhere to all company policies, and ensure a secure and ergonomic home workspace. Specific guidelines and expectations for remote work will be outlined in a separate Remote Work Agreement.


4. Code of Conduct

4.1 Ethical Business Practices

Meridian Solutions is committed to conducting its business with the highest standards of ethics and integrity. All employees are expected to act honestly, fairly, and in compliance with all applicable laws and regulations. This includes avoiding conflicts of interest, protecting company assets, and accurately representing the company in all business dealings.

4.2 Conflict of Interest

A conflict of interest arises when your personal interests or relationships could improperly influence or appear to improperly influence your judgment or actions in performing your job duties. Employees must avoid situations where their personal interests conflict with the best interests of Meridian Solutions. If you believe you have a potential conflict of interest, or if a situation could be perceived as one, you must disclose it immediately to your manager or Human Resources.

4.3 Gifts and Entertainment

Employees should exercise caution and good judgment when giving or receiving gifts or entertainment related to company business. Gifts or entertainment that could be perceived as an attempt to improperly influence business decisions are prohibited. Generally, modest, infrequent, and customary business courtesies are acceptable, but you should always consult with your manager or Human Resources if you are unsure.

4.4 Reporting Misconduct

If you become aware of any conduct that you believe violates this Code of Conduct, company policy, or applicable law, you have a responsibility to report it. You can report concerns to your manager, Human Resources, or any member of the leadership team. [Optional: Include information about an anonymous hotline or reporting mechanism if available]. All reports will be treated confidentially to the extent possible, and no employee will suffer retaliation for making a good-faith report.


5. Compensation and Benefits Overview

5.1 Pay Periods and Direct Deposit

Employees are paid [e.g., bi-weekly/semi-monthly] on [e.g., Fridays/the 15th and last day of the month]. Direct deposit is mandatory for all employees. You will need to provide your banking information to Human Resources for setup.

5.2 Performance Reviews and Merit Increases

Performance reviews are typically conducted [e.g., annually] to assess performance, discuss goals, and provide feedback. Merit-based salary increases are determined based on individual performance, market rates, and company financial performance.

5.3 Health and Wellness Benefits

Meridian Solutions offers a comprehensive benefits package designed to support the health and well-being of our employees and their families. Eligibility for benefits may vary based on employment classification and length of service. Details will be provided during onboarding.

  • Medical Insurance: [Briefly describe, e.g., "Choice of PPO and HMO plans with employer contribution."].
  • Dental Insurance: [Briefly describe, e.g., "Coverage for preventative, basic, and major services."].
  • Vision Insurance: [Briefly describe, e.g., "Coverage for eye exams, glasses, and contact lenses."].
  • Employee Assistance Program (EAP): [Briefly describe, e.g., "Confidential counseling and referral services for personal and work-related issues."].

5.4 Retirement Plans

  • 401(k) Plan: Meridian Solutions offers a 401(k) retirement savings plan to help you save for your future. Employees are eligible to participate after [e.g., 90 days of employment]. The company offers a [e.g., matching contribution of 50% up to 6% of your salary]. Full details are available through our plan administrator.

5.5 Life and Disability Insurance

  • Basic Life Insurance: [Briefly describe, e.g., "Company-paid basic life insurance coverage for all full-time employees."].
  • Short-Term Disability (STD): [Briefly describe, e.g., "Income protection if you are unable to work due to a non-work-related illness or injury for a short period."].
  • Long-Term Disability (LTD): [Briefly describe, e.g., "Income protection if you are unable to work due to a non-work-related illness or injury for an extended period."].

5.6 Other Perks and Programs

  • Professional Development: We encourage continuous learning and may offer opportunities for training, workshops, and educational assistance.
  • Employee Recognition Programs: We believe in recognizing outstanding contributions and celebrate employee achievements.
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);}});}