Skip to content

Commit

Permalink
searxng service in docker-compose. Also, updated dependencies and con…
Browse files Browse the repository at this point in the history
…figurations such as TailwindCSS and Next.js bundling.

Took 1 minute
mikepsinn committed Nov 18, 2024
1 parent 5d7010d commit 0d4cdd6
Showing 14 changed files with 3,015 additions and 386 deletions.
176 changes: 176 additions & 0 deletions .cursorrules
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
# Project-specific rules for Cursor AI
[project]
name = "wishonia"
framework = "next.js"
version = "15.0"
router = "app"
style = "tailwind"
typescript = true

# Define the project's architecture and conventions
[architecture]
# All page.tsx files are server components by default
server_components = [
"app/**/page.tsx",
"app/**/layout.tsx",
"app/**/template.tsx"
]
client_components = [
"components/**/*.tsx",
"app/**/components/*.tsx"
]
hooks = ["lib/hooks/**/*.ts"]
utils = ["lib/**/*.ts"]
config = ["config/**/*.ts"]
types = ["types/**/*.ts"]

# Authentication patterns
[auth]
server_components = """
Import server-side auth:
import { getServerSession } from "next-auth/next"

Usage:
const session = await getServerSession()
"""

client_components = """
Import client-side auth:
import { useSession } from 'next-auth/react'

Usage:
const { data: session } = useSession()
"""

# Next.js App Router conventions
[next]
routing = """
- Use app directory for all routes
- page.tsx files are automatically server components
- loading.tsx for loading states
- error.tsx for error handling
- layout.tsx for shared layouts
"""

server_components = """
IMPORTANT: Never add 'use client' to page.tsx files
- Pages are server components by default
- Create separate client components for interactive elements
- Import client components into server components as needed
"""

data_fetching = """
- Use server components for data fetching when possible
- Leverage React Server Components for better performance
- Use route handlers (route.ts) for API endpoints
"""

# Database and type safety
[database]
prisma = """
- Import types directly from Prisma client
- Use Prisma-generated types for all database operations
- Always prefer schema.prisma types over creating new ones
Example:
import { Post, User } from '@prisma/client'
"""

# Component structure rules
[components]
organization = """
For interactive features:
1. Create client component in separate file:
components/MyInteractiveComponent.tsx
2. Import into server component page:
app/my-page/page.tsx
"""

client_components = """
Only add 'use client' when component:
- Uses hooks (useState, useEffect, etc.)
- Needs browser APIs
- Has user interactions
- Uses client-side libraries

Example location:
app/my-feature/components/InteractiveComponent.tsx
"""

server_components = """
Keep pages as server components:
- No 'use client' directive
- No hooks or browser APIs
- Import client components as needed
- Fetch data server-side when possible

Example:
app/my-feature/page.tsx
"""

# File patterns to ignore
[ignore]
patterns = [
"node_modules",
".next",
"build",
"dist",
"public/assets",
".git"
]

# Custom rules for the project
[rules]
component_patterns = """
✅ DO:
- Keep pages as server components
- Create separate client components for interactivity
- Use Prisma types for database operations
- Use proper auth imports based on component type
- Use self-documenting names for variables, fields, and models
- Always choose the simplest implementation to minimize complexity

❌ DON'T:
- Add 'use client' to page.tsx
- Mix client and server code in same component
- Use wrong auth import for component type
- Create new types when Prisma schema types are available
- Use cryptic or abbreviated names
"""

auth_patterns = """
Server Components:
import { getServerSession } from "next-auth/next"
const session = await getServerSession()

Client Components:
import { useSession } from 'next-auth/react'
const { data: session } = useSession()
"""

# Type safety rules
types = """
- Use TypeScript strict mode
- Import Prisma types directly from @prisma/client
- Create interfaces for component props
- Avoid 'any' type
"""

# Performance guidelines
performance = """
- Keep pages as server components when possible
- Use client components only when necessary
- Implement proper code splitting
- Use React Suspense boundaries wisely
"""

