Skip to content

Commit 417b293

Browse files
committed
docs: convert readme.txt to README.md and add Pages deploy badge; ci: grant actions:read, make telemetry non-blocking, and keep deploy gated only by build
1 parent cddf548 commit 417b293

2 files changed

Lines changed: 126 additions & 122 deletions

File tree

.github/workflows/deploy-pages.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414

1515
permissions:
1616
contents: read
17+
actions: read
1718
pages: write
1819
id-token: write
1920

@@ -46,12 +47,14 @@ jobs:
4647
- name: Upload Pages artifact
4748
uses: actions/upload-pages-artifact@v3
4849
with:
50+
name: github-pages
4951
path: .
5052

5153
report-build-status:
5254
name: Report Build Status
5355
needs: build
5456
runs-on: ubuntu-latest
57+
if: always()
5558
steps:
5659
- name: Report build status to Pages telemetry
5760
env:
@@ -60,10 +63,11 @@ jobs:
6063
run: |
6164
gh --version
6265
gh api -X POST "repos/$GITHUB_REPOSITORY/pages/telemetry"
66+
continue-on-error: true
6367

6468
deploy:
6569
name: Deploy to Pages
66-
needs: [build, report-build-status]
70+
needs: build
6771
# Do not deploy for pull_request events; only push/main, merge_group, dispatch
6872
if: github.event_name != 'pull_request'
6973
runs-on: ubuntu-latest
Lines changed: 121 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -1,127 +1,127 @@
1-
## Environment Setup
1+
# Unity Chat\n\n[![Deploy GitHub Pages](https://github.com/Unity-Lab-AI/Chat/actions/workflows/deploy-pages.yml/badge.svg)](https://github.com/Unity-Lab-AI/Chat/actions/workflows/deploy-pages.yml)\n\n## Environment Setup
22

33
Configure a `POLLINATIONS_TOKEN` secret in the repository settings.
44
The deployment injects this value into `window.POLLINATIONS_TOKEN`,
55
so the static site can access it directly without local files or storage.
66

