From e88e1c627c1924fdc790e28e1b26c32f34be233d Mon Sep 17 00:00:00 2001
From: ItzCrazyKns <95534749+ItzCrazyKns@users.noreply.github.com>
Date: Fri, 14 Nov 2025 14:12:43 +0530
Subject: [PATCH 1/9] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 9ef1f1d..825e98d 100644
--- a/README.md
+++ b/README.md
@@ -63,7 +63,7 @@ We'd also like to thank the following partners for their generous support:
-
+
|
From 9934c1dbe05256ace290542cf114ab4094b39db6 Mon Sep 17 00:00:00 2001
From: ItzCrazyKns <95534749+ItzCrazyKns@users.noreply.github.com>
Date: Fri, 14 Nov 2025 14:15:06 +0530
Subject: [PATCH 3/9] Update README.md
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 9a00935..dc654df 100644
--- a/README.md
+++ b/README.md
@@ -61,9 +61,9 @@ We'd also like to thank the following partners for their generous support:
- |
+ |
-
+
|
From 3005b379cfc346d7842e6d7a85d72f6d21e02143 Mon Sep 17 00:00:00 2001
From: PSYEONE
Date: Fri, 28 Nov 2025 11:59:53 +0000
Subject: [PATCH 4/9] Added functionality for hiding weather and news widgets
---
src/components/EmptyChat.tsx | 50 +++++++++++++++++++----
src/components/Settings/SettingsField.tsx | 10 +++++
src/lib/config/clientRegistry.ts | 6 +++
src/lib/config/index.ts | 18 ++++++++
4 files changed, 77 insertions(+), 7 deletions(-)
diff --git a/src/components/EmptyChat.tsx b/src/components/EmptyChat.tsx
index d9b6686..53ec46a 100644
--- a/src/components/EmptyChat.tsx
+++ b/src/components/EmptyChat.tsx
@@ -1,3 +1,6 @@
+"use client";
+
+import { useEffect, useState } from 'react';
import { Settings } from 'lucide-react';
import EmptyChatMessageInput from './EmptyChatMessageInput';
import { File } from './ChatWindow';
@@ -5,8 +8,35 @@ import Link from 'next/link';
import WeatherWidget from './WeatherWidget';
import NewsArticleWidget from './NewsArticleWidget';
import SettingsButtonMobile from '@/components/Settings/SettingsButtonMobile';
+import {
+ getShowNewsWidget,
+ getShowWeatherWidget,
+} from '@/lib/config/clientRegistry';
const EmptyChat = () => {
+ const [showWeather, setShowWeather] = useState(true);
+ const [showNews, setShowNews] = useState(true);
+
+ useEffect(() => {
+ const updateWidgetVisibility = () => {
+ setShowWeather(getShowWeatherWidget());
+ setShowNews(getShowNewsWidget());
+ };
+
+ updateWidgetVisibility();
+
+ window.addEventListener('client-config-changed', updateWidgetVisibility);
+ window.addEventListener('storage', updateWidgetVisibility);
+
+ return () => {
+ window.removeEventListener(
+ 'client-config-changed',
+ updateWidgetVisibility,
+ );
+ window.removeEventListener('storage', updateWidgetVisibility);
+ };
+ }, []);
+
return (
@@ -19,14 +49,20 @@ const EmptyChat = () => {
-
-
-
+ {(showWeather || showNews) && (
+
+ {showWeather && (
+
+
+
+ )}
+ {showNews && (
+
+
+
+ )}
-
-
-
-
+ )}
);
diff --git a/src/components/Settings/SettingsField.tsx b/src/components/Settings/SettingsField.tsx
index 55aa640..843ce7c 100644
--- a/src/components/Settings/SettingsField.tsx
+++ b/src/components/Settings/SettingsField.tsx
@@ -12,6 +12,12 @@ import { useTheme } from 'next-themes';
import { Loader2 } from 'lucide-react';
import { Switch } from '@headlessui/react';
+const emitClientConfigChanged = () => {
+ if (typeof window !== 'undefined') {
+ window.dispatchEvent(new Event('client-config-changed'));
+ }
+};
+
const SettingsSelect = ({
field,
value,
@@ -35,6 +41,7 @@ const SettingsSelect = ({
if (field.key === 'theme') {
setTheme(newValue);
}
+ emitClientConfigChanged();
} else {
const res = await fetch('/api/config', {
method: 'POST',
@@ -106,6 +113,7 @@ const SettingsInput = ({
try {
if (field.scope === 'client') {
localStorage.setItem(field.key, newValue);
+ emitClientConfigChanged();
} else {
const res = await fetch('/api/config', {
method: 'POST',
@@ -182,6 +190,7 @@ const SettingsTextarea = ({
try {
if (field.scope === 'client') {
localStorage.setItem(field.key, newValue);
+ emitClientConfigChanged();
} else {
const res = await fetch('/api/config', {
method: 'POST',
@@ -258,6 +267,7 @@ const SettingsSwitch = ({
try {
if (field.scope === 'client') {
localStorage.setItem(field.key, String(newValue));
+ emitClientConfigChanged();
} else {
const res = await fetch('/api/config', {
method: 'POST',
diff --git a/src/lib/config/clientRegistry.ts b/src/lib/config/clientRegistry.ts
index 7c8fc24..28d0951 100644
--- a/src/lib/config/clientRegistry.ts
+++ b/src/lib/config/clientRegistry.ts
@@ -11,3 +11,9 @@ export const getAutoMediaSearch = () =>
export const getSystemInstructions = () =>
getClientConfig('systemInstructions', '');
+
+export const getShowWeatherWidget = () =>
+ getClientConfig('showWeatherWidget', 'true') === 'true';
+
+export const getShowNewsWidget = () =>
+ getClientConfig('showNewsWidget', 'true') === 'true';
diff --git a/src/lib/config/index.ts b/src/lib/config/index.ts
index 9b69c8a..4830538 100644
--- a/src/lib/config/index.ts
+++ b/src/lib/config/index.ts
@@ -69,6 +69,24 @@ class ConfigManager {
default: true,
scope: 'client',
},
+ {
+ name: 'Show weather widget',
+ key: 'showWeatherWidget',
+ type: 'switch',
+ required: false,
+ description: 'Display the weather card on the home screen.',
+ default: true,
+ scope: 'client',
+ },
+ {
+ name: 'Show news widget',
+ key: 'showNewsWidget',
+ type: 'switch',
+ required: false,
+ description: 'Display the recent news card on the home screen.',
+ default: true,
+ scope: 'client',
+ },
],
personalization: [
{
From 2574287fa836aaf8cfed9d1b670fd2b418e7b5d2 Mon Sep 17 00:00:00 2001
From: PSYEONE
Date: Fri, 28 Nov 2025 12:08:19 +0000
Subject: [PATCH 5/9] Added updated README for this fork
---
README.md | 44 +++++++++++++++++++++++++++++---------------
1 file changed, 29 insertions(+), 15 deletions(-)
diff --git a/README.md b/README.md
index dc654df..d1fe16e 100644
--- a/README.md
+++ b/README.md
@@ -14,6 +14,11 @@ Perplexica is a **privacy-focused AI answering engine** that runs entirely on yo
Want to know more about its architecture and how it works? You can read it [here](https://github.com/ItzCrazyKns/Perplexica/tree/master/docs/architecture/README.md).
+## About this fork (Perplexica-no-ads)
+
+- This fork tracks Perplexica with a focus on a clean, ad-free experience.
+- Added Settings → Preferences switches to show or hide the home weather and recent news widgets.
+
## ✨ Features
🤖 **Support for all major AI providers** - Use local LLMs through Ollama or connect to OpenAI, Anthropic Claude, Google Gemini, Groq, and more. Mix and match models based on your needs.
@@ -36,6 +41,8 @@ Want to know more about its architecture and how it works? You can read it [here
🕒 **Search history** - Every search is saved locally so you can revisit your discoveries anytime. Your research is never lost.
+🧩 **Home widgets control** - Toggle the weather and recent news cards on/off from Settings → Preferences.
+
✨ **More coming soon** - We're actively developing new features based on community feedback. Join our Discord to help shape Perplexica's future!
## Sponsors
@@ -76,24 +83,33 @@ We'd also like to thank the following partners for their generous support:
There are mainly 2 ways of installing Perplexica - With Docker, Without Docker. Using Docker is highly recommended.
-### Getting Started with Docker (Recommended)
+### Docker (build from this fork)
-Perplexica can be easily run using Docker. Simply run the following command:
+Build a local image from this repository and run it:
```bash
-docker run -d -p 3000:3000 -v perplexica-data:/home/perplexica/data -v perplexica-uploads:/home/perplexica/uploads --name perplexica itzcrazykns1337/perplexica:latest
+docker build -t perplexica-no-ads .
+docker run -d -p 3000:3000 \
+ -v perplexica-data:/home/perplexica/data \
+ -v perplexica-uploads:/home/perplexica/uploads \
+ --name perplexica-no-ads \
+ perplexica-no-ads
```
-This will pull and start the Perplexica container with the bundled SearxNG search engine. Once running, open your browser and navigate to http://localhost:3000. You can then configure your settings (API keys, models, etc.) directly in the setup screen.
-
-**Note**: The image includes both Perplexica and SearxNG, so no additional setup is required. The `-v` flags create persistent volumes for your data and uploaded files.
+Then open http://localhost:3000 to finish setup (API keys, models, etc.).
#### Using Perplexica with Your Own SearxNG Instance
-If you already have SearxNG running, you can use the slim version of Perplexica:
+If you already have SearxNG running, build the slim image and pass your URL:
```bash
-docker run -d -p 3000:3000 -e SEARXNG_API_URL=http://your-searxng-url:8080 -v perplexica-data:/home/perplexica/data -v perplexica-uploads:/home/perplexica/uploads --name perplexica itzcrazykns1337/perplexica:slim-latest
+docker build -f Dockerfile.slim -t perplexica-no-ads:slim .
+docker run -d -p 3000:3000 \
+ -e SEARXNG_API_URL=http://your-searxng-url:8080 \
+ -v perplexica-data:/home/perplexica/data \
+ -v perplexica-uploads:/home/perplexica/uploads \
+ --name perplexica-no-ads \
+ perplexica-no-ads:slim
```
**Important**: Make sure your SearxNG instance has:
@@ -101,8 +117,6 @@ docker run -d -p 3000:3000 -e SEARXNG_API_URL=http://your-searxng-url:8080 -v pe
- JSON format enabled in the settings
- Wolfram Alpha search engine enabled
-Replace `http://your-searxng-url:8080` with your actual SearxNG URL. Then configure your AI provider settings in the setup screen at http://localhost:3000.
-
#### Advanced Setup (Building from Source)
If you prefer to build from source or need more control:
@@ -111,7 +125,7 @@ If you prefer to build from source or need more control:
2. Clone the Perplexica repository:
```bash
- git clone https://github.com/ItzCrazyKns/Perplexica.git
+ git clone https://github.com/PSYEONE/Perplexica-no-ads.git
```
3. After cloning, navigate to the directory containing the project files.
@@ -119,8 +133,8 @@ If you prefer to build from source or need more control:
4. Build and run using Docker:
```bash
- docker build -t perplexica .
- docker run -d -p 3000:3000 -v perplexica-data:/home/perplexica/data -v perplexica-uploads:/home/perplexica/uploads --name perplexica perplexica
+ docker build -t perplexica-no-ads .
+ docker run -d -p 3000:3000 -v perplexica-data:/home/perplexica/data -v perplexica-uploads:/home/perplexica/uploads --name perplexica-no-ads perplexica-no-ads
```
5. Access Perplexica at http://localhost:3000 and configure your settings in the setup screen.
@@ -133,8 +147,8 @@ If you prefer to build from source or need more control:
2. Clone the repository:
```bash
- git clone https://github.com/ItzCrazyKns/Perplexica.git
- cd Perplexica
+ git clone https://github.com/PSYEONE/Perplexica-no-ads.git
+ cd Perplexica-no-ads
```
3. Install dependencies:
From 1df4d886ff42293ecedac46a179796e3573e1eb9 Mon Sep 17 00:00:00 2001
From: PSYEONE
Date: Fri, 28 Nov 2025 11:59:53 +0000
Subject: [PATCH 6/9] Revert "Added updated README for this fork"
This reverts commit 2574287fa836aaf8cfed9d1b670fd2b418e7b5d2.
---
README.md | 44 +++++++++++++++-----------------------------
1 file changed, 15 insertions(+), 29 deletions(-)
diff --git a/README.md b/README.md
index d1fe16e..dc654df 100644
--- a/README.md
+++ b/README.md
@@ -14,11 +14,6 @@ Perplexica is a **privacy-focused AI answering engine** that runs entirely on yo
Want to know more about its architecture and how it works? You can read it [here](https://github.com/ItzCrazyKns/Perplexica/tree/master/docs/architecture/README.md).
-## About this fork (Perplexica-no-ads)
-
-- This fork tracks Perplexica with a focus on a clean, ad-free experience.
-- Added Settings → Preferences switches to show or hide the home weather and recent news widgets.
-
## ✨ Features
🤖 **Support for all major AI providers** - Use local LLMs through Ollama or connect to OpenAI, Anthropic Claude, Google Gemini, Groq, and more. Mix and match models based on your needs.
@@ -41,8 +36,6 @@ Want to know more about its architecture and how it works? You can read it [here
🕒 **Search history** - Every search is saved locally so you can revisit your discoveries anytime. Your research is never lost.
-🧩 **Home widgets control** - Toggle the weather and recent news cards on/off from Settings → Preferences.
-
✨ **More coming soon** - We're actively developing new features based on community feedback. Join our Discord to help shape Perplexica's future!
## Sponsors
@@ -83,33 +76,24 @@ We'd also like to thank the following partners for their generous support:
There are mainly 2 ways of installing Perplexica - With Docker, Without Docker. Using Docker is highly recommended.
-### Docker (build from this fork)
+### Getting Started with Docker (Recommended)
-Build a local image from this repository and run it:
+Perplexica can be easily run using Docker. Simply run the following command:
```bash
-docker build -t perplexica-no-ads .
-docker run -d -p 3000:3000 \
- -v perplexica-data:/home/perplexica/data \
- -v perplexica-uploads:/home/perplexica/uploads \
- --name perplexica-no-ads \
- perplexica-no-ads
+docker run -d -p 3000:3000 -v perplexica-data:/home/perplexica/data -v perplexica-uploads:/home/perplexica/uploads --name perplexica itzcrazykns1337/perplexica:latest
```
-Then open http://localhost:3000 to finish setup (API keys, models, etc.).
+This will pull and start the Perplexica container with the bundled SearxNG search engine. Once running, open your browser and navigate to http://localhost:3000. You can then configure your settings (API keys, models, etc.) directly in the setup screen.
+
+**Note**: The image includes both Perplexica and SearxNG, so no additional setup is required. The `-v` flags create persistent volumes for your data and uploaded files.
#### Using Perplexica with Your Own SearxNG Instance
-If you already have SearxNG running, build the slim image and pass your URL:
+If you already have SearxNG running, you can use the slim version of Perplexica:
```bash
-docker build -f Dockerfile.slim -t perplexica-no-ads:slim .
-docker run -d -p 3000:3000 \
- -e SEARXNG_API_URL=http://your-searxng-url:8080 \
- -v perplexica-data:/home/perplexica/data \
- -v perplexica-uploads:/home/perplexica/uploads \
- --name perplexica-no-ads \
- perplexica-no-ads:slim
+docker run -d -p 3000:3000 -e SEARXNG_API_URL=http://your-searxng-url:8080 -v perplexica-data:/home/perplexica/data -v perplexica-uploads:/home/perplexica/uploads --name perplexica itzcrazykns1337/perplexica:slim-latest
```
**Important**: Make sure your SearxNG instance has:
@@ -117,6 +101,8 @@ docker run -d -p 3000:3000 \
- JSON format enabled in the settings
- Wolfram Alpha search engine enabled
+Replace `http://your-searxng-url:8080` with your actual SearxNG URL. Then configure your AI provider settings in the setup screen at http://localhost:3000.
+
#### Advanced Setup (Building from Source)
If you prefer to build from source or need more control:
@@ -125,7 +111,7 @@ If you prefer to build from source or need more control:
2. Clone the Perplexica repository:
```bash
- git clone https://github.com/PSYEONE/Perplexica-no-ads.git
+ git clone https://github.com/ItzCrazyKns/Perplexica.git
```
3. After cloning, navigate to the directory containing the project files.
@@ -133,8 +119,8 @@ If you prefer to build from source or need more control:
4. Build and run using Docker:
```bash
- docker build -t perplexica-no-ads .
- docker run -d -p 3000:3000 -v perplexica-data:/home/perplexica/data -v perplexica-uploads:/home/perplexica/uploads --name perplexica-no-ads perplexica-no-ads
+ docker build -t perplexica .
+ docker run -d -p 3000:3000 -v perplexica-data:/home/perplexica/data -v perplexica-uploads:/home/perplexica/uploads --name perplexica perplexica
```
5. Access Perplexica at http://localhost:3000 and configure your settings in the setup screen.
@@ -147,8 +133,8 @@ If you prefer to build from source or need more control:
2. Clone the repository:
```bash
- git clone https://github.com/PSYEONE/Perplexica-no-ads.git
- cd Perplexica-no-ads
+ git clone https://github.com/ItzCrazyKns/Perplexica.git
+ cd Perplexica
```
3. Install dependencies:
From ead2a5b2154bf600abccbc4afce4f95a99feb04d Mon Sep 17 00:00:00 2001
From: Kushagra Srivastava <95534749+ItzCrazyKns@users.noreply.github.com>
Date: Fri, 28 Nov 2025 18:17:01 +0530
Subject: [PATCH 7/9] Update src/components/EmptyChat.tsx
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
---
src/components/EmptyChat.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/EmptyChat.tsx b/src/components/EmptyChat.tsx
index 53ec46a..1c5b465 100644
--- a/src/components/EmptyChat.tsx
+++ b/src/components/EmptyChat.tsx
@@ -15,7 +15,7 @@ import {
const EmptyChat = () => {
const [showWeather, setShowWeather] = useState(true);
- const [showNews, setShowNews] = useState(true);
+ const [showNews, setShowNews] = useState(() => (typeof window !== 'undefined' ? getShowNewsWidget() : true));
useEffect(() => {
const updateWidgetVisibility = () => {
From cb30e2438aa0811ebcd2d35a4295e9f697fee529 Mon Sep 17 00:00:00 2001
From: Kushagra Srivastava <95534749+ItzCrazyKns@users.noreply.github.com>
Date: Fri, 28 Nov 2025 18:17:07 +0530
Subject: [PATCH 8/9] Update src/components/EmptyChat.tsx
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
---
src/components/EmptyChat.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/EmptyChat.tsx b/src/components/EmptyChat.tsx
index 1c5b465..4596f49 100644
--- a/src/components/EmptyChat.tsx
+++ b/src/components/EmptyChat.tsx
@@ -14,7 +14,7 @@ import {
} from '@/lib/config/clientRegistry';
const EmptyChat = () => {
- const [showWeather, setShowWeather] = useState(true);
+ const [showWeather, setShowWeather] = useState(() => (typeof window !== 'undefined' ? getShowWeatherWidget() : true));
const [showNews, setShowNews] = useState(() => (typeof window !== 'undefined' ? getShowNewsWidget() : true));
useEffect(() => {
From 6150784c27b32a208c6a67f84f34f5fa2b08a8eb Mon Sep 17 00:00:00 2001
From: ItzCrazyKns <95534749+ItzCrazyKns@users.noreply.github.com>
Date: Fri, 28 Nov 2025 18:41:11 +0530
Subject: [PATCH 9/9] feat(app): lint & beautify
---
src/components/EmptyChat.tsx | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/components/EmptyChat.tsx b/src/components/EmptyChat.tsx
index 4596f49..775fc9d 100644
--- a/src/components/EmptyChat.tsx
+++ b/src/components/EmptyChat.tsx
@@ -1,4 +1,4 @@
-"use client";
+'use client';
import { useEffect, useState } from 'react';
import { Settings } from 'lucide-react';
@@ -14,8 +14,12 @@ import {
} from '@/lib/config/clientRegistry';
const EmptyChat = () => {
- const [showWeather, setShowWeather] = useState(() => (typeof window !== 'undefined' ? getShowWeatherWidget() : true));
- const [showNews, setShowNews] = useState(() => (typeof window !== 'undefined' ? getShowNewsWidget() : true));
+ const [showWeather, setShowWeather] = useState(() =>
+ typeof window !== 'undefined' ? getShowWeatherWidget() : true,
+ );
+ const [showNews, setShowNews] = useState(() =>
+ typeof window !== 'undefined' ? getShowNewsWidget() : true,
+ );
useEffect(() => {
const updateWidgetVisibility = () => {
| |