Legal Contract Drafter
Run ID: 69bcaaed77c0421c0bf4a7c02026-03-29Business
PantheraHive BOS
BOS Dashboard

Draft professional legal contracts including NDAs, service agreements, employment contracts, and partnership agreements with customizable clauses.

Legal Contract Drafter Workflow Output: Non-Disclosure Agreement (NDA)

1. Document Overview

This document constitutes a draft Non-Disclosure Agreement (NDA) between Test Party A (Your Company) and Test Party B (Other Party). This draft is designed to protect confidential information disclosed by Test Party A to Test Party B for the purpose of potential business discussions or collaboration.

2. Draft Non-Disclosure Agreement (NDA)

NON-DISCLOSURE AGREEMENT

This Non-Disclosure Agreement (the "Agreement"), effective as of [Date of Agreement], is made and entered into by and between:

Test Party A (Your Company), a [Type of Entity, e.g., corporation, LLC] organized and existing under the laws of the State of Delaware, with its principal place of business at [Address of Test Party A] (hereinafter "Disclosing Party");

AND

Test Party B (Other Party), a [Type of Entity, e.g., corporation, LLC, individual] organized and existing under the laws of [State/Country of Test Party B], with its principal place of business/residence at [Address of Test Party B] (hereinafter "Receiving Party").

(Disclosing Party and Receiving Party are hereinafter collectively referred to as the "Parties" and individually as a "Party").

RECITALS

WHEREAS, the Parties are considering a potential business relationship or transaction concerning [Briefly describe the purpose, e.g., "evaluation of a potential partnership," "discussion of a new product development," "provision of services"] (the "Permitted Purpose"); and

WHEREAS, in connection with the Permitted Purpose, the Disclosing Party may disclose certain confidential and proprietary information to the Receiving Party; and

WHEREAS, the Parties desire to set forth the terms and conditions under which such confidential information will be disclosed and protected.

NOW, THEREFORE, in consideration of the mutual covenants and agreements contained herein, and for other good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged, the Parties agree as follows:


1. DEFINITION OF CONFIDENTIAL INFORMATION

"Confidential Information" means all information disclosed by the Disclosing Party to the Receiving Party, whether orally, visually, in writing, electronically, or by any other means, directly or indirectly, before or after the effective date of this Agreement, that is designated as confidential or that, by its nature or the circumstances of its disclosure, should reasonably be understood to be confidential. Confidential Information includes, but is not limited to:

(a) Business Information: Business plans, strategies, financial information, marketing plans, customer lists, pricing strategies, operational methods, sales forecasts, and supplier information.

(b) Technical Information: Trade secrets, inventions, product designs, specifications, software, hardware, algorithms, formulas, processes, research and development, prototypes, and data.

(c) Proprietary Information: Intellectual property, patents (pending or granted), copyrights, trademarks, and know-how.

(d) Third-Party Information: Information received by the Disclosing Party from third parties under an obligation of confidentiality.

(e) The existence and terms of this Agreement and the discussions related to the Permitted Purpose.

Confidential Information may be contained in tangible form (e.g., documents, drawings, samples, models) or intangible form (e.g., oral disclosures, observations).

2. OBLIGATIONS OF RECEIVING PARTY

The Receiving Party agrees to:

(a) Maintain Confidentiality: Hold all Confidential Information in strict confidence and take all reasonable precautions to prevent its unauthorized disclosure, dissemination, or use.

(b) Limited Use: Use the Confidential Information solely for the Permitted Purpose.

(c) Limited Disclosure: Disclose Confidential Information only to its employees, directors, officers, advisors, and agents (collectively, "Representatives") who have a legitimate "need to know" such information for the Permitted Purpose and who are bound by confidentiality obligations no less stringent than those contained herein. The Receiving Party shall be responsible for any breach of this Agreement by its Representatives.

(d) Protection: Apply at least the same degree of care to protect the Confidential Information as it applies to its own confidential information of a similar nature, but in no event less than reasonable care.

(e) No Reverse Engineering: Not reverse engineer, decompile, disassemble, or otherwise attempt to derive the source code, underlying ideas, or structure of any Confidential Information, including any software or other proprietary materials provided by the Disclosing Party.

3. EXCLUSIONS FROM CONFIDENTIAL INFORMATION

The obligations of confidentiality under this Agreement shall not apply to any information that:

(a) Is or becomes publicly available through no fault or breach of the Receiving Party or its Representatives.

(b) Was rightfully in the possession of the Receiving Party prior to its disclosure by the Disclosing Party, without breach of any confidentiality obligation.

