Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
cb90378
chore: update configuration files and workflows
techwithanirudh Sep 9, 2025
e0b9ea7
chore: update configuration files and workflows
techwithanirudh Sep 9, 2025
8cdae14
chore: add environment configuration and spell checking tools
techwithanirudh Sep 9, 2025
623433c
refactor: replace process.env with env module for environment variabl…
techwithanirudh Sep 9, 2025
16ab40b
chore: update database schema and configuration
techwithanirudh Sep 9, 2025
61d30d6
chore: update package dependencies and lock file
techwithanirudh Sep 9, 2025
6af7d29
chore: update package dependencies and lock file
techwithanirudh Sep 9, 2025
e3f1113
chore: refactor database access and update biome configuration
techwithanirudh Sep 9, 2025
31a28e0
chore: update zod dependency to version 4.1.5
techwithanirudh Sep 9, 2025
b5dd7ff
chore: update linting rules and address unused parameters
techwithanirudh Sep 9, 2025
c6cc90a
chore: streamline environment variable management and update scripts
techwithanirudh Sep 9, 2025
14fedd2
chore: add migration for renaming Document column and update schema
techwithanirudh Sep 9, 2025
e351059
fix: adjust button padding and update environment variable handling
techwithanirudh Sep 9, 2025
ec4d5b3
chore: update motion library and remove framer-motion references
techwithanirudh Sep 9, 2025
89e77fd
fix: playwright tests not building
techwithanirudh Sep 9, 2025
8eaeb43
refactor: remove ModelSelector component and update related identifiers
techwithanirudh Sep 9, 2025
a3bb30e
fix: update import paths and add knip dependency
techwithanirudh Sep 9, 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
86 changes: 86 additions & 0 deletions .cspell.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
"dictionaries": ["software-terms", "npm", "fullstack"],
"files": ["**", ".vscode/**", ".github/**"],
"ignorePaths": [
"pnpm-lock.yaml",
"bun.lock",
"bun.lockb",
"server/db/migrations"
],
"ignoreRegExpList": ["apiKey='[a-zA-Z0-9-]{32}'"],
"import": ["@cspell/dict-bash/cspell-ext.json"],
"useGitignore": true,
"version": "0.2",
"words": [
"turbopack",
"remark",
"katex",
"lefthook",
"orama",
"catppuccin",
"inkeep",
"devcontainers",
"twoslash",
"vitesse",
"scira",
"subsecond",
"bprogress",
"contentlayer",
"basehub",
"shadcn",
"subcomponents",
"nuqs",
"nocompatible",
"pseudoelements",
"matplotlib",
"pyplot",
"savefig",
"Pyodide",
"unparse",
"papaparse",
"diffview",
"autofocus",
"Vercelians",
"orderedmap",
"prosemirror",
"hitbox",
"usehooks",
"inputrules",
"Delba",
"Oliveira",
"Upvoting",
"Downvoting",
"Downvoted",
"behaviour",
"Noninteractive",
"generationtime",
"vaul",
"nums",
"groq",
"deepseek",
"sdxl",
"didn",
"doesn",
"logprobs",
"dall",
"textblock",
"Geordanna",
"Cordero",
"Pawel",
"Czerwinski",
"Olah",
"Filipe",
"aisdk",
"yxxx",
"nosniff",
"sameorigin",
"neondatabase",
"viewports",
"authjs",
"webauthn",
"filechooser",
"emilkawoski",
"djikstra's"
]
}
55 changes: 55 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"name": "ai-chatbot",
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm",
"forwardPorts": [
3000
],
"portsAttributes": {
"3000": {
"label": "Web",
"onAutoForward": "notify"
}
},
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"configureZshAsDefaultShell": true
},
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"containerEnv": {},
"remoteEnv": {},
"customizations": {
"vscode": {
"extensions": [
// TypeScript
"better-ts-errors.better-ts-errors",
// Other
"bradlc.vscode-tailwindcss",
"streetsidesoftware.code-spell-checker",
"biomejs.biome",
"aaron-bond.better-comments",
"formulahendry.auto-rename-tag"
],
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.defaultProfile.linux": "zsh",
"debug.internalConsoleOptions": "neverOpen",
"editor.formatOnPaste": true,
"editor.guides.bracketPairs": "active",
"scm.defaultViewMode": "tree",
"diffEditor.diffAlgorithm": "advanced",
"diffEditor.experimental.showMoves": true,
"diffEditor.renderSideBySide": false,
"files.watcherExclude": {
"**/node_modules/**": true
},
// Prettifies the response with emojis and such.
"betterTypeScriptErrors.prettify": true
}
}
},
"postCreateCommand": {
"web": "pnpm install",
"playwright": "pnpm exec playwright install-deps && pnpm exec playwright install"
}
}
33 changes: 33 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Check setup
description: Set up Node, and pnpm, prime caches, and install dependencies.