7-
Here's a comprehensive breakdown of your web app's functionality based on the provided files:
8-
9-
---
10-
11-
## **General Overview**
12-
13-
Your web application, titled **"Unity Chat U1 6.6"**, provides an interactive chat interface integrating multiple sophisticated features to enhance user interaction with AI models, manage conversations, personalize experiences, and dynamically handle multimedia elements like voice synthesis, speech recognition, and automated image generation via Pollinations.
14-
15-
---
16-
17-
## **Core Features**
18-
19-
### **1. Chat Interface**
20-
- **Real-time Conversations:**
21-
Allows users to communicate with AI-powered models, facilitating dynamic, real-time interactions.
22-
23-
- **Speech Integration:**
24-
- **Speech Synthesis:** Converts AI responses into spoken audio with selectable voice preferences (`Google UK English Female`, `Microsoft Zira`, etc.).
25-
- **Speech Recognition:** Users can dictate messages through voice input, which captures speech and translates it into textual inputs in real-time.
26-
27-
- **Message Handling:**
28-
- **Markdown Support:** AI-generated responses utilize Markdown, enhanced with syntax highlighting (via PrismJS) for clarity in code snippets.
29-
- **Image Embedding:** Automatically embeds images generated by Pollinations based on AI conversation content.
30-
- **Editing and Regeneration:** Users can edit their messages or regenerate AI responses conveniently from within the chat interface.
31-
32-
- **Session Management:**
33-
- **Dynamic Session Handling:** Users can create, rename, delete, and switch between multiple chat sessions, each independently maintaining its conversation history.
34-
- **Automatic Title Generation:** Sessions automatically generate concise titles based on initial exchanges for easier identification.
35-
36-
### **2. Personalization & Memory**
37-
- **Memory Management:**
38-
- Integration with `memory-api.js` provides persistent memory storage, allowing users to store, manage, edit, and delete memories within the interface.
39-
- Prevents duplicate entries, ensuring organized memory storage.
40-
41-
- **Personalization Options:**
42-
- Users can specify their name, interests, preferred AI behaviors, and additional information. These details are stored locally and leveraged by the AI to tailor responses uniquely to the user's profile.
43-
44-
### **3. Screensaver Module**
45-
- An integrated dynamic screensaver feature powered by Pollinations, capable of generating visually appealing images based on user-defined prompts.
46-
- Users have control over settings:
47-
- **Prompt:** Textual descriptions to generate specific imagery.
48-
- **Aspect Ratios:** Supports widescreen, square, and portrait modes.
49-
- **Timing Control:** Interval customization for image rotation.
50-
- **Privacy Options:** Controls image visibility on public feeds.
51-
52-
- Provides direct download, save, and copy-to-clipboard functionalities for displayed screensaver images.
53-
54-
### **4. Backend Server**
55-
- **Express Server (`server.js`):**
56-
- Provides APIs for:
57-
- **User Registration:** Registers and tracks unique user IDs, storing them persistently (`userData.json`).
58-
- **Visitor Counting:** Returns real-time visitor statistics.
59-
60-
- **Ubuntu Deployment Guide:**
61-
- Comprehensive server setup instructions (`Server setup.txt`), guiding deployment using Node.js, npm, PM2 (for process management), firewall setup (`ufw`), and optional reverse proxy configurations via Nginx/Apache.
62-
63-
### **5. Storage & Persistence (`storage.js`)**
64-
- Manages session data, memory entries, and user personalization details locally (`localStorage`), ensuring persistent state across user sessions.
65-
- Implements fallback mechanisms in case server-side persistence is unavailable, ensuring robustness and offline capability.
66-
67-
### **6. UI & Themes**
68-
- **Customizable UI:**
69-
- Employs Bootstrap 5, custom stylesheets (`styles.css` and `light.css`), and Font Awesome for iconography.
70-
- Supports dynamic theme switching (e.g., light, dark, hacker, etc.), catering to varied user aesthetics and readability preferences.
71-
72-
- **Responsive Design:**
73-
- Ensures usability across various screen sizes (mobile, tablet, desktop), maintaining optimal user experience irrespective of device.
74-
75-
### **7. Utilities & Enhancements**
76-
- **Clipboard Functionality:**
77-
Allows easy copying of cryptocurrency addresses, images, and text snippets directly from the interface.
78-
79-
- **Donation Integration:**
80-
- Direct integration of donation mechanisms supporting cryptocurrencies like BTC, ETH, DOGE, and XMR, accessible through intuitive modals.
81-
82-
- **Visitor Counter:**
83-
- Displays a live count of unique visitors through periodic server API polling, defaulting gracefully in case of network issues.
84-
85-
- **Error Handling & Notifications:**
86-
- User-friendly toast notifications (`showToast`) provide real-time feedback on interactions like successful copying, memory updates, errors, etc.
87-
88-
---
89-
90-
## **Technical Stack & Dependencies**
91-
- **Frontend:** HTML, CSS, JavaScript, Bootstrap 5, Font Awesome, PrismJS, Marked.js
92-
- **Backend:** Node.js (Express), cors, fs for file operations
93-
- **Speech & Multimedia:** Web Speech API for speech synthesis and recognition
94-
- **Persistent Storage:** Local Storage and server-side JSON file storage (`userData.json`)
95-
- **Deployment Tools:** Ubuntu server, Node.js, npm, PM2 for daemonization, ufw firewall configurations
96-
97-
---
98-
99-
## **Usage Workflow**
100-
101-
- **Launching:**
102-
- User connects via the web interface hosted on the Node.js Express server.
103-
- Automatic unique ID generation and session initialization occur upon first load.
104-
105-
- **Interacting:**
106-
- Engage via text or voice, manage sessions, personalize AI interactions, and explore dynamically generated imagery.
107-
108-
- **Administration & Maintenance:**
109-
- Administer sessions, clear memory or chat history, configure UI preferences, monitor user statistics, and manage server through provided server scripts.
110-
111-
---
112-
113-
## **Security & Privacy**
114-
115-
- Persistent data is stored securely on local storage or server-side JSON files.
116-
- API endpoints (`/api/registerUser`, `/api/visitorCount`) include basic validation to ensure data integrity and minimize malicious usage.
117-
118-
---
119-
120-
## **Extensibility & Future Considerations**
121-
122-
- The modular architecture facilitates easy integration of additional AI models or APIs.
123-
- Potential expansions might include enhanced security measures, comprehensive backend database integration, more complex personalization features, or further multimedia interactions.
124-
125-
---
126-
7+
Here's a comprehensive breakdown of your web app's functionality based on the provided files:
8+
9+
---
10+
11+
## **General Overview**
12+
13+
Your web application, titled **"Unity Chat U1 6.6"**, provides an interactive chat interface integrating multiple sophisticated features to enhance user interaction with AI models, manage conversations, personalize experiences, and dynamically handle multimedia elements like voice synthesis, speech recognition, and automated image generation via Pollinations.
14+
15+
---
16+
17+
## **Core Features**
18+
19+
### **1. Chat Interface**
20+
- **Real-time Conversations:**
21+
Allows users to communicate with AI-powered models, facilitating dynamic, real-time interactions.
22+
23+
- **Speech Integration:**
24+
- **Speech Synthesis:** Converts AI responses into spoken audio with selectable voice preferences (`Google UK English Female`, `Microsoft Zira`, etc.).
25+
- **Speech Recognition:** Users can dictate messages through voice input, which captures speech and translates it into textual inputs in real-time.
26+
27+
- **Message Handling:**
28+
- **Markdown Support:** AI-generated responses utilize Markdown, enhanced with syntax highlighting (via PrismJS) for clarity in code snippets.
29+
- **Image Embedding:** Automatically embeds images generated by Pollinations based on AI conversation content.
30+
- **Editing and Regeneration:** Users can edit their messages or regenerate AI responses conveniently from within the chat interface.
31+
32+
- **Session Management:**
33+
- **Dynamic Session Handling:** Users can create, rename, delete, and switch between multiple chat sessions, each independently maintaining its conversation history.
34+
- **Automatic Title Generation:** Sessions automatically generate concise titles based on initial exchanges for easier identification.
35+
36+
### **2. Personalization & Memory**
37+
- **Memory Management:**
38+
- Integration with `memory-api.js` provides persistent memory storage, allowing users to store, manage, edit, and delete memories within the interface.
39+
- Prevents duplicate entries, ensuring organized memory storage.
40+
41+
- **Personalization Options:**
42+
- Users can specify their name, interests, preferred AI behaviors, and additional information. These details are stored locally and leveraged by the AI to tailor responses uniquely to the user's profile.
43+
44+
### **3. Screensaver Module**
45+
- An integrated dynamic screensaver feature powered by Pollinations, capable of generating visually appealing images based on user-defined prompts.
46+
- Users have control over settings:
47+
- **Prompt:** Textual descriptions to generate specific imagery.
48+
- **Aspect Ratios:** Supports widescreen, square, and portrait modes.
49+
- **Timing Control:** Interval customization for image rotation.
50+
- **Privacy Options:** Controls image visibility on public feeds.
51+
52+
- Provides direct download, save, and copy-to-clipboard functionalities for displayed screensaver images.
53+
54+
### **4. Backend Server**
55+
- **Express Server (`server.js`):**
56+
- Provides APIs for:
57+
- **User Registration:** Registers and tracks unique user IDs, storing them persistently (`userData.json`).
58+
- **Visitor Counting:** Returns real-time visitor statistics.
59+
60+
- **Ubuntu Deployment Guide:**
61+
- Comprehensive server setup instructions (`Server setup.txt`), guiding deployment using Node.js, npm, PM2 (for process management), firewall setup (`ufw`), and optional reverse proxy configurations via Nginx/Apache.
62+
63+
### **5. Storage & Persistence (`storage.js`)**
64+
- Manages session data, memory entries, and user personalization details locally (`localStorage`), ensuring persistent state across user sessions.
65+
- Implements fallback mechanisms in case server-side persistence is unavailable, ensuring robustness and offline capability.
66+
67+
### **6. UI & Themes**
68+
- **Customizable UI:**
69+
- Employs Bootstrap 5, custom stylesheets (`styles.css` and `light.css`), and Font Awesome for iconography.
70+
- Supports dynamic theme switching (e.g., light, dark, hacker, etc.), catering to varied user aesthetics and readability preferences.
71+
72+
- **Responsive Design:**
73+
- Ensures usability across various screen sizes (mobile, tablet, desktop), maintaining optimal user experience irrespective of device.
74+
75+
### **7. Utilities & Enhancements**
76+
- **Clipboard Functionality:**
77+
Allows easy copying of cryptocurrency addresses, images, and text snippets directly from the interface.
78+
79+
- **Donation Integration:**
80+
- Direct integration of donation mechanisms supporting cryptocurrencies like BTC, ETH, DOGE, and XMR, accessible through intuitive modals.
81+
82+
- **Visitor Counter:**
83+
- Displays a live count of unique visitors through periodic server API polling, defaulting gracefully in case of network issues.
84+
85+
- **Error Handling & Notifications:**
86+
- User-friendly toast notifications (`showToast`) provide real-time feedback on interactions like successful copying, memory updates, errors, etc.
87+
88+
---
89+
90+
## **Technical Stack & Dependencies**
91+
- **Frontend:** HTML, CSS, JavaScript, Bootstrap 5, Font Awesome, PrismJS, Marked.js
92+
- **Backend:** Node.js (Express), cors, fs for file operations
93+
- **Speech & Multimedia:** Web Speech API for speech synthesis and recognition
94+
- **Persistent Storage:** Local Storage and server-side JSON file storage (`userData.json`)
95+
- **Deployment Tools:** Ubuntu server, Node.js, npm, PM2 for daemonization, ufw firewall configurations
96+
97+
---
98+
99+
## **Usage Workflow**
100+
101+
- **Launching:**
102+
- User connects via the web interface hosted on the Node.js Express server.
103+
- Automatic unique ID generation and session initialization occur upon first load.
104+
105+
- **Interacting:**
106+
- Engage via text or voice, manage sessions, personalize AI interactions, and explore dynamically generated imagery.
107+
108+
- **Administration & Maintenance:**
109+
- Administer sessions, clear memory or chat history, configure UI preferences, monitor user statistics, and manage server through provided server scripts.
110+
111+
---
112+
113+
## **Security & Privacy**
114+
115+
- Persistent data is stored securely on local storage or server-side JSON files.
116+
- API endpoints (`/api/registerUser`, `/api/visitorCount`) include basic validation to ensure data integrity and minimize malicious usage.
117+
118+
---
119+
120+
## **Extensibility & Future Considerations**
121+
122+
- The modular architecture facilitates easy integration of additional AI models or APIs.
123+
- Potential expansions might include enhanced security measures, comprehensive backend database integration, more complex personalization features, or further multimedia interactions.
124+
125+
---
126+
127127
This detailed breakdown encapsulates your application's extensive functionality, highlighting a robust and user-centric design that seamlessly integrates advanced AI interactions with user experience enhancements, comprehensive storage, personalization, multimedia features, and robust backend capabilities.

0 commit comments

Comments
 (0)