(c) Is independently developed by the Receiving Party without use of or reference to the Disclosing Party's Confidential Information.

(d) Is rightfully received by the Receiving Party from a third party without restriction on disclosure and without breach of any confidentiality obligation.

(e) Is approved for release or disclosure by written authorization of the Disclosing Party.

(f) Is required to be disclosed by law, regulation, or court order, provided that the Receiving Party gives prompt written notice to the Disclosing Party of such requirement (to the extent legally permissible) to enable the Disclosing Party to seek a protective order or other appropriate remedy. The Receiving Party shall only disclose the minimum amount of Confidential Information necessary to comply with the legal requirement.

4. TERM

This Agreement shall commence on the Effective Date and remain in full force and effect for a period of [e.g., two (2) years, five (5) years] from the date of disclosure of the last Confidential Information, or until terminated earlier by mutual written agreement of the Parties. Notwithstanding the foregoing, the obligations of confidentiality under Section 2 shall survive the termination or expiration of this Agreement for a period of [e.g., five (5) years, indefinitely for trade secrets].

5. RETURN OF CONFIDENTIAL INFORMATION

Upon the Disclosing Party's written request, or upon the termination or expiration of this Agreement, the Receiving Party shall, at the Disclosing Party's option:

(a) Promptly return to the Disclosing Party all tangible embodiments of Confidential Information, including all copies, extracts, or other reproductions thereof; or

(b) Certify in writing that all tangible embodiments of Confidential Information, including all copies, extracts, or other reproductions thereof, have been destroyed.

Notwithstanding the foregoing, the Receiving Party may retain one archival copy of the Confidential Information solely for the purpose of ensuring compliance with its legal and regulatory obligations, provided such copy remains subject to the confidentiality obligations of this Agreement.

6. NO LICENSE

Nothing in this Agreement shall be construed as granting or implying any rights, license, or interest in any Confidential Information, or in any patents, copyrights, trade secrets, trademarks, or other intellectual property rights of the Disclosing Party. All Confidential Information shall remain the sole property of the Disclosing Party.

7. REMEDIES

The Receiving Party acknowledges that monetary damages alone may not be a sufficient remedy for any breach of this Agreement and that the Disclosing Party shall be entitled to seek injunctive relief, specific performance, or other equitable remedies in addition to any other remedies available at law or in equity.

8. GOVERNING LAW AND JURISDICTION

This Agreement shall be governed by and construed in accordance with the laws of the State of Delaware, USA, without regard to its conflict of laws principles. The Parties agree that any dispute arising out of or relating to this Agreement shall be subject to the exclusive jurisdiction of the state and federal courts located in the State of Delaware, USA.

9. SEVERABILITY

If any provision of this Agreement is found by a court of competent jurisdiction to be invalid, illegal, or unenforceable, such provision shall be modified to the minimum extent necessary to make it valid, legal, and enforceable, and the remainder of this Agreement shall remain in full force and effect.

10. ENTIRE AGREEMENT

This Agreement constitutes the entire agreement between the Parties concerning the subject matter hereof and supersedes all prior and contemporaneous agreements, understandings, negotiations, and discussions, whether oral or written, of the Parties.

11. WAIVER

No waiver of any breach of any provision of this Agreement shall constitute a waiver of any prior, concurrent, or subsequent breach of the same or any other provision hereof, and no waiver shall be effective unless made in writing and signed by an authorized representative of the waiving Party.

12. NOTICES

All notices, requests, demands, and other communications under this Agreement shall be in writing and shall be deemed to have been duly given: (a) when delivered personally; (b) upon confirmed transmission by facsimile or e-mail (with confirmation of receipt); or (c) one (1) business day after being sent by a nationally recognized overnight courier service, to the addresses set forth below or to such other address as a Party may designate by written notice to the other Party.

If to Disclosing Party:

Test Party A (Your Company)

[Address of Test Party A]

[Email Address]

[Attention: Name/Title]

If to Receiving Party:

Test Party B (Other Party)

[Address of Test Party B]

[Email Address]

[Attention: Name/Title]

13. COUNTERPARTS

This Agreement may be executed in counterparts, each of which shall be deemed an original, but all of which together shall constitute one and the same instrument. Signatures transmitted by facsimile or email (e.g., PDF) shall be deemed original signatures for purposes of this Agreement.


IN WITNESS WHEREOF, the Parties have executed this Non-Disclosure Agreement as of the Effective Date first written above.