runs:
using: composite
steps:
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: false

- name: Get pnpm store path
id: pnpm-cache
shell: bash
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Cache pnpm store
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'

- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile
61 changes: 61 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CI

on:
push:

jobs:
types:
name: TypeScript
runs-on: ubuntu-22.04

steps:
- name: Checkout branch
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup

- name: Generate types
run: pnpm typegen

- name: Run type check
run: pnpm typecheck

biome:
name: Biome
runs-on: ubuntu-22.04
steps:
- name: Checkout branch
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup

- name: Run Biome
run: pnpm check

knip:
name: Knip
runs-on: ubuntu-22.04
steps:
- name: Checkout branch
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup

- name: Run Knip
run: pnpm knip

spelling:
name: Spelling
runs-on: ubuntu-22.04
steps:
- name: Checkout branch
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup

- name: Run spelling check
run: pnpm check:spelling
25 changes: 0 additions & 25 deletions .github/workflows/lint.yml

This file was deleted.

34 changes: 3 additions & 31 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,36 +20,8 @@ jobs:
with:
fetch-depth: 1

- uses: actions/setup-node@v4
with:
node-version: lts/*

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Setup
uses: ./.github/actions/setup

- name: Cache Playwright browsers
uses: actions/cache@v3
Expand All @@ -70,4 +42,4 @@ jobs:
with:
name: playwright-report
path: playwright-report/
retention-days: 7
retention-days: 7
13 changes: 6 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,19 @@ yarn-error.log*
.pnpm-debug.log*

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local
.env*
!.env.example

# turbo
.turbo

.env
.vercel
.env*.local
.pnpm-store

# Playwright
/test-results/
/playwright-report/
/blob-report/
/playwright/*

# cspell
.cspellcache
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v22.19.0
21 changes: 21 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
(TO BE DELETED)

This pull request is meant to:
- Upgrade packages to latest, like react and next
- Add support for nextjs typed routes
- Update tooling like biome
- Cleanup GH actions
- Upgrade to tailwind v4
- T3 Env
- Adds cspell for code spell checking
- Adds Lefthook (left out for now)
- Update authjs
- Upgrade zod
- Move data base stuff and auth stuff to server folder (not included)
- Update eslint (not included)

The next PR will update the login and signup pages design
The following will update the AI Chatbot design

Other PRs?
- Add ruler for unified AI Rules?
2 changes: 1 addition & 1 deletion app/(auth)/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { createUser, getUser } from '@/lib/db/queries';
import { signIn } from './auth';

const authFormSchema = z.object({
email: z.string().email(),
email: z.email(),
password: z.string().min(6),
});

Expand Down
7 changes: 4 additions & 3 deletions app/(auth)/api/auth/guest/route.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import { signIn } from '@/app/(auth)/auth';
import { isDevelopmentEnvironment } from '@/lib/constants';
import { getToken } from 'next-auth/jwt';
import { NextResponse } from 'next/server';
import { NextRequest, NextResponse } from 'next/server';
import { env } from '@/env';

export async function GET(request: Request) {
export async function GET(request: NextRequest) {
const { searchParams } = new URL(request.url);
const redirectUrl = searchParams.get('redirectUrl') || '/';

const token = await getToken({
req: request,
secret: process.env.AUTH_SECRET,
secret: env.AUTH_SECRET,
secureCookie: !isDevelopmentEnvironment,
});

Expand Down
Loading