Skip to content

Commit

Permalink
feat: remove authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
samdenty committed Sep 26, 2024
1 parent 6fb59d2 commit 27156e2
Show file tree
Hide file tree
Showing 21 changed files with 27 additions and 597 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,10 @@ dist-ssr
*.njsproj
*.sln
*.sw?

/.cache
/build
.env*
*.vars
.wrangler
_worker.bundle
16 changes: 0 additions & 16 deletions .vscode/launch.json

This file was deleted.

9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,10 @@ pnpm install
ANTHROPIC_API_KEY=XXX
```

Optionally, you an set the debug level or disable authentication:
Optionally, you an set the debug level:

```
VITE_LOG_LEVEL=debug
VITE_DISABLE_AUTH=1
```

If you want to run authentication against a local StackBlitz instance, add:

```
VITE_CLIENT_ORIGIN=https://local.stackblitz.com:3000
```

**Important**: Never commit your `.env.local` file to version control. It's already included in .gitignore.
Expand Down
3 changes: 0 additions & 3 deletions app/components/chat/BaseChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { Messages } from './Messages.client';
import { SendButton } from './SendButton.client';

import styles from './BaseChat.module.scss';
import { useLoaderData } from '@remix-run/react';

interface BaseChatProps {
textareaRef?: React.RefObject<HTMLTextAreaElement> | undefined;
Expand Down Expand Up @@ -59,7 +58,6 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
ref,
) => {
const TEXTAREA_MAX_HEIGHT = chatStarted ? 400 : 200;
const { avatar } = useLoaderData<{ avatar?: string }>();

return (
<div
Expand Down Expand Up @@ -96,7 +94,6 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
className="flex flex-col w-full flex-1 max-w-chat px-4 pb-6 mx-auto z-1"
messages={messages}
isStreaming={isStreaming}
avatar={avatar}
/>
) : null;
}}
Expand Down
9 changes: 2 additions & 7 deletions app/components/chat/Messages.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ interface MessagesProps {
className?: string;
isStreaming?: boolean;
messages?: Message[];
avatar?: string;
}

export const Messages = React.forwardRef<HTMLDivElement, MessagesProps>((props: MessagesProps, ref) => {
const { id, isStreaming = false, messages = [], avatar } = props;
const { id, isStreaming = false, messages = [] } = props;

return (
<div id={id} ref={ref} className={props.className}>
Expand All @@ -36,11 +35,7 @@ export const Messages = React.forwardRef<HTMLDivElement, MessagesProps>((props:
>
{isUserMessage && (
<div className="flex items-center justify-center w-[34px] h-[34px] overflow-hidden bg-white text-gray-600 rounded-full shrink-0 self-start">
{avatar ? (
<img className="w-full h-full object-cover" src={avatar} />
) : (
<div className="i-ph:user-fill text-xl"></div>
)}
<div className="i-ph:user-fill text-xl"></div>
</div>
)}
<div className="grid grid-col-1 w-full">
Expand Down
41 changes: 0 additions & 41 deletions app/lib/.server/auth.ts

This file was deleted.

240 changes: 0 additions & 240 deletions app/lib/.server/sessions.ts

This file was deleted.

Loading

0 comments on commit 27156e2

Please sign in to comment.