# Testing guidelines
[testing]
jest = """
- Always set @jest-environment node at the top of test files
- Write tests that can safely run against production (so don't delete data or do cleanup)
- Use real implementations instead of mocks where possible
Example test header:
/**
* @jest-environment node
*/
"""
101 changes: 100 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -46,4 +46,103 @@ LANGCHAIN_CALLBACKS_BACKGROUND=true
# Get key from https://www.perplexity.ai/settings/api
PERPLEXITY_API_KEY="KEY_HERE"
# Get key from https://dashboard.exa.ai/api-keys
EXASEARCH_API_KEY="KEY_HERE"
EXASEARCH_API_KEY="KEY_HERE"

KV_URL=
KV_REST_API_URL=
KV_REST_API_TOKEN=
KV_REST_API_READ_ONLY_TOKEN=

# For saving wordpress posts
WORDPRESS_URL=
WORDPRESS_USERNAME=
WORDPRESS_PASSWORD=

GOOGLE_API_KEY=
GOOGLE_CUSTOM_SEARCH_CX=

LANGFUSE_SECRET_KEY="sk-lf-..."
LANGFUSE_PUBLIC_KEY="pk-lf-..."
LANGFUSE_BASEURL="https://cloud.langfuse.com"

AWS_ACCESS_KEY_ID=your-test-access-key
AWS_SECRET_ACCESS_KEY=your-test-secret-key
AWS_REGION=your-test-region
AWS_BUCKET=your-test-bucket

# Tavily API Key retrieved here: https://app.tavily.com/home
TAVILY_API_KEY=[YOUR_TAVILY_API_KEY]

# Redis Configuration
USE_LOCAL_REDIS=false
LOCAL_REDIS_URL=redis://localhost:6379 # or redis://redis:6379 if you're using docker compose

# Upstash Redis URL and Token retrieved here: https://console.upstash.com/redis
UPSTASH_REDIS_REST_URL=[YOUR_UPSTASH_REDIS_REST_URL]
UPSTASH_REDIS_REST_TOKEN=[YOUR_UPSTASH_REDIS_REST_TOKEN]

# SearXNG Configuration
SEARXNG_API_URL=http://localhost:8080 # Replace with your local SearXNG API URL or docker http://searxng:8080
SEARCH_API=tavily # use searxng, tavily or exa
SEARXNG_SECRET="" # generate a secret key e.g. openssl rand -base64 32
SEARXNG_PORT=8080 # default port
SEARXNG_BIND_ADDRESS=0.0.0.0 # default address
SEARXNG_IMAGE_PROXY=true # enable image proxy
SEARXNG_LIMITER=false # can be enabled to limit the number of requests per IP address
SEARXNG_DEFAULT_DEPTH=basic # Set to 'basic' or 'advanced', only affects SearXNG searches
SEARXNG_MAX_RESULTS=50 # Maximum number of results to return from SearXNG
SEARXNG_ENGINES=google,bing,duckduckgo,wikipedia # Search engines to use
SEARXNG_TIME_RANGE=None # Time range for search results: day, week, month, year, or None (for all time)
SEARXNG_SAFESEARCH=0 # Safe search setting: 0 (off), 1 (moderate), 2 (strict)

# Optional
# The settings below can be used optionally as needed.

# Used to set the base URL path for OpenAI API requests.
# If you need to set a BASE URL, uncomment and set the following:
# OPENAI_API_BASE=

# Used to set the model for OpenAI API requests.
# If not set, the default is gpt-4o.
# OPENAI_API_MODEL=gpt-4o-mini

# Azure OpenAI API key retrieved here: https://oai.azure.com/resource/deployments/
# AZURE_API_KEY=

# The resource name is used in the assembled URL: https://{resourceName}.openai.azure.com/openai/deployments/{modelId}{path}.
# AZURE_RESOURCE_NAME=

# Used to set the deployment name for Azure OpenAI API requests.
# If not set, the default is gpt-4o.
# AZURE_DEPLOYMENT_NAME=

# If you want to use Google Generative AI instead of OpenAI, enable the following settings.
# Google Generative AI API key retrieved here: https://aistudio.google.com/app/apikey
# GOOGLE_GENERATIVE_AI_API_KEY=[YOUR_GOOGLE_GENERATIVE_AI_API_KEY]

