Skip to content

update fav #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 312 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
Show all changes
312 commits
Select commit Hold shift + click to select a range
3201364
Update index.js
damonkost Jan 20, 2025
40bf12f
Update index.js
damonkost Jan 20, 2025
cc81b3e
Update index.html
damonkost Jan 20, 2025
cb0a555
Update index.html
damonkost Jan 20, 2025
c5be67a
Update App.jsx
damonkost Jan 20, 2025
d308c50
Update App.jsx
damonkost Jan 20, 2025
92f0350
Update index.js
damonkost Jan 20, 2025
d234876
Update Button.jsx
damonkost Jan 20, 2025
fa61d90
Update index.html
damonkost Jan 20, 2025
8a139dd
Update index.js
damonkost Jan 20, 2025
72be274
Update Button.jsx
damonkost Jan 20, 2025
41c52dd
Update Button.jsx
damonkost Jan 20, 2025
8e58b2c
Update Button.jsx
damonkost Jan 20, 2025
2ea3883
Update index.html
damonkost Jan 20, 2025
942e372
Update index.html
damonkost Jan 20, 2025
06829fe
Update index.html
damonkost Jan 20, 2025
1db6e60
Update index.css
damonkost Jan 20, 2025
fa52716
Update index.css
damonkost Jan 20, 2025
80fdac2
Update index.css
damonkost Jan 20, 2025
30cc390
Update index.html
damonkost Jan 20, 2025
e7b3392
Update index.css
damonkost Jan 20, 2025
0441d65
Update index.css
damonkost Jan 20, 2025
133093b
Update index.html
damonkost Jan 20, 2025
228c297
Update Button.jsx
damonkost Jan 20, 2025
773d30f
Update index.css
damonkost Jan 20, 2025
f2a46a0
Update index.css
damonkost Jan 20, 2025
d50f56c
Update index.css
damonkost Jan 20, 2025
b11acd7
Update Button.jsx
damonkost Jan 20, 2025
77bb327
Update Button.jsx
damonkost Jan 20, 2025
79f9613
Update Button.jsx
damonkost Jan 20, 2025
e6449c9
Update App.jsx
damonkost Jan 20, 2025
ac6be4c
Update App.jsx
damonkost Jan 20, 2025
8ef01a3
Update index.css
damonkost Jan 20, 2025
cd36f59
Update index.css
damonkost Jan 20, 2025
b3a61c3
Update index.css
damonkost Jan 20, 2025
55d4730
Update index.css
damonkost Jan 20, 2025
4a6bbcb
Update index.css
damonkost Jan 20, 2025
80ae8ae
Update index.css
damonkost Jan 20, 2025
ec88c14
Update index.css
damonkost Jan 20, 2025
99a7126
Update index.css
damonkost Jan 20, 2025
67a734b
Update index.css
damonkost Jan 20, 2025
cf02244
Update index.css
damonkost Jan 20, 2025
af5afde
Update index.css
damonkost Jan 20, 2025
702f384
Update index.css
damonkost Jan 20, 2025
42aca84
Update index.css
damonkost Jan 20, 2025
c416822
Update Button.jsx
damonkost Jan 20, 2025
474303a
Update Button.jsx
damonkost Jan 20, 2025
e57038d
Update Button.jsx
damonkost Jan 20, 2025
0a22551
Update Button.jsx
damonkost Jan 20, 2025
3b823dc
Update index.html
damonkost Jan 20, 2025
7129e1d
Update index.css
damonkost Jan 20, 2025
9a70598
Update index.css
damonkost Jan 20, 2025
fbb6a8b
Update index.html
damonkost Jan 20, 2025
1a23206
Update index.html
damonkost Jan 20, 2025
8e88c8d
Update index.css
damonkost Jan 20, 2025
b3b3447
Update index.css
damonkost Jan 20, 2025
1f3db5f
Update index.css
damonkost Jan 20, 2025
2936ea3
Update index.css
damonkost Jan 20, 2025
dfb7858
Update Button.jsx
damonkost Jan 20, 2025
e80f866
Update Button.jsx
damonkost Jan 20, 2025
18bd30a
Update index.css
damonkost Jan 20, 2025
e06369f
Update index.css
damonkost Jan 20, 2025
129b68b
Update index.css
damonkost Jan 20, 2025
ae760e2
Update index.css
damonkost Jan 20, 2025
e4bfe77
Update index.css
damonkost Jan 20, 2025
2c7f334
Update Button.jsx
damonkost Jan 20, 2025
447e525
Update App.jsx
damonkost Jan 20, 2025
589258b
Update App.jsx
damonkost Jan 20, 2025
ea0e628
Update App.jsx
damonkost Jan 20, 2025
ba68259
Update App.jsx
damonkost Jan 20, 2025
9d3c8bb
Update index.css
damonkost Jan 20, 2025
b885655
Update index.html
damonkost Jan 20, 2025
d229290
Update App.jsx
damonkost Jan 20, 2025
7142aa5
Update index.css
damonkost Jan 20, 2025
d986d15
Update Button.jsx
damonkost Jan 20, 2025
9fc97db
Update Button.jsx
damonkost Jan 20, 2025
7bead32
Update Button.jsx
damonkost Jan 20, 2025
084a8e4
Update Button.jsx
damonkost Jan 20, 2025
2fb98de
Update Button.jsx
damonkost Jan 20, 2025
81771e5
Update Button.jsx
damonkost Jan 20, 2025
bd9b605
Update ActiveCallDetail.jsx
damonkost Jan 20, 2025
b2f4c19
Update index.css
damonkost Jan 21, 2025
6f38863
Update index.css
damonkost Jan 21, 2025
3e2ade9
Update index.css
damonkost Jan 21, 2025
88d8f58
Update index.css
damonkost Jan 21, 2025
9c4b5a9
Update index.css
damonkost Jan 21, 2025
2256daf
Update index.css
damonkost Jan 21, 2025
d0cbfc8
Update index.css
damonkost Jan 21, 2025
01df406
Update index.css
damonkost Jan 21, 2025
eb27e01
Update index.css
damonkost Jan 21, 2025
47b2b7f
Update index.css
damonkost Jan 21, 2025
eea6c83
Update index.css
damonkost Jan 21, 2025
7927e1c
Update index.css
damonkost Jan 21, 2025
6975032
Update index.css
damonkost Jan 21, 2025
d42be16
Update Button.jsx
damonkost Jan 21, 2025
5443876
Update Button.jsx
damonkost Jan 21, 2025
0cfe786
Update Button.jsx
damonkost Jan 21, 2025
29eda31
Update Button.jsx
damonkost Jan 21, 2025
949d914
Update Button.jsx
damonkost Jan 21, 2025
5279c22
Update index.css
damonkost Jan 21, 2025
0f08133
Update Button.jsx
damonkost Jan 21, 2025
0d2d135
Update AssistantSpeechIndicator.jsx
damonkost Jan 21, 2025
9150d20
Update AssistantSpeechIndicator.jsx
damonkost Jan 21, 2025
78507e6
Update AssistantSpeechIndicator.jsx
damonkost Jan 21, 2025
495deed
Update AssistantSpeechIndicator.jsx
damonkost Jan 21, 2025
48180ca
Update App.jsx
damonkost Jan 21, 2025
ad0db2b
Update index.css
damonkost Jan 21, 2025
54c8a6e
Update AssistantSpeechIndicator.jsx
damonkost Jan 21, 2025
516c1cc
Update index.html
damonkost Jan 21, 2025
b447d7a
Update AssistantSpeechIndicator.jsx
damonkost Jan 21, 2025
ab79352
Update index.html
damonkost Jan 21, 2025
6822ded
Update index.css
damonkost Jan 21, 2025
9546e60
Update index.html
damonkost Jan 21, 2025
ab8c53f
Update App.jsx
damonkost Jan 21, 2025
00b0c31
Update index.html
damonkost Jan 21, 2025
24bd897
Update index.html
damonkost Jan 21, 2025
5ed34fc
Update Button.jsx
damonkost Jan 21, 2025
06ba94e
Update Button.jsx
damonkost Jan 21, 2025
2577b90
Update App.jsx
damonkost Jan 21, 2025
c7ea3f0
Update index.html
damonkost Jan 21, 2025
5cae93f
Update index.css
damonkost Jan 21, 2025
d73143e
Update index.html
damonkost Jan 21, 2025
46bdc48
remove space between title
damonkost Jan 21, 2025
8ff6491
Your commit message
damonkost Jan 21, 2025
c395a15
Create fviconrepl.ico
damonkost Jan 21, 2025
b36a9ec
Add files via upload
damonkost Jan 21, 2025
97227de
another
damonkost Jan 21, 2025
58fbc96
new url
damonkost Jan 23, 2025
459639c
commit dynaic dmoain wildcard
damonkost Jan 23, 2025
ed6ad65
update favicon1
damonkost Jan 23, 2025
743f48c
edits to button
damonkost Jan 23, 2025
72ba150
commit test
damonkost Jan 23, 2025
df689fc
add serverless json function parser
damonkost Jan 23, 2025
5db237d
add serverless function to update attorney data from webhook payload
damonkost Jan 23, 2025
ad1caf4
wohhooo
damonkost Jan 24, 2025
29611d5
serverless function oarsing
damonkost Jan 24, 2025
ab0ab7f
updated function and atty update fuynction mapoping
damonkost Jan 25, 2025
6f4de76
fix deployment
damonkost Jan 25, 2025
0fca392
webhook finalization
damonkost Jan 25, 2025
5cfa3fa
Add files via upload
damonkost Jan 25, 2025
6e0e16f
Attorney Hooks
damonkost Jan 25, 2025
f9766ce
Merge branch 'main' of https://github.com/damonkost/LegalScout
damonkost Jan 25, 2025
e54c3f7
fix json
damonkost Jan 25, 2025
f442587
vite.commit
damonkost Jan 25, 2025
62d2e7a
nump update
damonkost Jan 25, 2025
85ecb2d
react-app-rewired start
damonkost Jan 25, 2025
9bfc378
Add TensorFlow Lite model loading and update Vite configuration for R…
damonkost Jan 25, 2025
44990b3
Add welcome message, new CSS styles, and initial server functions for…
damonkost Jan 25, 2025
093ab95
Update Vercel configuration to rewrite routes and enhance security he…
damonkost Jan 25, 2025
2f9234e
Refactor build scripts, update Vercel rewrites, and upgrade Sentry de…
damonkost Jan 25, 2025
d9e7ad8
Enable source maps for production and update asset output paths in Vi…
damonkost Jan 25, 2025
c49a332
Add favicon link, configure Vite input, and implement main entry poin…
damonkost Jan 25, 2025
ca48ce4
Enhance UI layout with flexbox, add dynamic logo fetching based on su…
damonkost Jan 25, 2025
935fea2
Update package.json to add project description, change start script, …
damonkost Jan 25, 2025
d909c83
Merge branch 'main' of https://github.com/damonkost/LegalScout
damonkost Jan 25, 2025
790d068
Refactor comments in testWebhook.js for clarity and consistency
damonkost Jan 25, 2025
51c67c9
Add contact email column to subdomain table
damonkost Jan 25, 2025
0100d74
Fix formatting in package.json for better readability and structure
damonkost Jan 25, 2025
9474f3c
Fix formatting in package.json for improved structure and readability
damonkost Jan 25, 2025
e5bbab4
Refactor CSS styles for improved readability and consistency; add ind…
damonkost Jan 25, 2025
b9bc4ca
Refactor CSS comments for clarity and future styling guidance
damonkost Jan 25, 2025
3f59a26
Remove commented-out CSS properties for cleaner code
damonkost Jan 25, 2025
e2a27b2
Add margin to #app to avoid overlap with fixed header
damonkost Jan 25, 2025
5347d4f
Update hero text color for better visibility
damonkost Jan 25, 2025
5e39eff
Add statement section to index.html for additional content
damonkost Jan 25, 2025
42524a8
Revert "Add TensorFlow Lite model loading and update Vite configurati…
damonkost Jan 25, 2025
3c08a4d
Update header styles and correct HTML structure for improved layout
damonkost Jan 25, 2025
9133c5f
Refactor main.jsx to use ReactDOM.createRoot and clean up Vite config…
damonkost Jan 26, 2025
f346727
Refactor main.jsx to use ReactDOM.createRoot and clean up Vite config…
damonkost Jan 26, 2025
a4ac79a
Enhance Vite configuration with HTTPS support, source maps, and path …
damonkost Jan 26, 2025
14b03cc
Improve Vite configuration by filtering out problematic protocols and…
damonkost Jan 26, 2025
1523eb0
Add Vite configuration backup with HTTPS support, source maps, and pa…
damonkost Jan 26, 2025
fd95e94
Add 'dev' script to package.json for Vite development
damonkost Jan 26, 2025
e3b0bd7
Enhance Vite configuration to open server automatically and improve p…
damonkost Jan 26, 2025
1af3bbe
Refactor project structure by updating package.json and reverting HTM…
damonkost Jan 26, 2025
6fa794b
Add build script placeholder to package.json
damonkost Jan 26, 2025
5922f59
Remove placeholder build command from package.json
damonkost Jan 26, 2025
a118930
Add build script placeholder to package.json
damonkost Jan 26, 2025
96e558d
Update build script placeholder in package.json
damonkost Jan 26, 2025
8b87cf4
Update build script in package.json to use react-scripts
damonkost Jan 26, 2025
0141ba5
Add react-scripts dependency to package.json
damonkost Jan 26, 2025
0834a60
Update build script to include NODE_OPTIONS for compatibility
damonkost Jan 26, 2025
5b0127e
Add React and ReactDOM dependencies to package.json
damonkost Jan 26, 2025
28cc059
No code changes made
damonkost Jan 26, 2025
ac0d6ab
Refactor ReactDOM import and rendering method for compatibility
damonkost Jan 26, 2025
9a1242e
Reorder react-scripts and react-dom dependencies in package.json
damonkost Jan 26, 2025
01d9fcc
Add @vapi-ai/web dependency to package.json
damonkost Jan 26, 2025
2a39082
Update rendering method to use React 18's createRoot for improved per…
damonkost Jan 26, 2025
12671e8
Update dependencies in yarn.lock for @daily-co/daily-js and @sentry p…
damonkost Jan 26, 2025
4731931
Remove unused dependencies from package.json
damonkost Jan 26, 2025
62bf277
Refactor rendering method to use ReactDOM.render for compatibility wi…
damonkost Jan 26, 2025
22fc894
Add build script to package.json for legacy OpenSSL support
damonkost Jan 26, 2025
1ec769a
Add react-scripts dependency to package.json
damonkost Jan 26, 2025
e11fff2
Add react-scripts dependency to package.json
damonkost Jan 26, 2025
dd5b82a
Add React and ReactDOM dependencies to package.json
damonkost Jan 26, 2025
ca2f89d
Add React and ReactDOM dependencies to package.json
damonkost Jan 26, 2025
e9d4122
Add @vapi-ai/web dependency to package.json and clean up App component
damonkost Jan 26, 2025
53f1df1
Add react-spinners dependency to package.json
damonkost Jan 26, 2025
5427b4c
Add @babel/plugin-proposal-private-property-in-object to devDependencies
damonkost Jan 26, 2025
d5ed8ec
Add eslint-plugin-react-hooks to devDependencies
damonkost Jan 26, 2025
1fb03de
Implement dynamic attorney profile loading and enhance call start UI
damonkost Jan 27, 2025
d092940
Migrate project to Next.js and TypeScript, update dependencies
damonkost Jan 27, 2025
019828c
Migrate to React 18 rendering with createRoot
damonkost Jan 27, 2025
c678e3d
Configure Next.js with unoptimized images and React strict mode
damonkost Jan 27, 2025
42afcac
Refactor attorney profile loading and improve error handling in App c…
damonkost Jan 27, 2025
334f6e1
Enhance attorney API endpoint with improved error handling and logging
damonkost Jan 27, 2025
847484a
Implement dynamic attorney profile fetching from API endpoint
damonkost Jan 27, 2025
e61be51
Add dynamic page title based on attorney profile
damonkost Jan 27, 2025
303f27d
Update attorney configuration and add logging for attorney data retri…
damonkost Jan 27, 2025
c88418f
Refactor App component and add logging for attorney profile
damonkost Jan 27, 2025
1c0fdfa
Remove unnecessary CSS import from App component
damonkost Jan 27, 2025
5a7d10e
Remove ErrorBoundary component from App component
damonkost Jan 27, 2025
a5c934e
Update Next.js build artifacts and remove ErrorBoundary references
damonkost Jan 27, 2025
fa2b976
Regenerate Next.js build artifacts with updated build ID
damonkost Jan 27, 2025
81a6dc4
Add dynamic attorney configuration update endpoint with file-based pe…
damonkost Jan 29, 2025
ec18e37
Decode and sanitize query parameters for attorney configuration endpoint
damonkost Jan 29, 2025
60fa68d
Add POST request handler for attorney configuration endpoint
damonkost Jan 29, 2025
df3794a
implement bubbles
damonkost Jan 30, 2025
2d4fcdf
bg visibility
damonkost Jan 30, 2025
be6df78
updated launch.json
damonkost Jan 30, 2025
a402c4a
updated launch js
damonkost Jan 30, 2025
cdd4f60
revent
damonkost Jan 30, 2025
9af459b
update host
damonkost Jan 30, 2025
cbe1cdc
revise laucnh config
damonkost Jan 30, 2025
7c4563a
r2
damonkost Jan 30, 2025
178534e
r3
damonkost Jan 31, 2025
aa2ae0f
back to redeploy
damonkost Jan 31, 2025
04e0d78
Clean up build artifacts and resolve merge conflicts
damonkost Jan 31, 2025
4b45e13
merge all changes
damonkost Jan 31, 2025
691fe7d
redo
damonkost Jan 31, 2025
a6e8ce6
update lcl
damonkost Jan 31, 2025
042cb9d
update depend
damonkost Jan 31, 2025
be0a209
fix depen 2
damonkost Jan 31, 2025
f5f1ee1
fix dep 4
damonkost Jan 31, 2025
681e625
f5
damonkost Jan 31, 2025
80d089f
total recall
damonkost Jan 31, 2025
cc9018e
Update VS Code settings
damonkost Feb 1, 2025
bba68a6
Refactor App component and styling
damonkost Feb 1, 2025
0630345
Remove commented explanation for CSS import order
damonkost Feb 1, 2025
9ef8ddb
Enhance App component with dynamic hero section and stylized start ca…
damonkost Feb 1, 2025
7337dfe
Refactor index page to use App component and simplify layout
damonkost Feb 1, 2025
0ea2efa
Refactor App component to support child rendering and update global s…
damonkost Feb 1, 2025
b728d51
Refine global CSS with nav layout and styling adjustments
damonkost Feb 1, 2025
81618e5
Refactor App and _app.js with navigation and styling updates
damonkost Feb 1, 2025
728f6c7
Refine global CSS with responsive layout and spacing adjustments
damonkost Feb 2, 2025
3f18a6a
Update global CSS with dark mode header and refined navigation styling
damonkost Feb 2, 2025
cec1bc5
Enhance App component with dynamic hero section and logo handling
damonkost Feb 2, 2025
971cf72
Refine header styling with flexbox and forced dark mode
damonkost Feb 2, 2025
1f66820
Update Vercel project configuration and yarn.lock dependencies
damonkost Feb 3, 2025
f993297
Upgrade Next.js and dependencies to version 15.1.6
damonkost Feb 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@