TEST PARTY A (YOUR COMPANY)

By: _______________________________

Name: [Authorized Signatory Name]

Title: [Authorized Signatory Title]

TEST PARTY B (OTHER PARTY)

By: _______________________________

Name: [Authorized Signatory Name]

Title: [Authorized Signatory Title] / [Individual Name if applicable]


3. Actionable Details and Recommendations

  1. Review and Customize Specifics:

* Effective Date: Fill in the exact date the agreement becomes active.

* Party Details: Provide full legal names, entity types (e.g., "a Delaware corporation," "an individual"), and complete addresses for both Test Party A and Test Party B.

* Permitted Purpose: Clearly and concisely define the specific reason for disclosing confidential information (e.g., "evaluating a potential joint venture in cloud computing," "discussions for Test Party B to provide marketing services to Test Party A"). This limits how the Receiving Party can use the information.

* Term of Agreement: Specify the duration for which the agreement itself is active (e.g., "two (2) years").

* Survival Period: Crucially, define how long the confidentiality obligations survive after the agreement's termination or expiration (e.g., "five (5) years," or "indefinitely for trade secrets"). For highly sensitive trade secrets, an indefinite survival period is often recommended.

* Contact Information for Notices: Ensure accurate email and physical addresses are provided for official communications.

  1. Consider Specific Exclusions:

While standard exclusions are included, consider if any specific types of information should never* be considered confidential in your context (e.g., publicly available marketing materials, unless specifically enhanced by internal data).

  1. Enforcement and Remedies:

* The draft includes clauses for injunctive relief, which is critical for NDAs as monetary damages are often insufficient to repair the harm of confidential information disclosure.

* The choice of Delaware law and jurisdiction is robust for corporate matters, but ensure it aligns with the practicalities of potential enforcement for both parties. If Test Party B is based internationally, additional considerations for international dispute resolution may be needed.

  1. Before Disclosure:

* Ensure all confidential information is clearly marked as "CONFIDENTIAL" where possible.

* Maintain a log of what confidential information is disclosed, when, and to whom.

* Limit disclosure to only what is necessary for the Permitted Purpose.

  1. Legal Counsel Review:

* Critical Recommendation: This draft is for informational purposes and should be thoroughly reviewed by qualified legal counsel in the relevant jurisdiction before execution. A lawyer can tailor the clauses to your specific business needs, industry standards, and risk profile.

4. Structured Data: Key Agreement Parameters

| Parameter | Value | Notes |

| :---------------------- | :---------------------------------------------------- | :------------------------------------------------------------------------------ |

| Contract Type | Non-Disclosure Agreement (NDA) | |

| Disclosing Party | Test Party A (Your Company) | Placeholder. Full legal entity name and details required. |

| Receiving Party | Test Party B (Other Party) | Placeholder. Full legal entity/individual name and details required. |

| Permitted Purpose | [To be defined by user] | CRITICAL: Must be specific to the underlying business discussion. |

| Governing Law | State of Delaware, USA | Selected based on user input. |

| Jurisdiction | State of Delaware, USA | Selected based on user input. |

| Confidentiality Term| [e.g., 2-5 years from last disclosure] | CRITICAL: To be specified. Often longer for trade secrets. |

| Survival Period | [e.g., 5 years or indefinitely for trade secrets] | CRITICAL: How long obligations last after agreement ends. |

| Return/Destruction | Upon request or termination/expiration of agreement. | Standard clause. |

| Remedies | Injunctive relief, specific performance, monetary damages | Ensures broader protection beyond just financial compensation. |

This comprehensive output provides a robust starting point for your NDA. Remember to thoroughly customize the bracketed placeholders and seek legal advice before finalizing.

Step 2: projectmanager

Workflow Execution Plan: Legal Contract Drafter - NDA

Step 2: Plan

This planning phase outlines the strategy for drafting a comprehensive Non-Disclosure Agreement (NDA) based on the provided user inputs. The primary goal is to generate a legally sound, professional, and highly customizable NDA template that meets the user's specific requirements and incorporates best practices for confidentiality agreements.

1. Objective

To produce a detailed, professional, and actionable NDA document, tailored for "Test Party A (Your Company)" and "Test Party B (Other Party)," under the jurisdiction of the State of Delaware, USA. The output will be comprehensive, addressing all standard and critical NDA clauses, and formatted for immediate utility.

2. Key Components to be Included in the NDA