# If you want to use Anthropic instead of OpenAI, enable the following settings.
# ANTHROPIC_API_KEY=[YOUR_ANTHROPIC_API_KEY]

# If you want to use Groq, enable the following variables. only available for tool use compatible models.
# GROQ_API_KEY=[YOUR_GROQ_API_KEY]
# GROQ_API_MODEL=[YOUR_GROQ_API_MODEL] # e.g. llama3-groq-8b-8192-tool-use-preview

# If you want to use Ollama, enable the following variables.
# OLLAMA_MODEL=[YOUR_OLLAMA_MODEL] # The main model to use. Currently compatible: qwen2.5
# OLLAMA_BASE_URL=[YOUR_OLLAMA_URL] # The base URL to use. e.g. http://localhost:11434

# enable the share feature
# If you enable this feature, separate account management implementation is required.
# ENABLE_SHARE=true

# enable the video search tool
# Serper API Key retrieved here: https://serper.dev/api-key
# SERPER_API_KEY=[YOUR_SERPER_API_KEY]

# If you want to use Jina instead of Tavily for retrieve tool, enable the following variables.
# JINA_API_KEY=[YOUR_JINA_API_KEY]

#NEXT_PUBLIC_BASE_URL=http://localhost:3000

DFDA_CLIENT_ID=
DFDA_CLIENT_SECRET=
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -56,3 +56,8 @@ next-env.d.ts

.trigger
/.vscode

.vercel
/.env.vercel
/run_anthropic_docker.ps1
/logs
19 changes: 17 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -14,10 +14,25 @@ services:
- .postgres:/var/lib/postgresql/data

redis:
image: redis:latest
image: redis:alpine
container_name: redis
restart: unless-stopped
volumes:
- .redis:/data
- redis_data:/data
command: redis-server --appendonly yes
ports:
- "6379:6379"

searxng:
image: searxng/searxng
ports:
- '${SEARXNG_PORT:-8080}:8080'
env_file: .env.local # can remove if you want to use env variables or in settings.yml
volumes:
- ./searxng-limiter.toml:/etc/searxng/limiter.toml
- ./searxng-settings.yml:/etc/searxng/settings.yml
- searxng_data:/data

