Welcome to NodeTea! This is a straightforward yet powerful web-based application designed for real-time communication and efficient file management. It leverages the robust capabilities of Node.js for its WebSocket-driven backend and a clean, responsive frontend built with standard HTML, CSS, and JavaScript.
- Real-time Chat: Engage in instant, seamless conversations with all connected devices.
- Image Sharing: Easily send and receive images directly within the chat interface.
- Comprehensive File Management:
- Upload with Progress Bar: Effortlessly upload various file types with visual progress feedback.
- Improved File List Display: View an organized list of all uploaded files with left-aligned filenames, emoji type indicators, and proper truncation for long names.
- Deletion: Securely remove files when no longer needed.
- Smart Sorting: Files are intelligently sorted by their upload time, with the newest files always appearing at the top for quick access.
- Dynamic Device Naming: Each connected device is automatically assigned a unique and memorable name, making conversations more personal.
- Persistent Chat History: All chat messages are automatically saved to a file, ensuring your conversations are never lost.
- Stylized User Interface: Enjoy a unique aesthetic with comic-book style borders applied to key elements.
- Optimized Mobile Experience:
- Unified Layout: Consistent and intuitive design across both chat and file management sections.
- Fixed Bottom Navigation: Easy access to core functionalities with a user-friendly bottom tab bar, now with matching comic-book style borders.
- Enhanced Input Field Behavior: Smooth and predictable typing experience, preventing unwanted page zooms on mobile devices.
Follow these simple steps to get NodeTea up and running on your local machine:
-
Prerequisites:
- Make sure you have Node.js installed. You can download it from the official website: nodejs.org.
-
Project Setup:
- If you've received the project files directly, navigate to the project's root directory.
- (If cloning from a repository, you would typically use
git clone [repository_url]and thencd NodeTea.)
-
Install Dependencies:
- Open your terminal or command prompt.
- Navigate to the
NodeTeaproject directory. - Run the following command to install all necessary packages:
npm install
-
Launch the Server:
- In the same terminal, execute the command below to start the Node.js server:
npm start
- You will see a message indicating that the server is running, typically on
http://localhost:8097.
- In the same terminal, execute the command below to start the Node.js server:
-
Access the Application:
- Open your preferred web browser.
- Go to the address displayed in your terminal (e.g.,
http://localhost:8097). - You are now ready to use NodeTea!
欢迎使用 NodeTea!这是一个简洁而功能强大的基于 Web 的应用程序,旨在提供实时通信和高效的文件管理功能。它利用 Node.js 强大的 WebSocket 服务器能力作为后端,并采用标准的 HTML、CSS 和 JavaScript 构建了一个清晰、响应式的前端界面。
- 实时聊天: 与所有连接的设备进行即时、无缝的对话。
- 图片分享: 在聊天界面中轻松发送和接收图片。
- 全面的文件管理:
- 带进度条上传: 轻松上传各种文件类型,并提供可视化进度反馈。
- 改进的文件列表显示: 查看所有已上传文件的有序列表,文件名左对齐,文件类型以表情符号显示,长文件名会正确截断。
- 删除: 安全地删除不再需要的文件。
- 智能排序: 文件按上传时间智能排序,最新上传的文件始终显示在顶部,方便快速查找。
- 动态设备命名: 每个连接的设备都会自动分配一个独特且易于记忆的名称,使对话更具个性化。
- 聊天历史持久化: 所有聊天消息都会自动保存到文件中,确保您的对话永不丢失。
- 风格化用户界面: 主要元素应用了漫画风格的粗线条描边,提供独特的美学体验。
- 优化移动端体验:
- 统一布局: 聊天和文件管理部分的设计一致且直观。
- 固定底部导航: 通过用户友好的底部标签栏,轻松访问核心功能,现在也带有匹配的漫画风格描边。
- 增强输入框行为: 流畅且可预测的输入体验,防止在移动设备上出现不必要的页面缩放。
按照以下简单步骤,在您的本地机器上运行 NodeTea:
-
前置条件:
- 请确保您的系统已安装 Node.js。您可以从官方网站下载:nodejs.org。
-
项目设置:
- 如果您已直接获取项目文件,请导航到项目的根目录。
- (如果是从仓库克隆,通常会使用
git clone [repository_url],然后cd NodeTea。)
-
安装依赖:
- 打开您的终端或命令提示符。
- 导航到
NodeTea项目目录。 - 运行以下命令安装所有必需的软件包:
npm install
-
启动服务器:
- 在同一终端中,执行以下命令启动 Node.js 服务器:
npm start
- 您将看到一条消息,指示服务器正在运行,通常在
http://localhost:8097。
- 在同一终端中,执行以下命令启动 Node.js 服务器:
-
访问应用:
- 打开您偏好的网页浏览器。
- 访问终端中显示的地址(例如,
http://localhost:8097)。 - 现在您就可以开始使用 NodeTea 了!