# production
/build
/.next

# misc
.DS_Store
11 changes: 11 additions & 0 deletions .vercel/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
> Why do I have a folder named ".vercel" in my project?
The ".vercel" folder is created when you link a directory to a Vercel project.

> What does the "project.json" file contain?
The "project.json" file contains:
- The ID of the Vercel project that you linked ("projectId")
- The ID of the user or team your Vercel project is owned by ("orgId")

> Should I commit the ".vercel" folder?
No, you should not share the ".vercel" folder with anyone.
Upon creation, it will be automatically added to your ".gitignore" file.
33 changes: 33 additions & 0 deletions .vercel/output/builds.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"//": "This file was generated by the `vercel build` command. It is not part of the Build Output API.",
"target": "preview",
"argv": [
"C:\\Program Files\\nodejs\\node.exe",
"C:\\Users\\damon\\AppData\\Roaming\\npm\\node_modules\\vercel\\dist\\vc.js",
"build"
],
"builds": [
{
"require": "@vercel/node",
"requirePath": "C:\\Users\\damon\\AppData\\Roaming\\npm\\node_modules\\vercel\\node_modules\\@vercel\\node\\dist\\index",
"apiVersion": 3,
"use": "@vercel/node",
"src": "api/updateAttorney.js",
"config": {
"zeroConfig": true
}
},
{
"require": "@vercel/next",
"requirePath": "C:\\Users\\damon\\AppData\\Roaming\\npm\\node_modules\\vercel\\node_modules\\@vercel\\next\\dist\\index",
"apiVersion": 2,
"src": "package.json",
"use": "@vercel/next",
"config": {
"zeroConfig": true,
"framework": "nextjs",
"buildCommand": "next build"
}
}
]
}
141 changes: 141 additions & 0 deletions .vercel/output/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
{
"version": 3,
"routes": [
{
"src": "^(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))/$",
"headers": {
"Location": "/$1"
},
"status": 308,
"continue": true
},
{
"src": "/_next/__private/trace",
"dest": "/404",
"status": 404,
"continue": true
},
{
"src": "/404/?",
"status": 404,
"continue": true,
"missing": [
{
"type": "header",
"key": "x-prerender-revalidate"
}
]
},
{
"src": "/500",
"status": 500,
"continue": true
},
{
"src": "^(?:/(.*))$",
"headers": {
"Cache-Control": "public, max-age=0, must-revalidate"
},
"continue": true
},
{
"handle": "filesystem"
},
{
"src": "/_next/data/(.*)",
"dest": "/_next/data/$1",
"check": true
},
{
"src": "^/api(/.*)?$",
"status": 404
},
{
"handle": "miss"
},
{
"src": "^/api/(.+)(?:\\.(?:js))$",
"dest": "/api/$1",
"check": true
},
{
"src": "/_next/static/(?:[^/]+/pages|pages|chunks|runtime|css|image|media)/.+",
"status": 404,
"check": true,
"dest": "$0"
},
{
"handle": "resource"
},
{
"src": "/.*",
"status": 404
},
{
"handle": "rewrite"
},
{
"src": "/_next/data/(.*)",
"dest": "/404",
"status": 404
},
{
"handle": "hit"
},
{
"src": "/_next/static/(?:[^/]+/pages|pages|chunks|runtime|css|image|media|Y67RoCT3tg4Q4uA\\-GxALX)/.+",
"headers": {
"cache-control": "public,max-age=31536000,immutable"
},
"continue": true,
"important": true
},
{
"src": "/index(?:/)?",
"headers": {
"x-matched-path": "/"
},
"continue": true,
"important": true
},
{
"src": "/((?!index$).*?)(?:/)?",
"headers": {
"x-matched-path": "/$1"
},
"continue": true,
"important": true
},
{
"handle": "error"
},
{
"src": "/.*",
"dest": "/404",
"status": 404
},
{
"src": "/.*",
"dest": "/500",
"status": 500
}
],
"overrides": {
"404.html": {
"path": "404",
"contentType": "text/html; charset=utf-8"
},
"500.html": {
"path": "500",
"contentType": "text/html; charset=utf-8"
},
"index.html": {
"path": "index",
"contentType": "text/html; charset=utf-8"
}
},
"framework": {
"version": "14.2.23"
},
"crons": []
}
7 changes: 7 additions & 0 deletions .vercel/output/diagnostics/trace

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"handler": "api/updateAttorney.js",
"runtime": "nodejs22.x",
"environment": {},
"launcherType": "Nodejs",
"shouldAddHelpers": true,
"shouldAddSourcemapSupport": false,
"awsLambdaHandler": ""
}
105 changes: 105 additions & 0 deletions .vercel/output/functions/api/updateAttorney.func/api/updateAttorney.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
const fs = require('fs');
const path = require('path');

