Skip to content
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

[Feature]: Chatbot #12

Merged
merged 74 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
48eae55
[docs]: initialize `docs/` folder with default (empty) files
jimbrig Mar 13, 2024
9539857
remove invalid `google-fonts` imports
phoward38 Mar 18, 2024
9ee061c
fix style import
phoward38 Mar 18, 2024
5a06c99
upgrade "safe" deps
phoward38 Mar 18, 2024
149d808
upgrade `remix` deps & resolve mistmatches (remove modules & lock fil…
phoward38 Mar 18, 2024
e05dd6b
update `import` for `remixDevTools`
phoward38 Mar 18, 2024
9a3904d
Merge pull request #10 from noclocks/feature/upgrade-stable-remix-vit…
phoward38 Mar 18, 2024
c9020af
`NursingHomeAbuse` w/ corresponding stylesheet
phoward38 Mar 18, 2024
e7dc41d
import `typography.css` & `global.css` in `root`
phoward38 Mar 18, 2024
c58b42f
cleanup & fix font-family styling
phoward38 Mar 18, 2024
74eb432
fix styling on `BastienVillardS` page & rename page component
phoward38 Mar 18, 2024
34b8f88
fix `bg-content.jpg` import on `Home` page
phoward38 Mar 18, 2024
35c74e7
move rule from `mobile-nav.css` to `global.css`
phoward38 Mar 18, 2024
5b0d503
`OtherPracticeAreas` page & stylesheet
phoward38 Mar 18, 2024
680341c
simplify `Header` imports
phoward38 Mar 18, 2024
d8c40e6
`Header` formatting (auto)
phoward38 Mar 18, 2024
7779d3e
cleanup
phoward38 Mar 18, 2024
42e0be3
remove unused `wp-content/index_files` dir
phoward38 Mar 18, 2024
083d010
update `README`s
phoward38 Mar 22, 2024
a838938
upgrade `remixDevTools`
phoward38 Mar 22, 2024
f0ae085
add `preinstall` to force `pnpm` usage
phoward38 Mar 22, 2024
2ea3d07
update `vite` config to fix `preview`
phoward38 Mar 22, 2024
792f0e3
new `ScrollToTopButton` component & add to `root`
phoward38 Mar 25, 2024
626b681
fix `preinstall` to force `pnpm`
phoward38 Mar 25, 2024
5184e0f
feat: added demonstration chatbot embed (script)
jimbrig Apr 1, 2024
154caeb
update `ScrollToTopButton`
phoward38 Apr 9, 2024
98ba988
`BusinessGeneralCounselBusinessTransactions` page
phoward38 Apr 9, 2024
1830e15
`CriminalLawDefense` page
phoward38 Apr 9, 2024
8b8c911
`SeriousInjury` page
phoward38 Apr 9, 2024
40aa1c5
Update `README`
phoward38 Apr 10, 2024
664a3ee
Update changelog.yml
jimbrig Apr 11, 2024
d70cf2e
Merge branch 'main' into develop
jimbrig Apr 11, 2024
00cae69
Update changelog.yml
jimbrig Apr 11, 2024
a509e0a
Update changelog.yml
jimbrig Apr 11, 2024
6e5915a
add `excludeContactSection` prop to `Footer` component
phoward38 Apr 11, 2024
2529ff4
commented out invalid styles in `nursing-home-abuse.css`
phoward38 Apr 11, 2024
f6d5d95
`Contact` page w/ placeholder form & `excludeContactSection={true}` p…
phoward38 Apr 11, 2024
2f6645c
fix lint errors & warnings
phoward38 Apr 11, 2024
af56355
add `serve` script command & `--port` arg to `build`/`dev`/`preview`
phoward38 Apr 11, 2024
03a1f8a
updated `devDependencies` in `package.json` & `pnpm-lock.yaml`
phoward38 Apr 11, 2024
ec20fd2
update `vite.config.js`
phoward38 Apr 11, 2024
fd609c6
formatting
phoward38 Apr 11, 2024
8e8a805
fix typos
phoward38 Apr 11, 2024
de29c62
remove unused attributes
phoward38 Apr 11, 2024
092a460
`Contact` page title
phoward38 Apr 12, 2024
898e093
`AtlantaMedicalMalpracticeLawOffice` page
phoward38 Apr 12, 2024
0ee41cb
conditional button styling on `HelpForm`
phoward38 Apr 12, 2024
77c2eb2
disable nav on `Practice Areas` in `Header`
phoward38 Apr 12, 2024
aedd581
update spacing in `Footer`
phoward38 Apr 12, 2024
1758efb
fix navigation where broken
phoward38 Apr 12, 2024
999037b
fucntionality for `Email Me` button on `BastienVillardS` page
phoward38 Apr 12, 2024
e216710
change phone no. from `404` to `516`
phoward38 Apr 12, 2024
38980b8
add mobile navigation menu & styling
phoward38 Apr 12, 2024
1ea3c57
fix button styling
phoward38 Apr 12, 2024
7cea5c3
font formatting on `Home` page
phoward38 Apr 12, 2024
e86ede2
Merge pull request #13 from noclocks/feature/additional-pages
phoward38 Apr 12, 2024
79db69f
new `DefaultPage` component
phoward38 Apr 16, 2024
1fe310c
`Privacy`, `Disclaimer`, & `SiteMap` pages
phoward38 Apr 16, 2024
654085f
fix `Privacy` routing in `HelpForm`
phoward38 Apr 16, 2024
232bb21
replace `Thomson Reuters Privacy Statement` text w/ placeholder `No C…
phoward38 Apr 16, 2024
837baa6
Simplified `Privacy Policy`
phoward38 Apr 19, 2024
35e0bf2
update `DefaultPage` comp
phoward38 Apr 19, 2024
01f67db
fix `url`s in `home.css`
phoward38 Apr 19, 2024
9cbdf44
cleanup
phoward38 Apr 19, 2024
b51286c
cleanup
phoward38 Apr 19, 2024
69a8728
Merge pull request #17 from noclocks/feature/privacy-policy
phoward38 Apr 19, 2024
7855e68
working `Dockerfile` w/ `.dockerignore`
phoward38 Apr 19, 2024
9250064
revert to `404` phone number
phoward38 Apr 22, 2024
4ed1e02
fix `meta` merging (incorrect browser tab titles)
phoward38 Apr 23, 2024
14f6d24
cleanup `HelpForm`
phoward38 Apr 23, 2024
f889c75
install `react-toastify`
phoward38 Apr 23, 2024
fc584a6
notification on Contact form submission
phoward38 Apr 23, 2024
f83d070
`DEV` & `PROD` Email templates
phoward38 Apr 23, 2024
f16c718
`Dockerfile`: update `NODE_VERSION` & `PNPM_VERSION`
phoward38 Apr 23, 2024
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
6 changes: 6 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ name: Automate Changelog
on:
workflow_dispatch:
push:
branches: [ main ]
paths-ignore:
- CHANGELOG.md
- .github/**
pull_request:
branches: [ main ]
types: [ opened, synchronize, closed ]
jobs:
changelog:
name: Generate Changelog
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Full tech stack [here](/techstack.md)

```zsh
# Create Remix (+ Vite) SPA app
npx create-remix@latest --template remix-run/remix/templates/spa app
pnpm dlx create-remix@latest --template remix-run/remix/templates/spa app

# > Initialize a new git repository?
No
Expand Down
34 changes: 34 additions & 0 deletions app/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Include any files or directories that you don't want to be copied to your
# container here (e.g., local build artifacts, temporary files, etc.).
#
# For more help, visit the .dockerignore file reference guide at
# https://docs.docker.com/go/build-context-dockerignore/

**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/.next
**/.cache
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/charts
**/docker-compose*
**/compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
**/build
**/dist
LICENSE
README.md
77 changes: 77 additions & 0 deletions app/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# syntax=docker/dockerfile:1

ARG NODE_VERSION=20.12.2
ARG PNPM_VERSION=9.0.5

################################################################################
# Use node image for base image for all stages.
FROM node:${NODE_VERSION}-alpine as base

# Associate with GitHub repository
LABEL org.opencontainers.image.source=https://github.com/noclocks/bastienlaw-remix

# Set working directory for all build stages.
WORKDIR /usr/src/app

# Install pnpm.
RUN --mount=type=cache,target=/root/.npm \
npm install -g pnpm@${PNPM_VERSION}

################################################################################
# Create a stage for installing production dependecies.
FROM base as deps

# Download dependencies as a separate step to take advantage of Docker's caching.
# Leverage a cache mount to /root/.local/share/pnpm/store to speed up subsequent builds.
# Leverage bind mounts to package.json and pnpm-lock.yaml to avoid having to copy them
# into this layer.
RUN --mount=type=bind,source=package.json,target=package.json \
--mount=type=bind,source=pnpm-lock.yaml,target=pnpm-lock.yaml \
--mount=type=cache,target=/root/.local/share/pnpm/store \
pnpm install --prod --frozen-lockfile

################################################################################
# Create a stage for building the application.
FROM deps as build

# Download additional development dependencies before building, as some projects require
# "devDependencies" to be installed to build. If you don't need this, remove this step.
RUN --mount=type=bind,source=package.json,target=package.json \
--mount=type=bind,source=pnpm-lock.yaml,target=pnpm-lock.yaml \
--mount=type=cache,target=/root/.local/share/pnpm/store \
pnpm install --frozen-lockfile

# Copy the rest of the source files into the image.
COPY . .
# Run the build script.
RUN pnpm run build

################################################################################
# Create a new stage to run the application with minimal runtime dependencies
# where the necessary files are copied from the build stage.
FROM base as final

# Use production node environment by default.
# ENV NODE_ENV production
ENV NODE_ENV development

# # Run the application as a non-root user.
USER node

# Copy package.json so that package manager commands can be used.
COPY package.json .

# Copy the production dependencies from the deps stage and also
# the built application from the build stage into the image.
COPY --from=deps /usr/src/app/node_modules ./node_modules
COPY --from=build /usr/src/app/build ./build

ENV HOST '0.0.0.0'
ENV PORT 8080

# Expose the port that the application listens on.
EXPOSE 8080

# Run the application.
# CMD ["npx", "sirv-cli", "build/client", "--single", "--port", "8080", "--cors", "--dev"]
CMD ["pnpm", "run", "serve"]
12 changes: 6 additions & 6 deletions app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,31 @@ This template leverages [Remix SPA Mode](https://remix.run/docs/en/main/future/s
## Setup

```shellscript
npx create-remix@latest --template remix-run/remix/templates/spa
pnpx create-remix@latest --template remix-run/remix/templates/spa
```

## Development

You can develop your SPA app just like you would a normal Remix app, via:

```shellscript
npm run dev
pnpm run dev
```

## Production

When you are ready to build a production version of your app, `npm run build` will generate your assets and an `index.html` for the SPA.
When you are ready to build a production version of your app, `pnpm run build` will generate your assets and an `index.html` for the SPA.

```shellscript
npm run build
pnpm run build
```

### Preview

You can preview the build locally with [vite preview](https://vitejs.dev/guide/cli#vite-preview) to serve all routes via the single `index.html` file:

```shellscript
npm run preview
pnpm run preview
```

> ![WARNING] `vite preview` is not designed for use as a production server
Expand All @@ -45,7 +45,7 @@ You can then serve your app from any HTTP server of your choosing. The server sh
For a simple example, you could use [sirv-cli](https://www.npmjs.com/package/sirv-cli):

```shellscript
npx sirv-cli build/client/ --single
pnpx sirv-cli build/client/ --single
```

[remix-vite-docs]: https://remix.run/docs/en/main/future/vite
17 changes: 17 additions & 0 deletions app/app/components/ChatBot.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const ChatbotScript = () => (
<>
<script
dangerouslySetInnerHTML={{
__html: `
window.embeddedChatbotConfig = {
chatbotId: "VhVykMQoMKK6p-pu3I1wP",
domain: "www.chatbase.co"
};
`,
}}
/>
<script src="https://www.chatbase.co/embed.min.js" defer />
</>
);

export default ChatbotScript;
164 changes: 164 additions & 0 deletions app/app/components/DefaultPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
import {Header} from '../components/Header';
import {Footer} from '../components/Footer';

import '../styles/nursing-home-abuse.css';

export interface DefaultPageProps {
title: string;
description: string | JSX.Element;
includeSidebar?: boolean;
}

export default function DefaultPage(props: DefaultPageProps) {
return (
<div id='page-container'>
<div
id='et-boc'
className='et-boc'
>
<Header />
<div id='et-main-area'>
<div id='main-content'>
<div className='et-l et-l--body'>
<div className='et_builder_inner_content et_pb_gutters1'>
<div className='et_pb_section et_pb_section_1_tb_body et_pb_with_background et_section_regular'>
<div className='et_pb_row et_pb_row_0_tb_body'>
<div className='et_pb_column et_pb_column_4_4 et_pb_column_0_tb_body et_pb_css_mix_blend_mode_passthrough et-last-child'>
<div className='et_pb_module et_pb_text et_pb_text_0_tb_body et_pb_text_align_center et_pb_bg_layout_light'>
<div className='et_pb_text_inner'>
<p>
Dedication. Skill. Innovation.
<br /> Trust The{' '}
<strong>
<span className='nap-item nap-item--name'>
Law Offices of Villard Bastien, LLC
</span>
</strong>
.
</p>
</div>
</div>
</div>
</div>
</div>
<div className='et_pb_section et_pb_section_3_tb_body fl-breadcrumbs et_pb_with_background et_section_regular'>
<div className='et_pb_row et_pb_row_1_tb_body'>
<div className='et_pb_column et_pb_column_4_4 et_pb_column_1_tb_body et_pb_css_mix_blend_mode_passthrough et-last-child'>
<div className='et_pb_module et_pb_dcsbcm_divi_breadcrumbs_module et_pb_dcsbcm_divi_breadcrumbs_module_0_tb_body'>
<div className='et_pb_module_inner'>
<ol className='dcsbcm_divi_breadcrumbs'>
<li className='dcsbcm_divi_breadcrumb'>
<a href='/'>
<span>Home</span>
</a>
<meta
property='position'
content='1'
/>
</li>
<span className='dcsbcm_separator'>
&nbsp;&raquo;&nbsp;
</span>
<span className='dcsbcm_divi_breadcrumb dcsbcm_divi_breadcrumb-active'>
{props.title}
</span>
</ol>
</div>
</div>
</div>
</div>
</div>
<div className='et_pb_section et_pb_section_4_tb_body et_pb_with_background et_section_regular'>
<div className='et_pb_row et_pb_row_2_tb_body'>
<div
className={
!props.includeSidebar
? 'et_pb_column et_pb_column_2_tb_body fl-main-content et_pb_css_mix_blend_mode_passthrough'
: 'et_pb_column et_pb_column_2_3 et_pb_column_2_tb_body fl-main-content et_pb_css_mix_blend_mode_passthrough'
}
>
<div className='et_pb_module et_pb_post_content et_pb_post_content_0_tb_body'>
<h1>{props.title}</h1>
{typeof props.description === 'string' ? (
<p>{props.description}</p>
) : (
props.description
)}
</div>
</div>
{!props.includeSidebar ? null : (
<div className='et_pb_column et_pb_column_1_3 et_pb_column_3_tb_body et_pb_css_mix_blend_mode_passthrough et-last-child'>
<div
id='nav-practice-silo'
className='et_pb_module et_pb_sidebar_0_tb_body nav-practice-silo et_pb_widget_area clearfix et_pb_widget_area_left et_pb_bg_layout_light'
>
<div
id='nav_menu-2'
className='et_pb_widget widget_nav_menu'
>
<h2 className='widgettitle'>Practice Areas</h2>
<div className='menu-practice-areas-container'>
<ul
id='menu-practice-areas'
className='menu'
>
<li className='menu-item current-menu-item menu-item--depth-0'>
<a
href='nursing-home-abuse'
aria-current='page'
tabIndex={0}
>
Nursing Home Abuse
</a>
</li>
<li className='menu-item menu-item-has-children menu-item--depth-0'>
<a
href='other-practice-areas'
tabIndex={0}
>
Other Practice Areas
</a>
<ul className='sub-menu'>
<li className='menu-item menu-item--depth-1'>
<a
href='business-general-counsel-business-transactions'
tabIndex={0}
>
Business General Counsel / Business Transactions
</a>
</li>
<li className='menu-item menu-item--depth-1'>
<a
href='criminal-law-defense'
tabIndex={0}
>
Criminal Law Defense
</a>
</li>
<li className='menu-item menu-item--depth-1'>
<a
href='serious-injury'
tabIndex={0}
>
Serious Injury
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</div>
)}
</div>
</div>
</div>
</div>
</div>
<Footer />
</div>
</div>
</div>
);
}
Loading