The drafted NDA will systematically cover the following essential sections to ensure completeness and legal robustness:

  • Document Title: Clearly identify the agreement as a Non-Disclosure Agreement.
  • Parties: Full legal identification of the Disclosing Party (Test Party A) and Receiving Party (Test Party B), including placeholders for addresses.
  • Recitals/Preamble: Briefly state the context and purpose for which confidential information will be exchanged (e.g., "for the purpose of exploring a potential business relationship," providing a placeholder for specific details).
  • Definition of Confidential Information: A robust and broad definition covering various forms of information, with specific examples and clear exclusions.
  • Obligations of Receiving Party: Detail the duties of Test Party B regarding the handling of confidential information, including:

* Non-disclosure to third parties.

* Non-use for any purpose other than the stated purpose.

* Duty of care (at least the same degree of care as for its own confidential information).

* Limitation of access to "need-to-know" personnel.

* Prompt notification of unauthorized disclosure.

  • Exclusions from Confidential Information: Clearly define what information is not considered confidential (e.g., publicly available, independently developed, disclosed by third parties without breach).
  • Term of Agreement & Confidentiality Period: Specify the duration of the agreement and, critically, the period for which confidentiality obligations will survive termination.
  • Permitted Disclosures: Outline circumstances under which disclosure is allowed (e.g., by court order, with prior written consent).
  • Return or Destruction of Confidential Information: Procedures and timelines for returning or destroying information upon termination or request.
  • No License or Warranty: Clarify that the NDA does not grant any intellectual property rights or provide warranties regarding the information.
  • Remedies: Acknowledge the irreparable harm of breach and the availability of injunctive relief, in addition to other legal remedies.
  • Governing Law: Explicitly state that the agreement will be governed by the laws of the State of Delaware, USA.
  • Dispute Resolution: Specify the forum and method for resolving disputes (e.g., exclusive jurisdiction of courts in Delaware).
  • Miscellaneous Provisions: Standard boilerplate clauses for a comprehensive contract:

* Entire Agreement.

* Amendments.

* Waiver.

* Severability.

* Assignment.

* Notices.

* Counterparts.

* Relationship of Parties (Independent Contractors).

  • Signatures: Placeholder section for authorized representatives of both parties.

3. Drafting Strategy

  1. Standard Template Customization: Utilize a robust, legally vetted NDA template as a foundation.
  2. Input Integration:

* contract_type: NDA will guide the selection of the core template.

* party_a: Test Party A (Your Company) will be designated as the "Disclosing Party."

* party_b: Test Party B (Other Party) will be designated as the "Receiving Party."

* jurisdiction: State of Delaware, USA will be explicitly stated in the "Governing Law" and "Dispute Resolution" clauses.

* key_terms: This is a test input for the Legal Contract Drafter workflow. Please generate comprehensive output. will be interpreted as a directive for maximum comprehensiveness and detail in all clauses, rather than specific clause content. Default, robust language will be used for all clauses.

  1. Clarity and Professionalism: Employ clear, unambiguous legal language. Maintain a professional tone suitable for formal legal documents.
  2. Placeholders: Include clear placeholders for information that typically requires user-specific input beyond what was provided (e.g., specific purpose, addresses, effective date, term duration, specific intellectual property details if relevant).
  3. Actionable Recommendations: Provide specific advice on how to finalize and implement the drafted NDA.

4. Specific Clause Considerations

  • Definition of Confidential Information: This will be drafted broadly to protect a wide array of information, including but not limited to business plans, financial data, customer lists, technical information, trade secrets, and intellectual property. It will also include a mechanism for marking information as confidential or identifying it as such if disclosed orally.
  • Purpose: A placeholder will be included to allow the user to specify the exact purpose of the information exchange, which is critical for defining the scope of permitted use.
  • Term & Survival: The plan is to include a default term for the agreement (e.g., 2-5 years) and a separate, longer survival period for the confidentiality obligations themselves (e.g., 5-10 years or indefinitely for trade secrets), with clear guidance for user customization.
  • Remedies: Emphasis will be placed on the availability of injunctive relief due to the unique nature of confidential information.
  • Jurisdiction-Specific Language: While Delaware law is specified, the standard clauses are generally applicable. However, the governing law and dispute resolution clauses will be precisely worded to reflect Delaware jurisdiction.

5. Structured Data & Output Format

The final output will be presented using markdown headers as requested, ensuring clear separation and readability of all sections of the drafted NDA and accompanying recommendations.

This plan ensures that the generated NDA will be a comprehensive, legally sound, and immediately useful document for the user, requiring minimal further customization for their specific context.

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