// Function to update the HTML table with subdomain data
async function updateTable() {
const filePath = path.join(__dirname, '../../subdomain_config.json');
console.log(`Checking if file exists: ${filePath}`);
if (fs.existsSync(filePath)) {
console.log(`File exists: ${filePath}`);
const fileContent = fs.readFileSync(filePath, 'utf8');
const configData = JSON.parse(fileContent);
console.log('Config data loaded:', configData);

// Create a table of different extensions
let table = '<table><tr><th>Subdomain</th><th>Firm Name</th><th>Logo URL</th><th>Mascot URL</th><th>VAPI URL</th><th>VAPI Instructions</th><th>VAPI Context</th><th>Interaction Deposit URL</th></tr>';
for (const subdomain in configData) {
const data = configData[subdomain];
table += `<tr>
<td>${subdomain}</td>
<td>${data.firmName}</td>
<td>${data.logo}</td>
<td>${data.mascot}</td>
<td>${data.vapi_url}</td>
<td>${data.vapiInstructions}</td>
<td>${data.vapiContext}</td>
<td>${data.interactionDepositUrl}</td>
</tr>`;
}
table += '</table>';

// Write the table to an HTML file
const tableFilePath = path.join(__dirname, '../../subdomain_table.html');
fs.writeFileSync(tableFilePath, table, 'utf8');
console.log(`Table written to: ${tableFilePath}`);
} else {
console.log(`File does not exist: ${filePath}`);
}
}