volumes:
redis_data:
searxng_data:
7 changes: 7 additions & 0 deletions env.d.ts
Original file line number Diff line number Diff line change
@@ -5,8 +5,15 @@ interface Env {
NODE_ENV: string
// Add other environment variables as needed
NEXT_PUBLIC_APP_URL: string
NEXT_PUBLIC_SITE_NAME: string
NEXT_PUBLIC_SITE_DESCRIPTION: string
NEXT_PUBLIC_SITE_AUTHOR: string
NEXT_PUBLIC_SITE_KEYWORDS: string
NEXT_PUBLIC_SITE_OG_IMAGE: string
NEXT_PUBLIC_API_KEY: string
NEXT_PUBLIC_API_URL: string
NEXT_PUBLIC_DEFAULT_HOMEPAGE: string
NEXT_PUBLIC_DEFAULT_AFTER_LOGIN_PATH: string
NEXTAUTH_URL: string
NEXTAUTH_SECRET: string
GOOGLE_CLIENT_ID: string
14 changes: 14 additions & 0 deletions env.mjs
Original file line number Diff line number Diff line change
@@ -15,6 +15,13 @@ export const env = createEnv({
},
client: {
NEXT_PUBLIC_APP_URL: z.string().min(1),
NEXT_PUBLIC_SITE_NAME: z.string().optional(),
NEXT_PUBLIC_SITE_DESCRIPTION: z.string().optional(),
NEXT_PUBLIC_SITE_AUTHOR: z.string().optional(),
NEXT_PUBLIC_SITE_KEYWORDS: z.string().optional(),
NEXT_PUBLIC_SITE_OG_IMAGE: z.string().url().optional(),
NEXT_PUBLIC_DEFAULT_HOMEPAGE: z.string().optional(),
NEXT_PUBLIC_DEFAULT_AFTER_LOGIN_PATH: z.string().optional(),
},
runtimeEnv: {
NEXTAUTH_URL: process.env.NEXTAUTH_URL,
@@ -25,7 +32,14 @@ export const env = createEnv({
GITHUB_CLIENT_SECRET: process.env.GITHUB_CLIENT_SECRET,
DATABASE_URL: process.env.DATABASE_URL,
NEXT_PUBLIC_APP_URL: process.env.NEXT_PUBLIC_APP_URL,
NEXT_PUBLIC_SITE_NAME: process.env.NEXT_PUBLIC_SITE_NAME,
NEXT_PUBLIC_SITE_DESCRIPTION: process.env.NEXT_PUBLIC_SITE_DESCRIPTION,
NEXT_PUBLIC_SITE_AUTHOR: process.env.NEXT_PUBLIC_SITE_AUTHOR,
NEXT_PUBLIC_SITE_KEYWORDS: process.env.NEXT_PUBLIC_SITE_KEYWORDS,
NEXT_PUBLIC_SITE_OG_IMAGE: process.env.NEXT_PUBLIC_SITE_OG_IMAGE,
EMAIL_SERVER: process.env.EMAIL_SERVER,
EMAIL_FROM: process.env.EMAIL_FROM,
NEXT_PUBLIC_DEFAULT_HOMEPAGE: process.env.NEXT_PUBLIC_DEFAULT_HOMEPAGE,
NEXT_PUBLIC_DEFAULT_AFTER_LOGIN_PATH: process.env.NEXT_PUBLIC_DEFAULT_AFTER_LOGIN_PATH,
},
})
7 changes: 7 additions & 0 deletions instrumentation.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import { registerOTel } from "@vercel/otel";
import { LangfuseExporter } from "langfuse-vercel";

export async function register() {
if (!process.env.SENTRY_AUTH_TOKEN) {
console.debug(
@@ -12,4 +15,8 @@ export async function register() {
if (process.env.NEXT_RUNTIME === "edge") {
await import("./sentry.edge.config")
}
registerOTel({
serviceName: "langfuse-vercel-ai-nextjs-example",
traceExporter: new LangfuseExporter(),
});
}
20 changes: 17 additions & 3 deletions middleware.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { NextResponse } from "next/server"
import { getToken } from "next-auth/jwt"
import { withAuth } from "next-auth/middleware"
import { env } from "./env.mjs"

export default withAuth(
async function middleware(req) {
@@ -10,13 +11,25 @@ export default withAuth(
req.nextUrl.pathname.startsWith("/signin") ||
req.nextUrl.pathname.startsWith("/signup")

// Use the environment variable for the default redirect, fallback to "/dashboard"
const defaultRedirect = env.NEXT_PUBLIC_DEFAULT_AFTER_LOGIN_PATH || "/dashboard"

// Check for the custom homepage
const customHomepage = env.NEXT_PUBLIC_DEFAULT_HOMEPAGE

console.log(`customHomepage is: ${customHomepage} and current url is: ${req.nextUrl.pathname}`)

if (isAuthPage) {
if (isAuth) {
return NextResponse.redirect(new URL("/dashboard", req.url))
return NextResponse.redirect(new URL(defaultRedirect, req.url))
}

return null
}

// Redirect to custom homepage if set and on root path
if (req.nextUrl.pathname === "/" && customHomepage) {
return NextResponse.redirect(new URL(customHomepage, req.url))
}
},
{
callbacks: {
@@ -27,6 +40,7 @@ export default withAuth(
}
)

// This indicates which routes use this middleware
export const config = {
matcher: ["/dashboard/:path*", "/signin", "/signup"],
matcher: ["/", "/dashboard/:path*", "/signin", "/signup"],
}
80 changes: 45 additions & 35 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
})

/** @type {import('next').NextConfig} */
const nextConfig = {
// The site is just a blank page, when I enable this
// experimental: {
// instrumentationHook: true,
// },
// Configure `pageExtensions` to include MDX files
pageExtensions: ['js', 'jsx', 'mdx', 'ts', 'tsx'],
images: {
@@ -31,48 +39,50 @@ const nextConfig = {
},
}

module.exports = nextConfig

if(! process.env.SENTRY_AUTH_TOKEN) {
return module.exports
}
// Wrap nextConfig with withBundleAnalyzer
let config = withBundleAnalyzer(nextConfig)

const { withSentryConfig } = require("@sentry/nextjs");
if (!process.env.SENTRY_AUTH_TOKEN) {
module.exports = config
} else {
const { withSentryConfig } = require("@sentry/nextjs");

module.exports = withSentryConfig(
module.exports,
{
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options
// Wrap the bundle analyzer config with Sentry
module.exports = withSentryConfig(
config,
{
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options

org: "wishonia-org",
project: "wishonia-project",
org: "wishonia-org",
project: "wishonia-project",

// Only print logs for uploading source maps in CI
silent: !process.env.CI,
// Only print logs for uploading source maps in CI
silent: !process.env.CI,

// For all available options, see:
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
// For all available options, see:
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/

// Upload a larger set of source maps for prettier stack traces (increases build time)
widenClientFileUpload: true,
// Upload a larger set of source maps for prettier stack traces (increases build time)
widenClientFileUpload: true,

// Uncomment to route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
// This can increase your server load as well as your hosting bill.
// Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-
// side errors will fail.
// tunnelRoute: "/monitoring",
// Uncomment to route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
// This can increase your server load as well as your hosting bill.
// Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-
// side errors will fail.
// tunnelRoute: "/monitoring",

// Hides source maps from generated client bundles
hideSourceMaps: true,
// Hides source maps from generated client bundles
hideSourceMaps: true,

// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,
// Automatically tree-shake Sentry logger statements to reduce bundle size
disableLogger: true,

// Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)
// See the following for more information:
// https://docs.sentry.io/product/crons/
// https://vercel.com/docs/cron-jobs
automaticVercelMonitors: true,
}
);
// Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)
// See the following for more information:
// https://docs.sentry.io/product/crons/
// https://vercel.com/docs/cron-jobs
automaticVercelMonitors: true,
}
);
}
61 changes: 49 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -25,17 +25,20 @@
"format": "pnpm prettier . --write",
"format:check": "pnpm prettier . --check",
"seed": "jest tests/seed.test.ts",
"json-to-prisma": "json-to-prisma-schema-convertor convert --inputPath='./prisma/schema.json' --outputPath='./prisma/schema.prisma'"
"json-to-prisma": "json-to-prisma-schema-convertor convert --inputPath='./prisma/schema.json' --outputPath='./prisma/schema.prisma'",
"analyze": "cross-env ANALYZE=true next build"
},
"prisma": {
"seed": "ts-node --compiler-options {\"module\":\"CommonJS\"} prisma/seed.ts"
},
"dependencies": {
"@agentic/stdlib": "^6.1.5",
"@ai-sdk/anthropic": "0.0.51",
"@ai-sdk/google": "0.0.52",
"@ai-sdk/openai": "0.0.68",
"@ai-sdk/anthropic": "^0.0.51",
"@ai-sdk/azure": "^0.0.41",
"@ai-sdk/google": "^0.0.51",
"@ai-sdk/openai": "^0.0.63",
"@ai-sdk/provider": "0.0.24",
"@aws-sdk/client-s3": "^3.688.0",
"@copilotkit/backend": "^0.9.0",
"@copilotkit/react-core": "^0.25.0",
"@copilotkit/react-textarea": "^0.35.0",
@@ -57,8 +60,12 @@
"@mdx-js/loader": "^3.0.1",
"@mdx-js/react": "^3.0.1",
"@next-auth/prisma-adapter": "^1.0.7",
"@next/bundle-analyzer": "^14.2.15",
"@next/mdx": "^14.1.4",
"@octokit/rest": "^20.1.1",
"@opentelemetry/api-logs": "^0.54.0",
"@opentelemetry/instrumentation": "^0.54.0",
"@opentelemetry/sdk-logs": "^0.54.0",
"@phosphor-icons/react": "^2.1.6",
"@prisma/client": "^5.19.1",
"@radix-ui/react-accordion": "^1.1.2",
@@ -80,6 +87,8 @@
"@radix-ui/react-separator": "^1.0.3",
"@radix-ui/react-slider": "^1.2.0",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-switch": "^1.0.3",
"@radix-ui/react-tabs": "^1.1.1",
"@radix-ui/react-toast": "^1.1.5",
"@radix-ui/react-tooltip": "^1.0.7",
"@radix-ui/themes": "^3.0.5",
@@ -89,16 +98,22 @@
"@t3-oss/env-nextjs": "^0.9.2",
"@tanstack/react-query": "^5.28.6",
"@tanstack/react-table": "^8.11.8",
"@tavily/core": "^0.0.2",
"@trigger.dev/nextjs": "3.0.0-beta.56",
"@trigger.dev/react": "3.0.0-beta.56",
"@trigger.dev/sdk": "3.0.0-beta.56",
"@types/dotenv": "^8.2.3",
"@types/jsdom": "^21.1.7",
"@types/mdx": "^2.0.12",
"@types/node": "20.11.17",
"@types/pdf-parse": "^1.1.4",
"@types/pg": "^8.11.6",
"@types/react-dom": "18.2.19",
"@upstash/redis": "^1.34.0",
"@vercel/analytics": "^1.2.2",
"@vercel/blob": "^0.23.2",
"ai": "3.3.44",
"@vercel/otel": "^1.10.0",
"ai": "^3.4.7",
"ajv": "^8.12.0",
"autocomplete-lhc": "^19.2.4",
"autoprefixer": "10.4.17",
@@ -114,6 +129,7 @@
"date-fns": "^3.3.1",
"dialoqbase": "^0.2.1",
"dotenv": "16.4.5",
"embla-carousel-react": "^8.0.0",
"eslint-plugin-tailwindcss": "^3.14.3",
"exa-js": "^1.0.14",
"framer-motion": "^11.0.24",
@@ -124,32 +140,40 @@
"gray-matter": "^4.0.3",
"highcharts": "^11.4.3",
"highcharts-react-official": "^3.2.1",
"highlight.js": "^11.10.0",
"ignore": "^5.3.1",
"ioredis": "^5.4.1",
"jsdom": "^25.0.1",
"json-to-prisma-schema-convertor": "^0.1.0",
"katex": "^0.16.10",
"langchain": "0.2.18",
"langfuse-vercel": "^3.29.0",
"llmclient": "^8.1.19",
"lucide-react": "^0.259.0",
"lucide-react": "^0.363.0",
"mammoth": "^1.6.0",
"marked": "^14.1.3",
"mathjs": "^13.0.0",
"mdast": "^3.0.0",
"mdast-util-from-markdown": "^1.3.0",
"mdast-util-mdx": "^2.0.1",
"mdast-util-to-markdown": "^1.5.0",
"mdast-util-to-string": "^3.2.0",
"micromark-extension-mdxjs": "^1.0.0",
"mime-types": "^2.1.35",
"nanoid": "^5.0.7",
"next": "14.2.15",
"next-auth": "^4.24.7",
"next-mdx-remote": "^4.4.1",
"next-themes": "^0.2.1",
"nextjs-toploader": "^1.6.6",
"node-fetch": "2.7.0",
"node-html-parser": "^6.1.13",
"nodemailer": "^6.9.13",
"octokit": "^4.0.2",
"ollama-ai-provider": "^0.15.1",
"openai": "^4.0.0",
"openai-edge": "^1.2.2",
"pdf-parse": "^1.1.1",
"pdf2json": "3.0.5",
"pdfjs-dist": "^4.2.67",
"pg": "^8.12.0",
@@ -167,17 +191,22 @@
"react-markdown": "8.0.7",
"react-modal": "^3.16.1",
"react-syntax-highlighter": "^15.5.0",
"react-textarea-autosize": "^8.5.3",
"recharts": "^2.12.7",
"rehype-katex": "^7.0.0",
"rehype-raw": "^7.0.0",
"remark": "^15.0.1",
"redis": "^4.7.0",
"rehype-external-links": "^3.0.0",
"rehype-highlight": "6.0.0",
"rehype-katex": "^6.0.0",
"rehype-raw": "6.1.1",
"remark": "^14.0.0",
"remark-code-import": "^1.2.0",
"remark-gfm": "^3.0.1",
"remark-html": "^16.0.1",
"remark-gfm": "^3.0.0",
"remark-html": "^15.0.0",
"remark-math": "^5.1.1",
"remark-parse": "^11.0.0",
"sharp": "^0.33.4",
"slugify": "^1.6.6",
"sonner": "^1.4.41",
"stripe": "^12.13.0",
"supports-color": "^8.1.1",
"tailwind-merge": "^2.2.1",
@@ -205,18 +234,24 @@
"@mermaid-js/mermaid-cli": "^10.9.1",
"@playwright/test": "^1.44.1",
"@react-buddy/ide-toolbox-next": "*",
"@tailwindcss/typography": "^0.5.15",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^14.2.1",
"@testing-library/user-event": "^14.5.2",
"@types/common-tags": "^1.8.1",
"@types/estree": "^1.0.0",
"@types/fs-extra": "^9.0.12",
"@types/jest": "^29.5.12",
"@types/jsdom": "^21.1.7",
"@types/marked": "^6.0.0",
"@types/mdast": "^4.0.4",
"@types/mime-types": "^2.1.4",
"@types/node": "^20",
"@types/node-fetch": "^2.6.11",
"@types/nodemailer": "^6.4.15",
"@types/react": "18.2.55",
"@types/react-calendar-heatmap": "^1.6.7",
"@types/react-dom": "^18",
"@types/react-katex": "^3.0.4",
"@types/react-modal": "^3.16.3",
"@types/react-syntax-highlighter": "^15.5.13",
@@ -230,10 +265,12 @@
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"js-yaml": "^4.1.0",
"postcss": "^8",
"prettier": "^3.2.5",
"prettier-plugin-tailwindcss": "^0.5.11",
"prisma": "^5.19.1",
"prisma-erd-generator": "^1.11.2",
"tailwindcss": "^3.4.1",
"ts-jest": "^29.1.4",
"ts-node": "latest",
"typescript": "latest"
@@ -249,4 +286,4 @@
"trigger.dev": {
"endpointId": "wishonia-RmKR"
}
}
}
2,862 changes: 2,530 additions & 332 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions searxng-limiter.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#https://docs.searxng.org/admin/searx.limiter.html
35 changes: 35 additions & 0 deletions searxng-settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
use_default_settings: true
server:
# Is overwritten by ${SEARXNG_PORT} and ${SEARXNG_BIND_ADDRESS}
port: 8888
bind_address: '0.0.0.0'
# public URL of the instance, to ensure correct inbound links. Is overwritten
# by ${SEARXNG_URL}.
base_url: false # "http://example.com/location"
# rate limit the number of request on the instance, block some bots.
# Is overwritten by ${SEARXNG_LIMITER}
limiter: false
# enable features designed only for public instances.
# Is overwritten by ${SEARXNG_PUBLIC_INSTANCE}
public_instance: false

# If your instance owns a /etc/searxng/settings.yml file, then set the following
# values there.

secret_key: 'ursecretkey' # Is overwritten by ${SEARXNG_SECRET}
# Proxy image results through SearXNG. Is overwritten by ${SEARXNG_IMAGE_PROXY}
image_proxy: false
# 1.0 and 1.1 are supported
http_protocol_version: '1.0'
# POST queries are more secure as they don't show up in history but may cause
# problems when using Firefox containers
method: 'POST'
default_http_headers:
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Robots-Tag: noindex, nofollow
Referrer-Policy: no-referrer

search:
formats:
- json
13 changes: 12 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@ module.exports = {
"./components/**/*.{ts,tsx}",
"./app/**/*.{ts,tsx}",
"./src/**/*.{ts,tsx}",
'./app/docs/**/*.{js,ts,jsx,tsx}',
],
theme: {
container: {
@@ -73,7 +74,17 @@ module.exports = {
"accordion-down": "accordion-down 0.2s ease-out",
"accordion-up": "accordion-up 0.2s ease-out",
},
typography: {
DEFAULT: {
css: {
maxWidth: 'none',
},
},
},
},
},
plugins: [require("tailwindcss-animate")],
plugins: [
require("tailwindcss-animate"),
require('@tailwindcss/typography'),
],
}

0 comments on commit 0d4cdd6

Please sign in to comment.