A NodeJS application for creating and managing documentation and changelogs articles within distinct projects, using Markdown and powered by PocketBase.
- Project Organization: Group your content (entries, templates, assets) into separate projects.
- Rich Markdown Editing: Create and manage content using a familiar Markdown editor (EasyMDE) with:
- Toolbar assistance (bold, italic, lists, links, etc.)
- Direct image uploads within the editor.
- Diagram support using Mermaid syntax (flowcharts, sequence diagrams, etc.).
- Grammar and style checking integration (via LanguageTool API).
- Ctrl+S / Cmd+S shortcut for saving forms.
- Download content as a Markdown file.
- Multiple Content Types: Manage:
- Documentation Articles
- Changelog Entries
- Sidebar Headers (for organizing public project sidebars)
- Staging Workflow: Make changes to published entries without affecting the live version. Publish staged changes explicitly when ready. View diffs between published and staged versions.
- Preview Links: Generate shareable, optionally password-protected preview links for draft or staged entries.
- Custom Headers & Footers: Create reusable HTML/CSS/JS headers and footers per project, specific to Documentation or Changelog entry types. Apply them to individual entries. Headers can be sticky.
- Templates (Per-Project): Define reusable Markdown templates within each project for consistent entry structure. Apply templates when creating new entries.
- Sidebar Ordering (Per-Project): Drag-and-drop interface to control the order of entries and headers shown in the public project sidebar.
- Export Projects: Export entire projects including entries, templates, and assets for backup or transfer.
- Import Projects: Import previously exported projects to restore or migrate content seamlessly.
- Admin Dashboards:
- Global dashboard for an overview across all projects.
- Per-project dashboard with specific metrics and activity charts (using ApexCharts).
- Secure Access: Dashboard access is protected by PocketBase user authentication. Project access is controlled per user.
- Project Access Control: Projects can be made public or private, with optional password protection for public projects.
- Project Settings: Configure project name, description, visibility, password, and feature enablement (View Tracking, Time Tracking, Full Width Content).
- View Tracking: Basic view counts are recorded for each public entry page using SQLite and privacy-preserving IP hashing. Configurable per project.
- View Time Tracking: Optionally track approximate time spent on public documentation and changelog pages. Configurable per project. Requires View Tracking to be enabled.
- Feedback Mechanism: Simple "Was this helpful?" (Yes/No) voting system on public entry pages. Results visible on project dashboard.
- Pocketbase Backend: Leveraging the speed and simplicity of Pocketbase for data storage and user authentication.
- Public View Pages: Automatically generated, styled pages for customers to view published entries (
/view/:id), respecting project visibility, password settings, and custom headers/footers. - Configurable: Uses environment variables (
.env) and dynamic application settings stored in PocketBase (app_settingscollection). - Global Search: Search across all entries (title, tags) accessible to the logged-in user (if enabled in settings).
- Audit Log: Tracks key system and user actions globally (if enabled in settings). Viewable in the admin UI and exportable to CSV.
- Archiving: Archive entries instead of permanently deleting them. View and manage archived entries per project/type.
- File Management: Basic overview page for files uploaded via the editor (size calculation optional).
- Light & Dark Themes: Choose your preferred viewing mode for the admin interface. Theme preference is saved per user.
- Graceful Shutdown: Handles
SIGINTto close database connections and the server properly.
- Backend: NodeJS, Express
- Templating: EJS
- Database: PocketBase
- Session Store: SQLite (
connect-sqlite3) - View Tracking Store: SQLite (
sqlite3) - Markdown Editor: EasyMDE
- Markdown Parsing: Marked.js
- HTML Sanitization: DOMPurify
- Diagrams: Mermaid
- Dashboard Charts: ApexCharts
- Drag & Drop: SortableJS
- Styling: Vanilla CSS
Before you begin, ensure you have the following installed:
- Node.js: Version 18 or higher recommended. (Download Node.js)
- npm: Usually included with Node.js.
- Git: For cloning the repository. (Download Git)
- A running PocketBase instance:
- Download and run PocketBase from pocketbase.io.
- Note the URL where it's running (e.g.,
http://127.0.0.1:8090).
-
Clone the repository:
git clone https://github.com/devAlphaSystem/Alpha-System-ContentHub.git cd Alpha-System-ContentHub -
Install dependencies:
npm install
Configuration is managed through a .env file in the project root.
-
Create
.envand fill in the values:# --- Required --- # PocketBase instance URL POCKETBASE_URL=http://127.0.0.1:8090 # Credentials for an ADMIN/SUPERUSER account in PocketBase (used for setup script & admin tasks) POCKETBASE_ADMIN_EMAIL=your_admin_email@example.com POCKETBASE_ADMIN_PASSWORD=your_admin_password # Generate strong, random strings for these secrets! SESSION_SECRET=your-very-strong-random-secret-key-here IP_HASH_SALT=another-very-strong-random-secret-for-hashing-ips # --- Optional --- # Set to "production" for production environments, otherwise "development" NODE_ENV=development # Port for the NodeJS application to run on PORT=3000 # Log level: NONE < ERROR < WARN < INFO < DEBUG < TRACE LOG_LEVEL=INFO # Default items per page in tables ITEMS_PER_PAGE=10 # Session duration in days SESSION_MAX_AGE_DAYS=7 # Default expiry for preview links (hours) - Can be overridden in App Settings UI PREVIEW_TOKEN_EXPIRY_HOURS=6 # Default for Global Search feature - Can be overridden in App Settings UI ENABLE_GLOBAL_SEARCH=true # Default for Audit Log feature - Can be overridden in App Settings UI ENABLE_AUDIT_LOG=true # Default for View Tracking on new projects - Can be overridden in App Settings UI ENABLE_PROJECT_VIEW_TRACKING_DEFAULT=true # Default for View Time Tracking on new projects - Can be overridden in App Settings UI ENABLE_PROJECT_TIME_TRACKING_DEFAULT=true # Default for Full Width Content on new projects - Can be overridden in App Settings UI ENABLE_PROJECT_FULL_WIDTH_DEFAULT=false # Default for File Size Calculation on Files page - Can be overridden in App Settings UI ENABLE_FILE_SIZE_CALCULATION=true # How long (hours) before a view from the same IP is counted again VIEW_TIMEFRAME_HOURS=24 # Average words per minute used for reading time calculation AVERAGE_WPM=225
-
Configure PocketBase Collections:
This project includes a schema definition file (
pb_schema.json) that contains all required PocketBase collections. Import this schema directly in the PocketBase dashboard.Steps to Import Schema:
- Ensure your PocketBase instance is running at the
POCKETBASE_URLspecified in your.envfile. - Open your PocketBase Admin UI (e.g.,
http://127.0.0.1:8090/_/). - Navigate to Settings > Import collections.
- Click on Load from JSON file and select the
pb_schema.jsonfile from the project root directory. - Review the collections that will be imported.
- Click Import to create the collections.
- If collections were partially created or errors occur, you might need to manually delete them from the PocketBase Admin UI before re-importing.
- Ensure your PocketBase instance is running at the
-
Configure
usersCollection (Manual Step):You still need to configure the default
userscollection for application login:- Navigate to your PocketBase Admin UI (e.g.,
http://127.0.0.1:8090/_/). - Go to
userscollection > Options > Identity/Password. - Ensure "Identity/Password" is ENABLED.
- You might want to disable "Send email alert for new logins" to avoid error logs if email is not configured in PocketBase.
- Create at least one non-admin user account via the UI. This user account will be used to log into the Content Hub application itself.
- Navigate to your PocketBase Admin UI (e.g.,
-
Ensure PocketBase is running and the collections have been configured (by importing
pb_schema.jsonin the PocketBase dashboard). -
Start the Node.js application:
-
Development Mode (with automatic restarts using
nodemon):npm run dev
-
Production Mode:
npm start
-
-
Access: Open your browser and navigate to
http://localhost:3000(or the port specified in your.envfile). Log in using the non-admin user credentials you created in PocketBase.
- Navigate to the application's URL (e.g.,
http://localhost:3000). - You will be presented with a login screen.
- Enter the email and password associated with your non-admin PocketBase user account.
- Click "Login".
The admin interface consists of:
- Sidebar: Provides primary navigation between the Global Dashboard, Projects list, and project-specific sections (when a project is active). Also includes links to File Management, Global Log (if enabled), Settings, and Logout. The theme toggle is at the bottom.
- Top Bar: Displays context-specific navigation (e.g., different entry types within a project), the Global Search bar (if enabled), and a mobile navigation toggle.
- Main Content Area: Displays the primary content for the selected section (dashboards, tables, forms).
- Footer: Shows copyright information and the application version.
Accessed by clicking "Dashboard" in the sidebar or navigating to /.
- Overview: Displays key metrics across all projects you own:
- Total Projects
- Total Documentation & Changelog Entries
- Published/Draft/Staged Counts (Docs & CL)
- Total Views (Docs & CL, if view tracking is enabled)
- Entry Counts by Type (Docs, Changelogs)
- Recently Updated Projects: A quick list of your most recently modified projects.
- Top Viewed Entries: Lists your most viewed Documentation and Changelog entries (if view tracking is enabled).
- Activity Chart: Visualizes entry creation activity over the last 30 days using ApexCharts.
- Update Notification: If a newer version of the Content Hub is available (checked via GitHub commit messages), a notification will appear.
- Click "Projects" in the sidebar or navigate to
/projects. - This page lists all projects you own with pagination.
- Search: Use the search bar at the top right to filter projects by name or description.
- Sorting: Click column headers (Project Name, Last Updated) to sort the list.
- Actions:
- Click a project name to go to its Project Dashboard.
- Click the dashboard icon () to go to the Project Dashboard.
- Click the settings icon () to edit the project's settings.
- Click the trash icon () to delete the project (requires confirmation).
- Go to the Projects list (
/projects). - Click the "Create New Project" button.
- Enter a Project Name (required).
- Optionally, enter a Description.
- Click "Create Project". You will be redirected to the new project's Documentation entry list. Default settings (like view tracking) are applied based on System Settings.
- Navigate to the specific Project Dashboard (
/projects/:projectId). - Click the "Settings" button in the header actions OR click the settings icon () from the main Projects list.
- Modify the following settings:
- Project Name: The display name of the project.
- Description: An optional description.
- Enable Public View: Toggles whether the project's content (
/view/:id,/roadmap/:projectId,/kb/:projectId) is accessible publicly. - Require Password for Public View: (Only effective if Public View is enabled) If checked, visitors need a password to access public pages.
- Project Access Password: Set or change the password required for public access (only appears if "Require Password" is checked). Leave blank to keep the current password. Passwords are securely hashed.
- Enable Public Roadmap: Toggles the visibility of the
/roadmap/:projectIdpage (subject to Public View and Password settings). - Enable View Tracking: Toggles whether page views are counted for Docs & Changelogs.
- Enable View Time Tracking: (Only effective if View Tracking is enabled) Toggles whether approximate time spent on Docs & Changelogs is tracked.
- Use Full Width Content: Toggles whether the public view pages for this project use a full-width layout by default.
- Click "Save Changes".
Warning: Deleting a project is irreversible and permanently removes the project and ALL associated content, including entries (active and archived), templates, headers, footers, preview links, and view tracking data.
- Go to the Projects list (
/projects). - Find the project you want to delete.
- Click the trash icon ().
- A confirmation modal will appear. Read the warning carefully.
- Click "Delete Project" to confirm. The deletion process happens in the background and may take a moment for projects with many entries.
Accessed by clicking a project name or the dashboard icon () from the Projects list, or "Project Overview" from the project's sidebar section.
- Overview: Displays metrics specific to the current project:
- Total Entries (Docs, CL, KB)
- Total Views (Docs & CL, if enabled)
- Average View Time (Docs & CL, if enabled)
- Helpful/Not Helpful Feedback Counts
- Recently Updated: Lists the most recently modified entries within this project.
- Activity Chart: Visualizes entry creation activity for this project over the last 30 days.
- Feedback Chart: A donut chart showing the distribution of "Helpful" vs. "Not Helpful" votes for entries in this project.
- Header Actions:
- View Public Page/Roadmap/KB: Links to the public views (if applicable and enabled). The "View Public Page" link goes to the first entry in the sidebar order.
- Settings: Navigates to the Project Settings page.
- Create New Entry: Navigates to the form for creating a new entry in this project.
- Documentation: Standard articles, guides, or documentation pages. Supports custom headers/footers. Can be shown in the sidebar. Tracks views, time, and feedback.
- Changelog: Entries typically used for release notes or update logs. Supports custom headers/footers. Can be shown in the sidebar. Tracks views, time, and feedback.
- Roadmap: Items representing features or tasks, displayed on a public Kanban-style board. Does not use the Markdown editor directly but has Title, Stage, and Tags. Cannot be shown in the main sidebar. Does not track views/time/feedback.
- Knowledge Base: Question/Answer pairs displayed in an accordion-style public view. Uses Markdown for the answer. Cannot be shown in the main sidebar. Does not track views/time/feedback.
- Sidebar Header: A special entry type used only for creating section headers within the public project sidebar. Managed via the "Sidebar Order" page. Not publicly viewable on its own.
- Navigate to a project dashboard.
- Use the Top Bar navigation (Documentation, Changelog, Roadmap, Knowledge Base links) or the Sidebar links under the project name to access the list view for each entry type.
- Filtering: Use the "Filter by Collection" dropdown (if applicable) to show entries only from a specific collection.
- Searching: Use the search input to filter entries by Title, Collection, or Tags within the current list.
- Sorting: Click column headers (Title, Status, Collection, Views, Avg. Time, Updated, Stage, Helpful Yes/No) to sort the table.
- Pagination: Use the controls below the table to navigate through pages of entries.
- Actions (per entry):
- (Publish Staged): Appears for published entries with staged changes. Click to open a confirmation modal to publish the changes live.
- (View Diff): Appears for published entries with staged changes. Opens a page showing the differences between the published and staged content.
- (Preview Staged): Appears for published entries with staged changes. Opens the staged version in a preview mode (similar to public view but marked as preview).
- (View Public): Opens the public view page in a new tab (for published Docs/Changelogs).
- (View Public Roadmap): Opens the public roadmap board in a new tab (for Roadmap items).
- (Edit): Opens the entry editing page.
- (Archive): Moves the entry to the archive (requires confirmation). Sidebar Headers cannot be archived and will be deleted instead.
- (Delete): Permanently deletes the entry (requires confirmation).
- Navigate to the desired Project Dashboard or an Entry List page for that project.
- Click the "Create New Entry" button (or "Create New Doc Entry", etc.).
- Use Template (Optional): Select a pre-defined template from the dropdown to populate the content area. Warning: This will replace any existing content in the editor.
- Select the Type (Documentation, Changelog, Roadmap, KB). The form will adjust based on the type.
- Enter a Title (required). For KB, this is the Question.
- Select the initial Status (Draft or Published).
- Enter Collection (Optional, not for Roadmap/KB): A category name (e.g., "API", "User Guides"). Used for filtering.
- Enter Tags (Optional, not for Roadmap): Comma-separated keywords. Used for filtering and display.
- URL (Optional ID): By default, a random ID is generated. You can optionally provide a specific 15-character alphanumeric ID here before creating the entry. Use with caution, must be unique across all entries. The prefix shows the base public URL. Check availability using the button.
- Custom Headers/Footers (Optional, for Docs/Changelogs): Select pre-defined headers or footers to apply to this specific entry's public view page.
- Roadmap Stage (Required for Roadmap): Select the current stage (Planned, Next Up, etc.).
- Show in Project Sidebar? (Docs/Changelogs): Choose whether this entry should appear in the public project sidebar navigation.
- Content/Answer (Required, except Roadmap): Use the Markdown editor to write the main content (or Answer for KB). See Using the Markdown Editor.
- Click "Create Entry".
- Navigate to the appropriate Entry List for the project.
- Find the entry you want to edit and click the pencil icon ().
- Modify the fields as needed. Note that some fields (like URL, Collection, Status for published+staged entries) might be read-only depending on the entry's state.
- Use the Markdown editor for content changes.
- Click "Update Entry" (for drafts) or "Save Staged Changes" (for published entries). Use
Ctrl+S/Cmd+Sas a shortcut.
- When you edit an entry that is already Published, your changes are staged by default when you save.
- This means the live public view (
/view/:id) remains unchanged. - The entry list will show a "Staged" badge next to the "Published" status.
- Actions for Staged Entries:
- (Publish Staged): Makes the staged changes live, overwriting the previous published version.
- (View Diff): Shows a side-by-side comparison of the published and staged Markdown content.
- (Preview Staged): Opens a preview of how the staged version will look on the public page.
- If you change the status of a published entry back to "Draft", any staged changes are discarded.
- When editing a Draft entry or a Published entry with Staged Changes, a "Share Preview" button appears in the header actions.
- Clicking this button allows you to generate a temporary, shareable link to preview the current state (draft or staged version).
- You can optionally require a password for the preview link.
- The generated link has an expiry time (configurable via environment variable or App Settings).
- Use these links to get feedback before publishing. Preview links are automatically cleaned up when the entry is deleted or archived, or when they expire.
- When editing any entry, a "Duplicate Entry" button is available in the form actions.
- Clicking this prompts for confirmation.
- If confirmed, a new Draft entry is created as a copy of the current state shown in the editor (including any unsaved changes you might have made).
- The new entry's title will be prefixed with "Copy of ".
- You will be redirected to the edit page of the newly created duplicate.
- From the Entry List, click the archive icon () for the desired entry.
- Confirm the action in the modal.
- The entry is moved from the main list to the corresponding "Archived" list (e.g., Archived Documentation).
- Archived entries are not publicly visible and are removed from sidebar ordering. View tracking data is preserved but not actively collected.
- Note: Sidebar Headers cannot be archived; attempting to archive them will result in deletion.
- Navigate to the main list for a specific entry type (e.g., Documentation).
- Click the "View Archived" button usually found near the "Create New" button.
- This page lists archived entries of that type for the current project.
- Actions:
- (Unarchive): Moves the entry back to the main list as a Draft (requires confirmation).
- (Delete Permanently): Permanently deletes the archived entry (requires confirmation).
Warning: Deleting an entry (from the main list or the archived list) is permanent and cannot be undone. Associated view tracking data is also cleared.
- From the Entry List or Archived List, click the trash icon () for the desired entry.
- Confirm the action in the modal (read the warning carefully).
- The entry is permanently deleted.
- On Entry List pages, use the checkboxes in the first column to select multiple entries. Use the checkbox in the table header to select/deselect all visible entries on the current page.
- Once one or more entries are selected, the "Bulk Actions" container appears above the table.
- Click the "Bulk Actions" button to reveal a dropdown menu with available actions:
- Set Status to Published
- Set Status to Draft (discards staged changes if applied to published items)
- Publish Staged Changes (only affects selected published items that have staged changes)
- Archive Selected
- Delete Selected (Permanent deletion)
- Select an action and confirm in the modal. The action will be applied to all selected entries. Partial success/failure messages may appear if some actions fail (e.g., trying to archive an already archived item implicitly via selection).
The editor (EasyMDE) provides a rich text editing experience using Markdown syntax.
- Use the toolbar buttons for common formatting (Bold, Italic, Headings, Lists, Links, Code Blocks, Tables, etc.).
- Alternatively, use standard Markdown syntax directly in the editor.
- Click the image icon () in the toolbar or drag-and-drop an image file onto the editor.
- Supported formats: JPG, PNG, GIF, WEBP.
- Maximum file size: 10MB (by default).
- Uploaded images are stored within the PocketBase entry record and served directly. The editor inserts the correct image URL.
- Theming Images: You can make images specific to light or dark mode by adding
#lightor#darkto the end of the image URL after it's inserted by the editor (e.g.,). The corresponding image will only display when the user's theme matches on the public view page.
- Embed diagrams using Mermaid syntax within a
mermaidcode block:Loadinggraph TD; A-->B; A-->C; B-->D; C-->D; - Click the diagram icon () in the toolbar for a template.
- Supported diagram types depend on the included Mermaid library version (flowchart, sequence, Gantt, class, state, pie, ER, user journey, etc.). Refer to Mermaid documentation for syntax.
- Diagrams render automatically in the public view and preview pages.
- Click the spell check icon () in the toolbar or use
Ctrl+Shift+G(orCmd+Shift+G). - This uses the public LanguageTool API to check the editor's content (or selected text) for grammar and style issues.
- Potential issues are underlined. Hover over them for suggestions.
- The status bar below the editor provides feedback ("Checking...", "X issues found", "No issues found", "Error").
- Note: Editing the text after a check will clear the highlights.
- Click the nav buttons icon () in the toolbar.
- This inserts a special code block:
prev: [Previous Text](/previous-url) next: [Next Text](/next-url) - Edit the text and URLs within the block.
- On the public view page, this block will be rendered as styled "Previous" and "Next" navigation buttons at the bottom of the content.
- While editing an entry, template, header, or footer, press
Ctrl+S(orCmd+Son Mac) to trigger the form submission (Save/Update).
- Click the download icon () in the toolbar.
- This will download the current content of the editor as a
.mdfile. The filename is based on the entry's title.
- Access via Project Dashboard > Templates link OR
/projects/:projectId/templates. - Create, edit, or delete Markdown templates specific to the current project.
- Templates can be selected when creating a new entry to pre-fill the content editor.
- Access via Top Bar navigation when viewing Documentation or Changelog lists within a project (e.g., "Doc Headers", "CL Footers").
- Create, edit, or delete reusable HTML headers and footers. These are specific to either Documentation or Changelog entries within the current project.
- Features:
- Content: Use the editor (in HTML mode) to add your header/footer content.
- Apply Full Width: Check this if the header/footer content should span the full page width, ignoring the standard content container width.
- Is Sticky (Headers Only): Check this to make the header stick to the top of the viewport when scrolling.
- Custom CSS: Add CSS rules specific to this header/footer. These rules will be injected into the page.
- Custom JS: Add JavaScript code specific to this header/footer. This code will be executed when the page loads.
- Headers/Footers can be assigned to individual Documentation or Changelog entries via the edit screen.
- They appear above (Header) or below (Footer) the main entry content on the public view page.
- Caution: Content, CSS, and JS are injected directly. Ensure they are valid and safe. Malicious code could affect users viewing the public pages.
- Access via Project Dashboard > Sidebar Order link OR
/projects/:projectId/sidebar-order. - Lists entries (Docs/Changelogs) marked "Show in Project Sidebar?" and any created "Sidebar Headers".
- Reordering: Drag and drop list items using the handle () to change their order in the public sidebar.
- Adding Headers: Click "Add Sidebar Header", enter a title, and confirm. The header appears at the bottom of the list; drag it to the desired position.
- Editing Headers: Click the pencil icon () next to a header to change its title.
- Deleting Headers: Click the trash icon () next to a header to remove it (requires confirmation).
- Click "Save Order" to apply the changes to the public project sidebar.
- An optional text field available when creating/editing entries (except Roadmap/KB/Sidebar Header).
- Use it to group related entries (e.g., "API Guides", "Version 2 Updates").
- Entry lists can be filtered by collection using the dropdown menu.
- An optional comma-separated text field available when creating/editing Docs, Changelogs, and KB entries.
- Use it for keywords or specific topics (e.g., "billing", "integration", "bugfix").
- Tags are displayed on public view pages and can be used for searching.
- Available in the top bar if enabled in System Settings.
- Enter a search term and press Enter or click the search icon.
- Searches across the Title, Collection, and Tags of all entries (all types, excluding Sidebar Headers) you have access to across all your projects.
- Results are displayed on a dedicated search results page with pagination.
- Access via Sidebar > Global Log (if enabled in System Settings).
- Displays a chronological list of actions performed in the system (logins, creates, updates, deletes, settings changes, etc.).
- Shows timestamp, user (if applicable), action type, target (collection/record ID), details (click to view JSON), and IP address.
- Refresh: Reloads the log data.
- Export CSV: Download all logs as a CSV file.
- Clear All Logs: Permanently delete all audit log entries (requires confirmation).
- Access via Sidebar > Files.
- Lists all files uploaded via the Markdown editor across all your projects.
- Shows filename, associated entry title, project name, and upload date.
- Size Calculation (Optional): If enabled in System Settings, displays file sizes and total usage. Note: This can be slow if you have many files, as it requires checking each file's size.
- Actions:
- Click filename to view/download the file.
- Click entry title to go to the entry's edit page.
- Click project name to go to the project dashboard.
- Click trash icon () to delete the file from its entry (requires confirmation).
- Access via Sidebar > Settings.
- Configure application-wide settings:
- Enable Global Search Bar: Show/hide the top search bar.
- Enable Audit Logging: Turn audit logging on/off globally.
- Default: Enable View Tracking: Default setting for new projects.
- Default: Enable Time Tracking: Default setting for new projects.
- Default: Enable Full Width Content: Default setting for new projects.
- Enable File Size Calculation: Toggle size calculation on the Files page.
- Bot User Agents: Define user agent strings (one per line, case-insensitive) to exclude from view tracking.
- Click "Save Settings" to apply changes. Changes take effect immediately or upon the next relevant action (e.g., new project creation).
- Click the sun/moon toggle button in the sidebar footer.
- Switches the admin interface between Light and Dark modes.
- Your preference is saved locally and sent to the server for persistence across sessions/devices. Public pages also respect this preference if the user has visited the admin area.
The application automatically generates public-facing pages for your content, respecting project visibility and password settings.
- /view/:entryId: Displays a single published Documentation or Changelog entry.
- Includes custom headers/footers if assigned.
- Sidebar shows other entries and headers from the same project based on the "Sidebar Order" configuration.
- Includes Table of Contents generated from H2/H3/H4 headings.
- Code blocks have copy buttons.
- Headings are clickable links for easy sharing.
- Includes "Was this helpful?" feedback buttons (if view tracking is enabled for the project).
- /roadmap/:projectId: Displays a Kanban-style board for the project's published Roadmap items, grouped by stage.
- /kb/:projectId: Displays a searchable accordion view for the project's published Knowledge Base entries. Users can filter by tags or search questions.
- /preview/:token: Displays a draft or staged entry using a temporary, secure token. Looks identical to the public view but is marked as a preview and doesn't track views/feedback. May require a password if set during generation.
- Authentication: Relies on PocketBase's user authentication. Ensure your PocketBase instance is properly secured.
- Authorization: Access control is primarily based on the
ownerfield in projects, entries, templates, etc. Users can only manage content they own within projects they own. Public access is controlled by project settings. - Database & Storage: Uses PocketBase for main data and SQLite files (
db/sessions.db,db/view_tracking.db) for session storage and view tracking. Back up your PocketBase data directory and these.dbfiles regularly. - Session Storage: Uses
connect-sqlite3storing sessions indb/sessions.db. Consider alternatives (Redis, PostgreSQL) for high-traffic production. - View Tracking: Uses
sqlite3storing view logs and duration data indb/view_tracking.db. Hashing IPs enhances privacy but review GDPR/LGPD compliance if applicable. Bot detection is handled by theisbotpackage. - Error Handling: Basic error pages (403, 404, 500) are included. Check the application logs (console output) or server logs (
stdout) for detailed error messages.LOG_LEVELin.envcontrols verbosity. - Admin Client: The application uses a PocketBase admin client internally for certain operations (like setup, cleanup, some lookups, audit logging, cron jobs). Ensure the admin credentials in
.envare kept secure and the PocketBase instance is accessible. - Cron Jobs: Background jobs run hourly (by default) to clean up expired and orphaned preview tokens. Ensure the Node process stays running for these to execute.
- Dependencies: Key dependencies include Express, EJS, PocketBase SDK, Marked, EasyMDE, ApexCharts, SortableJS, DOMPurify, Mermaid, connect-sqlite3, sqlite3.
Contributions are welcome! Please feel free to submit pull requests or open issues.
Bitcoin - bc1qvl96wktx24ansqpgq7em7eqw2azkue6pltuga2
Ethereum - 0x517b5fA372793d878C063DCEa2286AA2307D2Ebf
XRP - rsASHgirdZdgSjAuQncg4Nc2PqPFNkjTCz
Dogecoin - DHt2KKtrzsyxvPv1QADLzh1xwxTiiW7iEK
This project is licensed under the MIT License - see the LICENSE.md file for details.