From 823ef5c5c906be8cbe55158178fd1dc8a470be40 Mon Sep 17 00:00:00 2001 From: Stormin Mfn Norman <85649883+storminstakk@users.noreply.github.com> Date: Sun, 14 Apr 2024 00:38:02 -0600 Subject: [PATCH] Update files: modified files --- app/api/auth.ts | 59 +- app/api/common.ts | 32 +- .../[...path]/route.ts | 8 +- app/client/api.ts | 6 +- app/constant.ts | 14 +- app/layout.tsx | 132 +++-- app/page.tsx | 50 +- app/typing.ts | 19 +- app/utils.ts | 144 +++-- commands.md | 170 +++++- justice_juggernaut_connector.tsx | 71 +++ justice_juggernaut_sources.tsx | 516 ++++++++---------- requirements.txt | 11 + tsconfig.json | 8 +- 14 files changed, 770 insertions(+), 470 deletions(-) rename app/api/{openai => huggingface}/[...path]/route.ts (67%) create mode 100644 justice_juggernaut_connector.tsx diff --git a/app/api/auth.ts b/app/api/auth.ts index fffb63c..44a4aa8 100644 --- a/app/api/auth.ts +++ b/app/api/auth.ts @@ -1,8 +1,7 @@ -import { NextRequest } from "next/server"; -import { getServerSideConfig } from "../config/server"; +import { NextRequest, NextResponse } from "next/server"; import md5 from "spark-md5"; +import { getServerSideConfig } from "../config/server"; import { ACCESS_CODE_PREFIX } from "../constant"; -import { OPENAI_URL } from "./common"; function getIP(req: NextRequest) { let ip = req.ip ?? req.headers.get("x-real-ip"); @@ -15,8 +14,8 @@ function getIP(req: NextRequest) { return ip; } -function parseApiKey(bearToken: string) { - const token = bearToken.trim().replaceAll("Bearer ", "").trim(); +function parseAuthToken(authToken: string) { + const token = authToken.trim().replaceAll("Bearer ", "").trim(); const isOpenAiKey = !token.startsWith(ACCESS_CODE_PREFIX); return { @@ -25,42 +24,44 @@ function parseApiKey(bearToken: string) { }; } -export function auth(req: NextRequest) { - const authToken = req.headers.get("Authorization") ?? ""; +export function handleAuthRequest( + req: NextRequest, + params: { path: string[] } +): NextResponse { + const { path } = params; + console.log(`[Auth] Handling request for path: ${path}`); - // check if it is openai api key or user token - const { accessCode, apiKey: token } = parseApiKey(authToken); + const authToken = req.headers.get("Authorization") ?? ""; + const { accessCode, apiKey } = parseAuthToken(authToken); const hashedCode = md5.hash(accessCode ?? "").trim(); - const serverConfig = getServerSideConfig(); - console.log("[Auth] allowed hashed codes: ", [...serverConfig.codes]); - console.log("[Auth] got access code:", accessCode); - console.log("[Auth] hashed access code:", hashedCode); + + console.log("[Auth] Allowed hashed codes: ", [...serverConfig.codes]); + console.log("[Auth] Received access code:", accessCode); + console.log("[Auth] Hashed access code:", hashedCode); console.log("[User IP] ", getIP(req)); console.log("[Time] ", new Date().toLocaleString()); - if (serverConfig.needCode && !serverConfig.codes.has(hashedCode) && !token) { - return { - error: true, - msg: !accessCode ? "empty access code" : "wrong access code", - }; + if (serverConfig.needCode && !serverConfig.codes.has(hashedCode) && !apiKey) { + return new NextResponse( + JSON.stringify({ error: true, msg: !accessCode ? "Empty access code" : "Wrong access code" }), + { status: 401 } + ); } - // if user does not provide an api key, inject system api key - if (!token) { - const apiKey = serverConfig.apiKey; - if (apiKey) { - console.log("[Auth] use system api key"); - req.headers.set("Authorization", `Bearer ${apiKey}`); + // Inject system API key if user does not provide one + if (!apiKey) { + const systemApiKey = serverConfig.apiKey; + if (systemApiKey) { + console.log("[Auth] Using system API key"); + req.headers.set("Authorization", `Bearer ${systemApiKey}`); } else { - console.log("[Auth] admin did not provide an api key"); + console.log("[Auth] Admin did not provide an API key"); } } else { - console.log("[Auth] use user api key"); + console.log("[Auth] Using user API key"); } - return { - error: false, - }; + return new NextResponse(JSON.stringify({ error: false })); } diff --git a/app/api/common.ts b/app/api/common.ts index 0324753..0814c5d 100644 --- a/app/api/common.ts +++ b/app/api/common.ts @@ -1,46 +1,34 @@ -import { NextRequest } from "next/server"; +import { NextRequest, NextResponse } from "next/server"; -export const OPENAI_URL = "api.openai.com"; +export const HUGGINGFACE_URL = "api.huggingface.co"; const DEFAULT_PROTOCOL = "https"; const PROTOCOL = process.env.PROTOCOL ?? DEFAULT_PROTOCOL; -const BASE_URL = process.env.BASE_URL ?? OPENAI_URL; +const BASE_URL = process.env.BASE_URL ?? HUGGINGFACE_URL; -export async function requestOpenai(req: NextRequest) { +export async function handleHuggingFaceRequest(req: NextRequest): Promise { const controller = new AbortController(); const authValue = req.headers.get("Authorization") ?? ""; - const openaiPath = `${req.nextUrl.pathname}${req.nextUrl.search}`.replaceAll( - "/api/openai/", - "", - ); + const huggingFacePath = req.nextUrl.pathname.replace("/api/huggingface/", ""); let baseUrl = BASE_URL; - if (!baseUrl.startsWith("http")) { baseUrl = `${PROTOCOL}://${baseUrl}`; } - console.log("[Proxy] ", openaiPath); - console.log("[Base Url]", baseUrl); - - if (process.env.OPENAI_ORG_ID) { - console.log("[Org ID]", process.env.OPENAI_ORG_ID); - } + console.log("[Proxy] ", huggingFacePath); + console.log("[Base URL]", baseUrl); const timeoutId = setTimeout(() => { controller.abort(); }, 10 * 60 * 1000); - const fetchUrl = `${baseUrl}/${openaiPath}`; + const fetchUrl = `${baseUrl}/${huggingFacePath}`; const fetchOptions: RequestInit = { + method: req.method, headers: { "Content-Type": "application/json", Authorization: authValue, - ...(process.env.OPENAI_ORG_ID && { - "OpenAI-Organization": process.env.OPENAI_ORG_ID, - }), }, - cache: "no-store", - method: req.method, body: req.body, signal: controller.signal, }; @@ -48,8 +36,8 @@ export async function requestOpenai(req: NextRequest) { try { const res = await fetch(fetchUrl, fetchOptions); + // Handle 401 Unauthorized to prevent browser prompt for credentials if (res.status === 401) { - // to prevent browser prompt for credentials const newHeaders = new Headers(res.headers); newHeaders.delete("www-authenticate"); return new Response(res.body, { diff --git a/app/api/openai/[...path]/route.ts b/app/api/huggingface/[...path]/route.ts similarity index 67% rename from app/api/openai/[...path]/route.ts rename to app/api/huggingface/[...path]/route.ts index 981749e..b1e7908 100644 --- a/app/api/openai/[...path]/route.ts +++ b/app/api/huggingface/[...path]/route.ts @@ -1,13 +1,13 @@ import { prettyObject } from "@/app/utils/format"; import { NextRequest, NextResponse } from "next/server"; import { auth } from "../../auth"; -import { requestOpenai } from "../../common"; +import { requestHuggingface } from "../../common"; // Update import to use Hugging Face async function handle( req: NextRequest, { params }: { params: { path: string[] } }, ) { - console.log("[OpenAI Route] params ", params); + console.log("[Hugging Face Route] params ", params); const authResult = auth(req); if (authResult.error) { @@ -17,9 +17,9 @@ async function handle( } try { - return await requestOpenai(req); + return await requestHuggingface(req); // Use Hugging Face request function } catch (e) { - console.error("[OpenAI] ", e); + console.error("[Hugging Face] ", e); return NextResponse.json(prettyObject(e)); } } diff --git a/app/client/api.ts b/app/client/api.ts index 53f5c3b..e4eac5c 100644 --- a/app/client/api.ts +++ b/app/client/api.ts @@ -1,6 +1,6 @@ import { ACCESS_CODE_PREFIX } from "../constant"; import { ChatMessage, ModelConfig, ModelType, useAccessStore } from "../store"; -import { ChatGPTApi } from "./platforms/openai"; +import { ChatGPTApi } from "./platforms/huggingface"; export const ROLES = ["system", "user", "assistant"] as const; export type MessageRole = (typeof ROLES)[number]; @@ -87,7 +87,7 @@ export class ClientApi { public llm: LLMApi; constructor() { - this.llm = new ChatGPTApi(); + this.llm = new HuggingfaceApi(); } config() {} @@ -167,7 +167,7 @@ export function getHeaders() { * This module exports several classes and interfaces that are used to interact with OpenAI's GPT API. * The `ClientApi` class is the main entry point for using the API, and it provides methods for interacting with the GPT API. * The `LLMApi` class is an abstract class that defines the interface for interacting with the GPT API. - * The `ChatGPTApi` class is a concrete implementation of the `LLMApi` class that provides methods for chatting with the GPT API. + * The `HuggingfaceApi` class is a concrete implementation of the `LLMApi` class that provides methods for chatting with the GPT API. * The `RequestMessage` interface defines the structure of a message that can be sent to the GPT API. * The `LLMConfig` interface defines the configuration options that can be passed to the GPT API. * The `ChatOptions` interface defines the options that can be passed to the `chat` method of the `LLMApi` class. diff --git a/app/constant.ts b/app/constant.ts index 0fb18c2..f3ff8d4 100644 --- a/app/constant.ts +++ b/app/constant.ts @@ -1,10 +1,10 @@ -export const OWNER = "Yidadaa"; -export const REPO = "ChatGPT-Next-Web"; -export const REPO_URL = `https://github.com/${OWNER}/${REPO}`; -export const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`; +export const OWNER = "storminstakk"; +export const REPO = "Justice-Juggernaut"; +export const REPO_URL = `https://github.com/storminstakk/Justice_Juggernaut`; +export const ISSUE_URL = `https://github.com/storminstakk/Justice_Juggernaut/issues`; export const UPDATE_URL = `${REPO_URL}#keep-updated`; -export const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`; -export const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`; +export const FETCH_COMMIT_URL = `https://api.github.com/repos/storminstakk/Justice_Juggernaut/commits?per_page=1`; +export const FETCH_TAG_URL = `https://api.github.com/repos/storminstakk/Justice_Juggernaut/tags?per_page=1`; export const RUNTIME_CONFIG_DOM = "danger-runtime-config"; export enum Path { @@ -25,7 +25,7 @@ export enum FileName { } export enum StoreKey { - Chat = "chat-next-web-store", + Chat = "Justice-Juggernaut-store", Access = "access-control", Config = "app-config", Mask = "mask-store", diff --git a/app/layout.tsx b/app/layout.tsx index 1b38e4b..24889ae 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,42 +1,108 @@ -/* eslint-disable @next/next/no-page-custom-font */ -import "./styles/globals.scss"; -import "./styles/markdown.scss"; -import "./styles/highlight.scss"; +// layout.tsx + +import React from "react"; +import Head from "next/head"; +import ErrorBoundary from "./ErrorBoundary"; import { getBuildConfig } from "./config/build"; const buildConfig = getBuildConfig(); -export const metadata = { - title: "Justice Juggernaut", - description: "Your personal Law Chat Bot.", - viewport: { - width: "device-width", - initialScale: 1, - maximumScale: 1, - }, - themeColor: [ - { media: "(prefers-color-scheme: light)", color: "#fafafa" }, - { media: "(prefers-color-scheme: dark)", color: "#151515" }, - ], - appleWebApp: { - title: "Justice Juggernaut", - statusBarStyle: "default", - }, -}; - -export default function RootLayout({ +const RootLayout: React.FC<{ pageTitle: string; children: React.ReactNode }> = ({ + pageTitle, children, -}: { - children: React.ReactNode; -}) { +}) => { + // Dynamically determine theme color based on user's color scheme preference + const getThemeColor = () => { + return window.matchMedia("(prefers-color-scheme: dark)").matches + ? "#151515" + : "#fafafa"; + }; + + // Handle network errors and display fallback UI + const handleNetworkError = (error: Error, componentStack: string) => { + console.error("Network Error:", error); + // Implement custom error handling and reporting (e.g., notify error tracking service) + // Display fallback UI to the user + return ( +
+ Something went wrong. Please try again later. +
+ ); + }; + return ( - - + <> + + + + {pageTitle} + - + + {/* Include anti-CYFD and parents' rights advocacy tags */} + + + + + + + + {/* Wrap children with ErrorBoundary to catch and handle errors */} + + {children} + + {/* Include service worker registration script for offline support */} - - {children} - + {/* Display powerful messages promoting parents' rights and anti-CYFD sentiments */} +
+

Empowering Parents' Rights

+

+ Stand up against CPS corruption and fight for justice and fairness in family matters. +

+ {/* Resource links for more information */} +

+ Explore resources: +
+ + ParentalRights.org + {" "} + |{" "} + + ACLU - Parental Rights + +

+
+ {/* Include additional dynamic elements and enhancements */} +
+

Join the Civil Rights Movement

+

+ Advocate for civil rights and equality, ensuring every family is treated with respect and dignity. +

+ {/* Resource links for civil rights advocacy */} +

+ Explore resources: +
+ + NAACP + {" "} + |{" "} + + Human Rights Campaign + +

+
+ + ); -} +}; + +export default RootLayout; diff --git a/app/page.tsx b/app/page.tsx index 20b5031..c1977a3 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,16 +1,48 @@ +import React from "react"; import { Analytics } from "@vercel/analytics/react"; - -import { Home } from "./components/home"; - +import { BrowserRouter as Router, Route, Switch } from "react-router-dom"; +import Home from "./components/Home"; +import About from "./components/About"; +import Contact from "./components/Contact"; +import NotFound from "./components/NotFound"; import { getServerSideConfig } from "./config/server"; const serverConfig = getServerSideConfig(); -export default async function App() { +const App = () => { return ( - <> - - {serverConfig?.isVercel && } - + +
+
+ +
+
+ + + + + + +
+
+

© {new Date().getFullYear()} Justice Juggernaut. All rights reserved.

+ {serverConfig?.isVercel && } +
+
+
); -} +}; + +export default App; diff --git a/app/typing.ts b/app/typing.ts index 25e474a..ad01241 100644 --- a/app/typing.ts +++ b/app/typing.ts @@ -1 +1,18 @@ -export type Updater = (updater: (value: T) => void) => void; +import React, { useState } from 'react'; + +// Define a component that takes an Updater as a prop +const ExampleComponent: React.FC<{ updater: Updater }> = ({ updater }) => { + const [value, setValue] = useState(0); + + const handleClick = () => { + // Call the updater function, passing a function that increments the value + updater(newValue => setValue(newValue + 1)); + }; + + return ( +
+

Current value: {value}

+ +
+ ); +}; diff --git a/app/utils.ts b/app/utils.ts index 120b1e1..337e531 100644 --- a/app/utils.ts +++ b/app/utils.ts @@ -2,59 +2,63 @@ import { useEffect, useState } from "react"; import { showToast } from "./components/ui-lib"; import Locale from "./locales"; -export function trimTopic(topic: string) { - return topic.replace(/[,。!?”“"、,.!?]*$/, ""); +export function trimTopic(topic: string): string { + // Trim trailing punctuation, whitespace, and special characters using Unicode properties + return topic.replace(/[\p{P}\p{S}\s]*$/gu, ""); } -export async function copyToClipboard(text: string) { +export async function copyToClipboard(text: string): Promise { try { await navigator.clipboard.writeText(text); showToast(Locale.Copy.Success); } catch (error) { - const textArea = document.createElement("textarea"); - textArea.value = text; - document.body.appendChild(textArea); - textArea.focus(); - textArea.select(); try { + const textArea = document.createElement("textarea"); + textArea.value = text; + document.body.appendChild(textArea); + textArea.select(); document.execCommand("copy"); + document.body.removeChild(textArea); showToast(Locale.Copy.Success); } catch (error) { showToast(Locale.Copy.Failed); } - document.body.removeChild(textArea); } } -export function downloadAs(text: string, filename: string) { - const element = document.createElement("a"); - element.setAttribute( - "href", - "data:text/plain;charset=utf-8," + encodeURIComponent(text), - ); - element.setAttribute("download", filename); +export function downloadAs(text: string, filename: string, mimeType = "text/plain;charset=utf-8"): void { + const blob = new Blob([text], { type: mimeType }); + const url = URL.createObjectURL(blob); + + const anchor = document.createElement("a"); + anchor.href = url; + anchor.download = filename; - element.style.display = "none"; - document.body.appendChild(element); + anchor.style.display = "none"; + document.body.appendChild(anchor); - element.click(); + anchor.click(); - document.body.removeChild(element); + document.body.removeChild(anchor); + URL.revokeObjectURL(url); } -export function readFromFile() { - return new Promise((res, rej) => { +export function readFromFile(): Promise { + return new Promise((resolve, reject) => { const fileInput = document.createElement("input"); fileInput.type = "file"; - fileInput.accept = "application/json"; + fileInput.accept = ".txt, .json, .csv"; + + fileInput.onchange = (event) => { + const file = (event.target as HTMLInputElement)?.files?.[0]; + if (!file) { + reject(new Error("No file selected")); + return; + } - fileInput.onchange = (event: any) => { - const file = event.target.files[0]; const fileReader = new FileReader(); - fileReader.onload = (e: any) => { - res(e.target.result); - }; - fileReader.onerror = (e) => rej(e); + fileReader.onload = (e) => resolve(e.target?.result as string); + fileReader.onerror = (e) => reject(e); fileReader.readAsText(file); }; @@ -62,61 +66,68 @@ export function readFromFile() { }); } -export function isIOS() { +export function isIOS(): boolean { const userAgent = navigator.userAgent.toLowerCase(); return /iphone|ipad|ipod/.test(userAgent); } -export function useWindowSize() { +export function useWindowSize(): { width: number; height: number } { const [size, setSize] = useState({ width: window.innerWidth, height: window.innerHeight, }); useEffect(() => { - const onResize = () => { + const handleResize = () => { setSize({ width: window.innerWidth, height: window.innerHeight, }); }; - window.addEventListener("resize", onResize); + const debouncedResizeHandler = debounce(handleResize, 200); // Example debounce function + + window.addEventListener("resize", debouncedResizeHandler); return () => { - window.removeEventListener("resize", onResize); + window.removeEventListener("resize", debouncedResizeHandler); }; }, []); return size; } -export const MOBILE_MAX_WIDTH = 600; -export function useMobileScreen() { - const { width } = useWindowSize(); - - return width <= MOBILE_MAX_WIDTH; +export function isFirefox(): boolean { + return typeof InstallTrigger !== "undefined"; } -export function isFirefox() { - return ( - typeof navigator !== "undefined" && /firefox/i.test(navigator.userAgent) +export function autoGrowTextArea(dom: HTMLTextAreaElement): number { + const measureDom = getOrCreateMeasureDom("__measure"); + measureDom.style.width = getDomContentWidth(dom) + "px"; + measureDom.innerText = dom.value || "1"; + + const height = parseFloat(window.getComputedStyle(measureDom).height); + const singleLineHeight = parseFloat( + window.getComputedStyle(getOrCreateMeasureDom("__single_measure")).height ); -} -export function selectOrCopy(el: HTMLElement, content: string) { - const currentSelection = window.getSelection(); + return Math.round(height / singleLineHeight); +} - if (currentSelection?.type === "Range") { - return false; - } +export function getCSSVar(varName: string, defaultValue = ""): string { + return getComputedStyle(document.body).getPropertyValue(varName).trim() || defaultValue; +} - copyToClipboard(content); +function debounce(callback: () => void, delay: number): () => void { + let timeoutId: ReturnType; - return true; + return () => { + clearTimeout(timeoutId); + timeoutId = setTimeout(callback, delay); + }; } -function getDomContentWidth(dom: HTMLElement) { +function getDomContentWidth(dom: HTMLElement): number { const style = window.getComputedStyle(dom); const paddingWidth = parseFloat(style.paddingLeft) + parseFloat(style.paddingRight); @@ -124,8 +135,8 @@ function getDomContentWidth(dom: HTMLElement) { return width; } -function getOrCreateMeasureDom(id: string, init?: (dom: HTMLElement) => void) { - let dom = document.getElementById(id); +function getOrCreateMeasureDom(id: string, init?: (dom: HTMLElement) => void): HTMLElement { + let dom = document.getElementById(id) as HTMLElement; if (!dom) { dom = document.createElement("span"); @@ -140,30 +151,5 @@ function getOrCreateMeasureDom(id: string, init?: (dom: HTMLElement) => void) { init?.(dom); } - return dom!; -} - -export function autoGrowTextArea(dom: HTMLTextAreaElement) { - const measureDom = getOrCreateMeasureDom("__measure"); - const singleLineDom = getOrCreateMeasureDom("__single_measure", (dom) => { - dom.innerText = "TEXT_FOR_MEASURE"; - }); - - const width = getDomContentWidth(dom); - measureDom.style.width = width + "px"; - measureDom.innerText = dom.value !== "" ? dom.value : "1"; - const endWithEmptyLine = dom.value.endsWith("\n"); - const height = parseFloat(window.getComputedStyle(measureDom).height); - const singleLineHeight = parseFloat( - window.getComputedStyle(singleLineDom).height, - ); - - const rows = - Math.round(height / singleLineHeight) + (endWithEmptyLine ? 1 : 0); - - return rows; -} - -export function getCSSVar(varName: string) { - return getComputedStyle(document.body).getPropertyValue(varName).trim(); + return dom; } diff --git a/commands.md b/commands.md index f06975c..7e35c45 100644 --- a/commands.md +++ b/commands.md @@ -1,4 +1,172 @@ Commands: +### Document Generation and Analysis: +1. `/legalDocGenerator` - Generate legal documents tailored to specific cases or legal needs. +2. `/contractCreator` - Create contracts for various purposes, including employment, services, and partnerships. +3. `/affidavitBuilder` - Assist in drafting affidavits with customizable templates and prompts. +4. `/petitionGenerator` - Generate petitions for court actions or legal proceedings. +5. `/motionAssistant` - Provide guidance and templates for drafting legal motions. +6. `/letterWriter` - Generate formal letters for legal communications and notices. +7. `/legalMemoGenerator` - Create legal memoranda summarizing case law and legal arguments. +8. `/complianceDocumentCreator` - Generate compliance documents for regulatory requirements. + +### Legal Research and Reference: +9. `/lawLibraryAccess` - Provide access to a comprehensive library of statutes, case law, and legal texts. +10. `/caseLawFinder` - Search for relevant case law based on keywords or legal topics. +11. `/statutoryInterpretation` - Assist in interpreting statutes and legislative texts. +12. `/regulatoryGuidance` - Provide guidance on regulatory requirements and compliance. +13. `/legalDictionaryLookup` - Lookup definitions and explanations of legal terms and concepts. +14. `/legalTopicExplorer` - Explore legal topics and subfields with curated resources. +15. `/jurisdictionalAnalysis` - Analyze legal principles specific to different jurisdictions. +16. `/precedentAnalyzer` - Analyze legal precedents and their implications for specific cases. + +### Legal Assistance and Advice: +17. `/legalAdviceSeeker` - Connect with legal professionals for personalized legal advice. +18. `/caseEvaluationTool` - Evaluate legal cases and assess strengths and weaknesses. +19. `/settlementCalculator` - Calculate potential settlement amounts based on legal criteria. +20. `/litigationStrategyPlanner` - Plan strategies for litigation and dispute resolution. +21. `/rightsClarifier` - Clarify legal rights and responsibilities in specific contexts. +22. `/disputeResolutionAdvisor` - Provide guidance on alternative dispute resolution methods. +23. `/legalProcessNavigator` - Navigate through legal procedures and court processes. +24. `/legalRiskAssessment` - Assess legal risks associated with business decisions and actions. + +### Compliance and Ethics: +25. `/complianceChecklist` - Generate compliance checklists for specific industries or regulations. +26. `/ethicsCodeAnalyzer` - Analyze ethical codes and professional conduct standards. +27. `/privacyPolicyGenerator` - Create privacy policies and data protection statements. +28. `/anti-discriminationPolicyCreator` - Develop anti-discrimination policies for organizations. + +### Contract Management and Review: +29. `/contractAnalyzer` - Review contracts for legal risks, ambiguities, and compliance issues. +30. `/contractRenewalReminder` - Send reminders for contract renewals and expiration dates. +31. `/contractNegotiationHelper` - Provide tips and strategies for contract negotiations. +32. `/contractAmendmentGenerator` - Generate amendments to existing contracts. + +### Compliance Monitoring and Reporting: +33. `/regulatoryComplianceTracker` - Monitor regulatory changes and compliance requirements. +34. `/auditPreparationAssistant` - Assist in preparing for legal audits and compliance checks. +35. `/incidentReportingTool` - Facilitate incident reporting and documentation for legal purposes. + +### Intellectual Property and Trademarks: +36. `/trademarkSearchTool` - Conduct trademark searches and registrations. +37. `/copyrightRegistrationAssistant` - Assist in registering copyrights for creative works. +38. `/patentApplicationGenerator` - Generate patent applications and documentation. + +### Financial and Tax Legal Support: +39. `/taxComplianceChecker` - Check tax compliance requirements and deadlines. +40. `/financialDisclosureAssistant` - Assist in preparing financial disclosures for legal purposes. +41. `/businessStructureAdvisor` - Provide guidance on business entity formation and structures. + +### Litigation and Courtroom Support: +42. `/litigationTimelineBuilder` - Create timelines for litigation cases and court proceedings. +43. `/evidenceManagementSystem` - Manage and organize evidence for legal cases. +44. `/courtAppearancePreparationTool` - Prepare for court appearances and hearings. + +### Family Law and Domestic Matters: +45. `/divorceSettlementPlanner` - Plan settlements for divorce and separation cases. +46. `/childCustodyEvaluator` - Evaluate factors influencing child custody arrangements. +47. `/prenuptialAgreementGenerator` - Generate prenuptial agreements for couples. + +### Real Estate and Property Law: +48. `/propertyTitleSearchTool` - Conduct property title searches and investigations. +49. `/leaseAgreementCreator` - Create lease agreements for residential and commercial properties. +50. `/landlordTenantDisputeResolver` - Resolve disputes between landlords and tenants. + +### Immigration and Citizenship: +51. `/visaApplicationAdvisor` - Provide guidance on visa applications and immigration processes. +52. `/citizenshipTestPrepTool` - Prepare for citizenship tests and interviews. + +### Personal Injury and Compensation: +53. `/personalInjuryClaimAssessment` - Assess potential compensation for personal injury claims. +54. `/workersCompensationCalculator` - Calculate workers' compensation benefits. + +### Employment Law: +55. `/employmentContractGenerator` - Generate employment contracts and offer letters. +56. `/wrongfulTerminationAdvisor` - Provide guidance on wrongful termination claims. + +### Dispute Resolution and Mediation: +57. `/mediationSessionPlanner` - Plan and schedule mediation sessions for legal disputes. +58. `/arbitrationClauseCreator` - Create arbitration clauses for contracts and agreements. + +### General Legal Tools and Utilities: +59. `/legalDocumentTranslator` - Translate legal documents between languages. +60. `/legalFeeCalculator` - Calculate legal fees and costs for legal services. +61. `/legalCalendarAssistant` - Manage legal deadlines and appointments. +62. `/e-discoveryTool` - Assist in electronic discovery and document management. + +### Accessibility and Inclusivity: +63. `/accessibleLegalContentReader` - Provide accessible formats for legal documents. +64. `/languageAccessibilityTool` - Enable multilingual support for legal interactions. + +### Miscellaneous Legal Services: +65. `/willsAndTrustsPlanner` - Plan and draft wills, trusts, and estate plans. +66. `/consumerRightsAdvisor` - Offer advice on consumer rights and protections. +67. `/animalRightsConsultant` - Provide legal guidance on animal rights issues. +68. `/humanRightsComplianceChecker` - Check compliance with human rights standards. + +### Bot Management and Interaction: +69. `/botInitializationGuide` - Guide users on initializing and using the legal bot. +70. `/userProfileManager` - Manage user profiles and preferences for personalized services. +71. `/interactionHistoryViewer` - View history of interactions and queries for reference. + +### Advanced AI Features: +72. `/AIComplianceMonitor` - Monitor AI usage and compliance with ethical guidelines. +73. `/AIAssistedResearchTool` - Use AI to assist in legal research and analysis. +74. `/AIEthicsConsultant` - Consult AI ethics experts on ethical dilemmas and considerations. + +### Security and Privacy: +75. `/dataProtectionAdvisor` - Provide guidance on data protection and privacy laws. +76. `/securityAuditPreparer` - Prepare for security audits and compliance assessments. + +### Collaboration and Teamwork: +77. `/legalTeamCollaborationSpace` - Create collaborative spaces + + for legal teams and professionals. +78. `/caseSharingPlatform` - Share case details and collaborate with other legal professionals. + +### Community Engagement and Education: +79. `/legalEducationProvider` - Offer legal education courses and resources. +80. `/legalDiscussionForum` - Host forums for legal discussions and knowledge sharing. + +### Integration and Customization: +81. `/APIIntegrationGuide` - Guide developers on integrating with external APIs for legal services. +82. `/customCommandCreator` - Create custom commands and functionalities for personalized use. + +### Voice and Text Interaction: +83. `/voiceRecognitionAssistant` - Enable voice recognition for hands-free legal interactions. +84. `/textToVoiceConverter` - Convert text into speech for accessibility and communication. + +### Analytics and Insights: +85. `/legalDataAnalyticsTool` - Analyze legal data to identify trends and patterns. +86. `/legalPerformanceMetricsAnalyzer` - Measure legal performance and outcomes. + +### Crisis and Emergency Response: +87. `/legalEmergencyResponsePlan` - Develop emergency response plans for legal crises. +88. `/emergencyContactManager` - Manage emergency contacts and resources for legal emergencies. + +### Client Relations and Support: +89. `/clientFeedbackCollector` - Collect feedback and improve legal services based on client input. +90. `/clientSatisfactionSurveyor` - Conduct surveys to assess client satisfaction and needs. + +### Multifactor Authentication and Security: +91. `/multiFactorAuthenticator` - Implement multi-factor authentication for secure access. +92. `/userPrivacySettingsManager` - Manage user privacy settings and data protection preferences. + +### Industry-Specific Legal Services: +93. `/healthcareComplianceAdvisor` - Provide guidance on healthcare compliance and regulations. +94. `/financeIndustryRegulatoryCompliance` - Assist in regulatory compliance for financial institutions. + +### Legal Marketing and Outreach: +95. `/legalBrandIdentityCreator` - Create brand identity and marketing materials for legal services. +96. `/socialMediaEngagementManager` - Manage social media presence and engagement for legal firms. + +### Compliance Certifications and Assessments: +97. `/ISOComplianceChecker` - Check compliance with ISO standards and certifications. +98. `/legalAuditPreparationAssistant` - Prepare for legal audits and compliance assessments. +99. `/complianceCertificationAdvisor` - Provide guidance on obtaining compliance certifications. + +### User Interface and Experience: +100. `/legalBotUserGuide` - Offer a comprehensive guide on using the legal bot efficiently and effectively. + 1. `/article` - Generate an informative article on a specific family law topic. 2. `/caseBrief` - Generate a brief summary of a legal case relevant to family law. 3. `/studyAid` - Create a study aid or flashcards for a specific legal topic. @@ -152,4 +320,4 @@ Action Commands: 80. `{{defendAgainstAllegations}}` - Defend parents against false or exaggerated allegations of abuse, neglect, or misconduct in CYFD cases, safeguarding their rights and reputation. Initialization Text: -Begin by saying "Justice Juggernaut the Anti-CYFD Bot Initiated" to initialize the bot. \ No newline at end of file +Begin by saying "Justice Juggernaut the Anti-CYFD Bot Initiated" to initialize the bot. diff --git a/justice_juggernaut_connector.tsx b/justice_juggernaut_connector.tsx new file mode 100644 index 0000000..7fdb558 --- /dev/null +++ b/justice_juggernaut_connector.tsx @@ -0,0 +1,71 @@ +import justiceJuggernautSources, { JurisdictionSources, DataSource } from './justice_juggernaut_sources'; + +// Function to retrieve data sources for a given jurisdiction +const getDataSourcesForJurisdiction = (jurisdiction: string): DataSource[] | undefined => { + // Normalize jurisdiction name (e.g., convert to lowercase) + const normalizedJurisdiction = jurisdiction.toLowerCase(); + + // Retrieve data sources for the specified jurisdiction from the sources object + const sources: JurisdictionSources = justiceJuggernautSources; + const jurisdictionSources = sources[normalizedJurisdiction]; + + if (!jurisdictionSources) { + console.error(`No data sources found for jurisdiction: ${jurisdiction}`); + return undefined; + } + + // Extract data sources based on the jurisdiction type (object or array) + if (Array.isArray(jurisdictionSources)) { + // Advanced sources are directly provided as an array + return jurisdictionSources; + } else { + // Regular jurisdiction sources are nested within an object + const sourcesArray: DataSource[] = []; + + // Iterate over object keys to retrieve data sources + Object.keys(jurisdictionSources).forEach((key) => { + const dataSource = jurisdictionSources[key]; + if (Array.isArray(dataSource)) { + // Handle advanced sources within the nested object + sourcesArray.push(...dataSource); + } else { + // Handle regular data sources within the nested object + sourcesArray.push(dataSource as DataSource); + } + }); + + return sourcesArray; + } +}; + +// Function to retrieve all data sources from the entire collection +const getAllDataSources = (): DataSource[] => { + const allSources: DataSource[] = []; + + // Iterate over each jurisdiction in the sources object + Object.keys(justiceJuggernautSources).forEach((jurisdiction) => { + const jurisdictionSources = justiceJuggernautSources[jurisdiction]; + + if (Array.isArray(jurisdictionSources)) { + // Add advanced sources directly to the collection + allSources.push(...jurisdictionSources); + } else { + // Add regular and advanced sources from the nested object + Object.keys(jurisdictionSources).forEach((key) => { + const dataSource = jurisdictionSources[key]; + if (Array.isArray(dataSource)) { + // Handle advanced sources within the nested object + allSources.push(...dataSource); + } else { + // Handle regular data sources within the nested object + allSources.push(dataSource as DataSource); + } + }); + } + }); + + return allSources; +}; + +// Export functions for external usage +export { getDataSourcesForJurisdiction, getAllDataSources }; diff --git a/justice_juggernaut_sources.tsx b/justice_juggernaut_sources.tsx index 4263a2e..e584d01 100644 --- a/justice_juggernaut_sources.tsx +++ b/justice_juggernaut_sources.tsx @@ -1,317 +1,271 @@ // File: justice_juggernaut_sources.tsx interface DataSource { - name: string; - url: string; - } - - interface JurisdictionSources { - [key: string]: DataSource[] | Record; - } - - const justiceJuggernautSources: JurisdictionSources = { - "New Mexico": { - "New Mexico Compilation Commission (NMCC)": { - name: "NMCC Website", - url: "http://www.nmcompcomm.us/" - }, - "New Mexico State Legislature": { - name: "New Mexico Legislature Website", - url: "https://www.nmlegis.gov/" - }, - "New Mexico Courts Case Lookup": { - name: "New Mexico Courts Case Lookup", - url: "https://caselookup.nmcourts.gov/caselookup/" - }, - "New Mexico Administrative Code (NMAC)": { - name: "New Mexico Administrative Code", - url: "https://www.srca.nm.gov/nmac/" - }, - "New Mexico Register of Rules and Regulations": { - name: "New Mexico Register of Rules and Regulations", - url: "https://www.nmcpr.state.nm.us/nmregister/" - }, - "New Mexico Supreme Court Opinions": { - name: "New Mexico Supreme Court Opinions", - url: "https://nmsupremecourt.nmcourts.gov/" - }, - "New Mexico Statutes and Court Rules": { - name: "New Mexico Compilation Commission", - url: "https://www.nmcompcomm.us/" - }, - "New Mexico Public Regulation Commission (NMPRC) Decisions and Orders": { - name: "NMPRC Decisions and Orders", - url: "https://www.nmprc.state.nm.us/decisions-orders.aspx" - }, - "New Mexico Environmental Improvement Board (EIB) Decisions": { - name: "New Mexico EIB Decisions", - url: "https://www.env.nm.gov/eib/eib-decisions/" - }, - "New Mexico Attorney General Opinions": { - name: "New Mexico Attorney General Opinions", - url: "https://www.nmag.gov/opinions.aspx" - }, - "New Mexico Secretary of State Business Services": { - name: "New Mexico Secretary of State Business Services", - url: "https://www.sos.state.nm.us/business-services/" - }, - "New Mexico Taxation and Revenue Department": { - name: "New Mexico Taxation and Revenue Department", - url: "https://www.tax.newmexico.gov/" - }, - "New Mexico Workers' Compensation Administration (WCA)": { - name: "New Mexico WCA", - url: "https://workerscomp.nm.gov/" - }, - "New Mexico Indian Affairs Department": { - name: "New Mexico Indian Affairs Department", - url: "https://www.iad.state.nm.us/" - }, - "New Mexico Land Commissioner's Office": { - name: "New Mexico Land Commissioner's Office", - url: "https://www.nmstatelands.org/" - }, - "New Mexico Department of Health": { - name: "New Mexico Department of Health", - url: "https://nmhealth.org/" - }, - "New Mexico Environment Department": { - name: "New Mexico Environment Department", - url: "https://www.env.nm.gov/" - }, - "New Mexico State Bar Association": { - name: "New Mexico State Bar Association", - url: "https://www.nmbar.org/" - }, - "New Mexico Legal Aid": { - name: "New Mexico Legal Aid", - url: "https://www.newmexicolegalaid.org/" - }, - "New Mexico Court of Appeals Opinions": { - name: "New Mexico Court of Appeals Opinions", - url: "https://nmcourts.gov/court-of-appeals/opinions.aspx" - }, - "New Mexico Compilation Commission": { - name: "New Mexico Compilation Commission", - url: "http://www.nmcompcomm.us/" - }, - "New Mexico Courts and Legislature": { - name: "New Mexico Courts and Legislature", - url: "https://www.nmcourts.gov/" - }, - "New Mexico State Library": { - name: "New Mexico State Library", - url: "http://www.nmstatelibrary.org/" - }, - "University of New Mexico Law Library": { - name: "University of New Mexico Law Library", - url: "https://lawlibrary.unm.edu/" - }, - "Santa Fe Public Library": { - name: "Santa Fe Public Library", - url: "https://santafelibrary.org/" - }, - "Supreme Court Law Library": { - name: "Supreme Court Law Library", - url: "https://www.nmbar.org/Nmstatebar/For_Attorneys/Research_and_Resources_/Law_Library.aspx" + name: string; + url: string; +} + +interface JurisdictionSources { + [jurisdiction: string]: DataSource[] | Record; +} + +const justiceJuggernautSources: JurisdictionSources = { + "New Mexico": { + "New Mexico Compilation Commission (NMCC)": { + name: "NMCC Website", + url: "http://www.nmcompcomm.us/" + }, + "New Mexico State Legislature": { + name: "New Mexico Legislature Website", + url: "https://www.nmlegis.gov/" + }, + "New Mexico Courts Case Lookup": { + name: "New Mexico Courts Case Lookup", + url: "https://caselookup.nmcourts.gov/caselookup/" + }, + "New Mexico Administrative Code (NMAC)": { + name: "New Mexico Administrative Code", + url: "https://www.srca.nm.gov/nmac/" + }, + "New Mexico Register of Rules and Regulations": { + name: "New Mexico Register of Rules and Regulations", + url: "https://www.nmcpr.state.nm.us/nmregister/" + }, + "New Mexico Supreme Court Opinions": { + name: "New Mexico Supreme Court Opinions", + url: "https://nmsupremecourt.nmcourts.gov/" + }, + "New Mexico Statutes and Court Rules": { + name: "New Mexico Statutes and Court Rules", + url: "https://www.nmcompcomm.us/" + }, + "New Mexico Public Regulation Commission (NMPRC) Decisions and Orders": { + name: "NMPRC Decisions and Orders", + url: "https://www.nmprc.state.nm.us/decisions-orders.aspx" + }, + "New Mexico Environmental Improvement Board (EIB) Decisions": { + name: "New Mexico EIB Decisions", + url: "https://www.env.nm.gov/eib/eib-decisions/" + }, + "New Mexico Attorney General Opinions": { + name: "New Mexico Attorney General Opinions", + url: "https://www.nmag.gov/opinions.aspx" + }, + "New Mexico Secretary of State Business Services": { + name: "New Mexico Secretary of State Business Services", + url: "https://www.sos.state.nm.us/business-services/" + }, + "New Mexico Taxation and Revenue Department": { + name: "New Mexico Taxation and Revenue Department", + url: "https://www.tax.newmexico.gov/" + }, + "New Mexico Workers' Compensation Administration (WCA)": { + name: "New Mexico WCA", + url: "https://workerscomp.nm.gov/" + }, + "New Mexico Indian Affairs Department": { + name: "New Mexico Indian Affairs Department", + url: "https://www.iad.state.nm.us/" + }, + "New Mexico Land Commissioner's Office": { + name: "New Mexico Land Commissioner's Office", + url: "https://www.nmstatelands.org/" + }, + "New Mexico Department of Health": { + name: "New Mexico Department of Health", + url: "https://nmhealth.org/" + }, + "New Mexico Environment Department": { + name: "New Mexico Environment Department", + url: "https://www.env.nm.gov/" + }, + "New Mexico State Bar Association": { + name: "New Mexico State Bar Association", + url: "https://www.nmbar.org/" + }, + "New Mexico Legal Aid": { + name: "New Mexico Legal Aid", + url: "https://www.newmexicolegalaid.org/" + }, + "New Mexico Court of Appeals Opinions": { + name: "New Mexico Court of Appeals Opinions", + url: "https://nmcourts.gov/court-of-appeals/opinions.aspx" + }, + "New Mexico State Library": { + name: "New Mexico State Library", + url: "http://www.nmstatelibrary.org/" + }, + "University of New Mexico Law Library": { + name: "University of New Mexico Law Library", + url: "https://lawlibrary.unm.edu/" + }, + "Santa Fe Public Library": { + name: "Santa Fe Public Library", + url: "https://santafelibrary.org/" + }, + "Supreme Court Law Library": { + name: "Supreme Court Law Library", + url: "https://www.nmbar.org/Nmstatebar/For_Attorneys/Research_and_Resources_/Law_Library.aspx" + }, + "Law Library of Congress": { + name: "Law Library of Congress", + url: "https://www.loc.gov/law/" + }, + "Library of Congress": { + name: "Library of Congress", + url: "https://www.loc.gov/" + }, + // Advanced sources for New Mexico + "Advanced_Sources": [ + { + name: "Westlaw", + url: "https://legal.thomsonreuters.com/en/products/westlaw" }, - "Law Library of Congress": { - name: "Law Library of Congress", - url: "https://www.loc.gov/law/" + { + name: "LexisNexis", + url: "https://www.lexisnexis.com/" }, - "Library of Congress": { - name: "Library of Congress", - url: "https://www.loc.gov/" + { + name: "Bloomberg Law", + url: "https://www.bloomberglaw.com/" }, - "Advanced_Sources": [ - { - name: "Westlaw", - url: "https://legal.thomsonreuters.com/en/products/westlaw" - }, - { - name: "LexisNexis", - url: "https://www.lexisnexis.com/" - }, - { - name: "Bloomberg Law", - url: "https://www.bloomberglaw.com/" - }, - { - name: "HeinOnline", - url: "https://home.heinonline.org/" - }, - { - name: "Fastcase", - url: "https://www.fastcase.com/" - }, - { - name: "Google Scholar", - url: "https://scholar.google.com/" - }, - { - name: "PACER", - url: "https://www.pacer.gov/" - }, - { - name: "Cornell Legal Information Institute", - url: "https://www.law.cornell.edu/" - }, - { - name: "FindLaw", - url: "https://www.findlaw.com/" - }, - { - name: "American Bar Association", - url: "https://www.americanbar.org/" - }, - { - name: "New Mexico Compilation Commission", - url: "http://www.nmcompcomm.us/" - }, - { - name: "New Mexico Judicial Branch", - url: "https://www.nmcourts.gov/" - }, - { - name: "New Mexico Statutes and Court Rules", - url: "https://laws.nmonesource.com/" - }, - { - name: "New Mexico State Bar Association", - url: "https://www.nmbar.org/" - }, - // Add more advanced sources for New Mexico here - ], - }, - "California": { - "California Legislative Information": { - name: "California Legislative Information", - url: "https://leginfo.legislature.ca.gov/" + { + name: "HeinOnline", + url: "https://home.heinonline.org/" }, - "California Courts": { - name: "California Courts", - url: "https://www.courts.ca.gov/" + { + name: "Fastcase", + url: "https://www.fastcase.com/" }, - "California Law": { - name: "California Law", - url: "https://leginfo.legislature.ca.gov/faces/codes.xhtml" + { + name: "Google Scholar", + url: "https://scholar.google.com/" }, - "California Regulations": { - name: "California Regulations", - url: "https://govt.westlaw.com/calregs/" + { + name: "PACER", + url: "https://www.pacer.gov/" }, - "California Law Library": { - name: "California Law Library", - url: "http://www.saclaw.org/" + { + name: "Cornell Legal Information Institute", + url: "https://www.law.cornell.edu/" }, - "Law Library of Congress": { - name: "Law Library of Congress", - url: "https://www.loc.gov/law/" + { + name: "FindLaw", + url: "https://www.findlaw.com/" }, - "Library of Congress": { - name: "Library of Congress", - url: "https://www.loc.gov/" + { + name: "American Bar Association", + url: "https://www.americanbar.org/" }, - "Advanced_Sources": [ - { - name: "Westlaw", - url: "https://legal.thomsonreuters.com/en/products/westlaw" - }, - { - name: "LexisNexis", - url: "https://www.lexisnexis.com/" - }, - { - name: "Bloomberg Law", - url: "https://www.bloomberglaw.com/" - }, - { - name: "HeinOnline", - url: "https://home.heinonline.org/" - }, - { - name: "Fastcase", - url: "https://www.fastcase.com/" - }, - { - name: "Google Scholar", - url: "https://scholar.google.com/" - }, - { - name: "PACER", - url: "https://www.pacer.gov/" - }, - { - name: "Cornell Legal Information Institute", - url: "https://www.law.cornell.edu/" - }, - { - name: "FindLaw", - url: "https://www.findlaw.com/" - }, - { - name: "California Legislative Counsel Bureau", - url: "https://leginfo.legislature.ca.gov/" - }, - { - name: "California Courts", - url: "https://www.courts.ca.gov/" - }, - { - name: "California Law Revision Commission", - url: "https://clrc.ca.gov/" - }, - { - name: "California State Bar", - url: "https://www.calbar.ca.gov/" - }, - // Add more advanced sources for California here - ], + // Add more advanced sources for New Mexico here + ], + }, + "California": { + "California Legislative Information": { + name: "California Legislative Information", + url: "https://leginfo.legislature.ca.gov/" + }, + "California Courts": { + name: "California Courts", + url: "https://www.courts.ca.gov/" + }, + "California Law": { + name: "California Law", + url: "https://leginfo.legislature.ca.gov/faces/codes.xhtml" }, + "California Regulations": { + name: "California Regulations", + url: "https://govt.westlaw.com/calregs/" + }, + "California Law Library": { + name: "California Law Library", + url: "http://www.saclaw.org/" + }, + // Advanced sources for California "Advanced_Sources": [ { - name: "American Law Institute", - url: "https://www.ali.org/" + name: "Westlaw", + url: "https://legal.thomsonreuters.com/en/products/westlaw" }, { - name: "Legal Information Institute", - url: "https://www.law.cornell.edu/" + name: "LexisNexis", + url: "https://www.lexisnexis.com/" }, { - name: "Public Library of Law", - url: "https://www.plol.org/" + name: "Bloomberg Law", + url: "https://www.bloomberglaw.com/" }, { - name: "Justia", - url: "https://www.justia.com/" + name: "HeinOnline", + url: "https://home.heinonline.org/" }, { - name: "National Conference of State Legislatures", - url: "https://www.ncsl.org/" + name: "Fastcase", + url: "https://www.fastcase.com/" }, { - name: "National Center for State Courts", - url: "https://www.ncsc.org/" + name: "Google Scholar", + url: "https://scholar.google.com/" }, { - name: "American Civil Liberties Union", - url: "https://www.aclu.org/" + name: "PACER", + url: "https://www.pacer.gov/" }, { - name: "Federal Judicial Center", - url: "https://www.fjc.gov/" + name: "Cornell Legal Information Institute", + url: "https://www.law.cornell.edu/" }, { - name: "National Archives and Records Administration", - url: "https://www.archives.gov/" + name: "FindLaw", + url: "https://www.findlaw.com/" }, { - name: "United Nations Legal Research", - url: "https://www.un.org/law/" + name: "California Legislative Counsel Bureau", + url: "https://leginfo.legislature.ca.gov/" }, - // Add more advanced sources here + // Add more advanced sources for California here ], - }; - - export default justiceJuggernautSources; - \ No newline at end of file + }, + // Global advanced sources + "Advanced Sources": [ + { + name: "American Law Institute", + url: "https://www.ali.org/" + }, + { + name: "Public Library of Law", + url: "https://www.plol.org/" + }, + { + name: "Justia", + url: "https://www.justia.com/" + }, + { + name: "National Conference of State Legislatures", + url: "https://www.ncsl.org/" + }, + { + name: "National Center for State Courts", + url: "https://www.ncsc.org/" + }, + { + name: "American Civil Liberties Union", + url: "https://www.aclu.org/" + }, + { + name: "Federal Judicial Center", + url: "https://www.fjc.gov/" + }, + { + name: "National Archives and Records Administration", + url: "https://www.archives.gov/" + }, + { + name: "United Nations Legal Research", + url: "https://www.un.org/law/" + }, + // Add more global advanced sources here + ], +}; + +export default justiceJuggernautSources; diff --git a/requirements.txt b/requirements.txt index 39d9ba2..77fb8a3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,14 @@ +huggingface +transformers +legal-doc-processing +lawLib +BeautifulSoup +scrapy +docassemble +docassemble.webapp +Pydantic +law +justice @fortaine/fetch-event-source==3.0.6 @hello-pangea/dnd==16.2.0 @svgr/webpack==6.5.1 diff --git a/tsconfig.json b/tsconfig.json index c73eef3..a9fdc03 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,6 +23,12 @@ "@/*": ["./*"] } }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "app/calcTextareaHeight.ts"], + "include": [ + "next-env.d.ts", + "**/*.ts", + "**/*.tsx", + ".next/types/**/*.ts", + "app/calcTextareaHeight.ts" + ], "exclude": ["node_modules"] }