module.exports = async (req, res) => {
try {
console.log('Received webhook request:', req.body);
const payload = req.body;

// Validate webhook source
if (!payload || !payload.subdomain) {
throw new Error('Invalid payload structure');
}

// Add validation for webhook source
const webhookUrl = 'https://hook.us1.make.com/xovnaaoshufg71xjnx7h6blgdv1l2mwl';
if (req.headers['x-webhook-source'] !== webhookUrl) {
throw new Error('Invalid webhook source');
}

// Extract the relevant attorney data from the payload
const { subdomain, logoUrl, mascotUrl, vapiUrl, firmName, vapiInstructions, vapiContext, interactionDepositUrl } = payload;

if (!subdomain || !logoUrl || !firmName || !vapiInstructions || !vapiContext || !interactionDepositUrl) {
throw new Error('Missing required attorney data in the payload.');
}

// Define the path to the JSON file
const filePath = path.join(__dirname, '../../subdomain_config.json');
console.log(`Reading file: ${filePath}`);

// Read the existing data from the JSON file
let configData = {};
if (fs.existsSync(filePath)) {
const fileContent = fs.readFileSync(filePath, 'utf8');
configData = JSON.parse(fileContent);
console.log('Existing config data:', configData);
}

// Update or create the entry for the subdomain
configData[subdomain] = {
logo: logoUrl,
mascot: mascotUrl || configData[subdomain]?.mascot || null,
vapi_url: vapiUrl || configData[subdomain]?.vapi_url || null,
firmName: firmName,
vapiInstructions: vapiInstructions,
vapiContext: vapiContext,
interactionDepositUrl: interactionDepositUrl
};

// Write the updated data back to the JSON file
fs.writeFileSync(filePath, JSON.stringify(configData, null, 2), 'utf8');
console.log('Updated config data written to file:', configData);

// Update the table
await updateTable();

// Return success with CORS headers
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Methods', 'POST');
res.status(200).json({
success: true,
message: "Attorney data updated successfully!",
subdomain: payload.subdomain
});
} catch (error) {
console.error('Webhook processing error:', error);
res.status(500).json({ error: error.message });
}
};
24 changes: 24 additions & 0 deletions .vercel/output/functions/api/updateAttorney.func/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "legalscout-widget",
"version": "1.0.0",
"private": true,
"dependencies": {
"@vapi-ai/web": "^1.0.0",
"next": "^14.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-spinners": "^0.13.8"
},
"devDependencies": {
"@types/node": "^20.0.0",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0",
"eslint": "^8.0.0"
},
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start",
"lint": "next lint"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":3,"pages404":true,"caseSensitive":false,"basePath":"","redirects":[{"source":"/:path+/","destination":"/:path+","internal":true,"statusCode":308,"regex":"^(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))/$"}],"headers":[],"dynamicRoutes":[],"staticRoutes":[],"dataRoutes":[],"rsc":{"header":"RSC","varyHeader":"RSC, Next-Router-State-Tree, Next-Router-Prefetch","prefetchHeader":"Next-Router-Prefetch","didPostponeHeader":"x-nextjs-postponed","contentTypeHeader":"text/x-component","suffix":".rsc","prefetchSuffix":".prefetch.rsc"},"rewrites":[]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"/_app":"pages/_app.js","/_document":"pages/_document.js","/_error":"pages/_error.js","/":"pages/index.html","/api/v1/attorneys":"pages/api/v1/attorneys.js","/404":"pages/404.html"}
Loading