From 09e6a75a9bd3540fe4b3ed1d1b6f55f653f2b56f Mon Sep 17 00:00:00 2001 From: Ricky Stretch Date: Tue, 10 Mar 2026 15:02:45 -0400 Subject: [PATCH] v0.6.4 fixed help.md display --- .env.example | 2 +- Dockerfile | 2 - backend/package.json | 2 +- backend/src/data/help.md | 105 +++++++++++++++++++++++++++++++++++++ backend/src/routes/help.js | 7 +-- build.sh | 2 +- frontend/package.json | 2 +- 7 files changed, 113 insertions(+), 9 deletions(-) create mode 100644 backend/src/data/help.md diff --git a/.env.example b/.env.example index 9253ab3..199d65e 100644 --- a/.env.example +++ b/.env.example @@ -7,7 +7,7 @@ TZ=UTC # Copy this file to .env and customize # Image version to run (set by build.sh, or use 'latest') -JAMA_VERSION=0.6.3 +JAMA_VERSION=0.6.4 # Default admin credentials (used on FIRST RUN only) ADMIN_NAME=Admin User diff --git a/Dockerfile b/Dockerfile index 1bc713b..8e6970b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,8 +42,6 @@ COPY --from=builder /app/frontend/dist ./public # Create data and uploads directories RUN mkdir -p /app/data /app/uploads/avatars /app/uploads/logos /app/uploads/images -# Copy default help.md (can be overridden by mounting /app/data/help.md) -COPY data/help.md /app/data/help.md EXPOSE 3000 diff --git a/backend/package.json b/backend/package.json index 6311873..9fc9b9c 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "jama-backend", - "version": "0.6.3", + "version": "0.6.4", "description": "TeamChat backend server", "main": "src/index.js", "scripts": { diff --git a/backend/src/data/help.md b/backend/src/data/help.md new file mode 100644 index 0000000..1546cc8 --- /dev/null +++ b/backend/src/data/help.md @@ -0,0 +1,105 @@ +# Getting Started with Jama + +Welcome to **Jama** — your private, self-hosted team messaging app. + +--- + +## Navigating Jama + +### Message List (Left Sidebar) +The sidebar shows all your message groups and direct conversations. Tap or click any group to open it. + +- **#** prefix indicates a **Public** group — visible to all users +- **Lock** icon indicates a **Private** group — invite only +- **Bold** group names have unread messages +- The last message preview shows **You:** if you sent it + +--- + +## Sending Messages + +Type your message in the input box at the bottom and press **Enter** to send. + +- **Shift + Enter** adds a new line without sending +- Tap the **+** button to attach a photo or emoji +- Use the **camera** icon to take a photo directly (mobile) + +### Mentioning Someone +Type **@** followed by the person's name to mention them. Select from the dropdown that appears. Mentioned users receive a notification. + +Example: `@[John Smith]` will notify John. + +### Replying to a Message +Hover over any message and click the **reply arrow** to quote and reply to it. + +### Reacting to a Message +Hover over any message and click the **emoji** button to react with an emoji. + +--- + +## Direct Messages + +To start a private conversation with one person: + +1. Click the **pencil / new chat** icon in the sidebar +2. Select one user from the list +3. Click **Start Conversation** + +--- + +## Group Messages + +To create a group conversation: + +1. Click the **pencil / new chat** icon +2. Select two or more users +3. Enter a **Group Name** +4. Click **Create** + +> If a group with the exact same members already exists, you will be redirected to it automatically. + +--- + +## Your Profile + +Click your name or avatar at the bottom of the sidebar to: + +- Update your **display name** (shown to others instead of your username) +- Add an **about me** note +- Upload a **profile photo** +- Change your **password** + +--- + +## Customising Group Names + +You can set a personal display name for any group that only you will see: + +1. Open the group +2. Click the **ⓘ info** icon in the top bar +3. Enter your custom name under **Your custom name** +4. Click **Save** + +Other members still see the original group name. + +--- + +## Settings + +Admins can access **Settings** from the user menu to configure: + +- App name and logo +- Default user password +- Notification preferences + +--- + +## Tips + +- 🌙 Toggle **dark mode** from the user menu +- 🔔 Enable **push notifications** when prompted to receive alerts when the app is closed +- 📱 Install Jama as a **PWA** on your device — tap *Add to Home Screen* in your browser menu for an app-like experience + +--- + +*This help file can be updated by your administrator at any time.* diff --git a/backend/src/routes/help.js b/backend/src/routes/help.js index 4b24e13..0e30bce 100644 --- a/backend/src/routes/help.js +++ b/backend/src/routes/help.js @@ -5,13 +5,14 @@ const path = require('path'); const { getDb } = require('../models/db'); const { authMiddleware } = require('../middleware/auth'); -const HELP_FILE = '/app/data/help.md'; -const HELP_FALLBACK = path.join(__dirname, '../../data/help.md'); +// help.md lives inside the backend source tree — NOT in /app/data which is +// volume-mounted and would hide files baked into the image at build time. +const HELP_FILE = path.join(__dirname, '../data/help.md'); // GET /api/help — returns markdown content router.get('/', authMiddleware, (req, res) => { let content = ''; - const filePath = fs.existsSync(HELP_FILE) ? HELP_FILE : HELP_FALLBACK; + const filePath = HELP_FILE; try { content = fs.readFileSync(filePath, 'utf8'); } catch (e) { diff --git a/build.sh b/build.sh index 9f408a4..14aed0d 100644 --- a/build.sh +++ b/build.sh @@ -13,7 +13,7 @@ # ───────────────────────────────────────────────────────────── set -euo pipefail -VERSION="${1:-0.6.3}" +VERSION="${1:-0.6.4}" ACTION="${2:-}" REGISTRY="${REGISTRY:-}" IMAGE_NAME="jama" diff --git a/frontend/package.json b/frontend/package.json index ad10de5..abd7ba2 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "jama-frontend", - "version": "0.6.3", + "version": "0.6.4", "private": true, "scripts": { "dev": "vite",