Skip to content

Commit be2f443

Browse files
committed
Updated Readme Files
1 parent 43f7b18 commit be2f443

File tree

5 files changed

+677
-163
lines changed
  • apps/react
    • comments
      • dashboard/inline-comments/dashboard-inline-comments-demo
      • website-builder/freestyle-comments/freestyle-comments-demo
    • self-hosting/dashboard

5 files changed

+677
-163
lines changed
Lines changed: 168 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
# Dashboard Inline Demo
1+
# Dashboard Inline Comments Demo
2+
3+
> **[🚀 View Live Demo](https://sample-apps-dashboard-inline-commen.vercel.app)**
4+
5+
6+
<!-- VIDEO_PLACEHOLDER -->
7+
28

39
## Overview
410

5-
This demo showcases **inline-comments** for **comments** (dashboard) in **react**.
11+
This demo showcases **inline comments** in a **jobs tracking dashboard** built with **React** and **Velt's commenting system**. Users can add inline comments directly on table cells and job items, enabling contextual feedback and collaboration on specific data points within the dashboard interface.
612

713
## Path
814

@@ -14,34 +20,105 @@ apps/react/comments/dashboard/inline-comments/dashboard-inline-comments-demo/
1420

1521
`@apps/react-comments-dashboard-inline-comments-demo`
1622

23+
## Features
24+
25+
### Commenting Features
26+
- **Inline Comments**: Add comments directly on table cells and job items
27+
- **Cell-Level Targeting**: Click any cell to attach contextual feedback
28+
- **Comment Bubbles**: Visual indicators showing comment count on cells
29+
- **Comments Sidebar**: Centralized panel displaying all comments across the dashboard
30+
- **@Mentions**: Tag collaborators in comments for direct feedback
31+
- **Notifications**: Stay updated on new comments and replies
32+
- **Presence Awareness**: See who's currently viewing the dashboard
33+
34+
### Dashboard Features
35+
- **Jobs Tracking Table**: View and manage job items with status tracking
36+
- **Summary Cards**: Quick overview of job statistics and metrics
37+
- **Status Badges**: Visual indicators for job status (pending, in progress, completed)
38+
- **Due Date Badges**: Track deadlines with visual due date indicators
39+
- **Pagination**: Navigate through large datasets efficiently
40+
- **Job Detail Modal**: Detailed view of individual job items
41+
- **Action Modal**: Quick actions on job items
42+
- **Dark Theme**: Professional dark mode interface
43+
- **Responsive Layout**: Collapsible sidebar for focused viewing
44+
45+
### Data Model
46+
- **Jobs Data**: Structured job items with status, dates, and metadata
47+
- **User Authentication**: Mock user system with multiple test users
48+
- **Document Context**: Scoped commenting per document/view
49+
1750
## Directory Structure
1851

1952
```
2053
dashboard-inline-comments-demo/
2154
├── app/
22-
│ ├── layout.tsx # Root layout
23-
│ └── page.tsx # Main page
55+
│ ├── api/
56+
│ │ └── velt/
57+
│ │ └── token/
58+
│ │ └── route.ts # Velt JWT token generation endpoint
59+
│ ├── document/
60+
│ │ ├── DocumentContext.tsx # Document context provider
61+
│ │ └── useCurrentDocument.ts # Document hook
62+
│ ├── userAuth/
63+
│ │ ├── AppProviders.tsx # App-level providers
64+
│ │ ├── AppUserContext.tsx # User authentication context
65+
│ │ └── useAppUser.ts # User authentication hook
66+
│ ├── layout.tsx # Root layout with providers
67+
│ └── page.tsx # Main page
2468
├── components/
25-
│ ├── header/ # Header components (Velt notifications, etc.)
26-
│ │ └── header.tsx
27-
│ ├── sidebar/ # Sidebar components
28-
│ │ └── sidebar.tsx
29-
│ └── document/ # Main document/canvas logic
30-
│ └── document-canvas.tsx
31-
├── hooks/ # Custom React hooks
32-
├── lib/ # Utility functions
33-
│ └── utils.ts
34-
├── public/ # Static assets
35-
├── styles/ # Global styles
36-
│ └── globals.css
37-
├── .npmrc # pnpm config to prevent Tailwind v4 hoisting
69+
│ ├── header/
70+
│ │ └── header.tsx # Header with Velt tools (presence, sidebar toggle, notifications)
71+
│ ├── sidebar/
72+
│ │ └── sidebar.tsx # Left navigation sidebar
73+
│ ├── document/
74+
│ │ ├── document-canvas.tsx # Main dashboard wrapper
75+
│ │ ├── JobsTable.tsx # Jobs tracking table component
76+
│ │ ├── SummaryCards.tsx # Dashboard summary cards
77+
│ │ ├── JobDetailModal.tsx # Job detail modal
78+
│ │ ├── ActionModal.tsx # Action modal component
79+
│ │ ├── CommentsSidebar.tsx # Comments sidebar panel
80+
│ │ ├── StatusBadge.tsx # Status badge component
81+
│ │ ├── DueBadge.tsx # Due date badge component
82+
│ │ ├── Avatar.tsx # User avatar component
83+
│ │ ├── Pagination.tsx # Pagination component
84+
│ │ ├── icons.tsx # Icon components
85+
│ │ ├── jobs-data.ts # Jobs data definitions
86+
│ │ └── types.ts # TypeScript type definitions
87+
│ └── velt/
88+
│ ├── ui-customization/
89+
│ │ ├── VeltCustomization.tsx # Velt UI customization wrapper
90+
│ │ ├── VeltCommentToolWf.tsx # Custom comment button wireframe
91+
│ │ ├── VeltCommentBubbleWf.tsx # Custom comment bubble wireframe
92+
│ │ ├── VeltCommentsSidebarHeaderWf.tsx # Custom sidebar header wireframe
93+
│ │ ├── VeltNotificationsToolWf.tsx # Custom notifications wireframe
94+
│ │ ├── VeltSidebarButtonWf.tsx # Custom sidebar button wireframe
95+
│ │ └── styles.css # Custom Velt styles
96+
│ ├── VeltCollaboration.tsx # Velt client setup and comments configuration
97+
│ ├── VeltInitializeDocument.tsx # Document initialization
98+
│ ├── VeltInitializeUser.tsx # User initialization
99+
│ └── VeltTools.tsx # Velt component exports
100+
├── hooks/ # Custom React hooks
101+
├── lib/
102+
│ └── utils.ts # Utility functions
103+
├── public/
104+
│ └── icons/ # SVG icons
105+
├── styles/
106+
│ └── globals.css # Global styles
38107
├── next.config.js
39108
├── tailwind.config.js
40109
├── tsconfig.json
41-
├── components.json # shadcn/ui configuration
110+
├── components.json # shadcn/ui configuration
42111
└── package.json
43112
```
44113

114+
## Key Technologies
115+
116+
- **Next.js 16** with React 19
117+
- **@veltdev/react** - Velt collaboration components
118+
- **Tailwind CSS v3.4** - Styling
119+
- **TypeScript** - Type safety
120+
- **Lucide React** - Icons
121+
45122
## Getting Started
46123

47124
### Install Dependencies
@@ -54,59 +131,102 @@ pnpm install
54131

55132
### Run Development Server
56133

134+
Navigate to the demo directory:
135+
57136
```bash
58137
cd apps/react/comments/dashboard/inline-comments/dashboard-inline-comments-demo
59138
pnpm dev
60139
```
61140

62-
Or from the root:
141+
Or run from the root:
63142

64143
```bash
65144
pnpm --filter @apps/react-comments-dashboard-inline-comments-demo dev
66145
```
67146

147+
Open [http://localhost:3000](http://localhost:3000) in your browser.
148+
68149
### Build for Production
69150

70151
```bash
71152
pnpm --filter @apps/react-comments-dashboard-inline-comments-demo build
72153
```
73154

74-
## Structure
155+
## Usage
156+
157+
### Adding Inline Comments
158+
159+
1. **Hover over a cell**: The comment icon appears on hover
160+
2. **Click comment icon**: Opens the comment dialog
161+
3. **Write comment**: Add your feedback with optional @mentions
162+
4. **Submit**: Comment appears as a bubble indicator on the cell
163+
164+
### Viewing Comments
165+
166+
1. **Cell indicators**: Click comment bubbles showing count on cells
167+
2. **Comments sidebar**: Open the sidebar to see all comments in one place
168+
3. **Navigate to context**: Click comments in sidebar to jump to the relevant cell
169+
170+
### Managing Jobs
171+
172+
1. **View job details**: Click on a job row to open the detail modal
173+
2. **Track status**: View status badges for each job
174+
3. **Monitor deadlines**: Check due date badges for upcoming deadlines
175+
4. **Navigate pages**: Use pagination to browse large datasets
176+
177+
### Collaboration Features
178+
179+
- **See active users**: View avatars of online collaborators in the header
180+
- **Receive notifications**: Bell icon shows comment activity
181+
- **Real-time updates**: All comments appear instantly for all users
75182

76-
- **Framework**: react
77-
- **Feature**: comments
78-
- **Document**: dashboard
79-
- **Library**: inline-comments
80-
- **Demo**: dashboard-inline-comments-demo
183+
## Troubleshooting
81184

82-
## Component Organization
185+
### PostCSS Errors
186+
If you see PostCSS/Tailwind errors, ensure:
187+
1. You ran `pnpm install` from the monorepo root
188+
2. You're not accidentally using Tailwind v4
83189

84-
- **`components/header/`** - Contains Velt components like notifications, presence indicators, header buttons
85-
- **`components/sidebar/`** - Contains sidebar-related components
86-
- **`components/document/`** - Contains the main application logic and inline-comments integration
87-
- **`hooks/`** - Custom React hooks for state management and side effects
88-
- **`lib/`** - Utility functions and helpers
190+
### Velt Not Loading
191+
If Velt features don't appear:
192+
1. Check that `NEXT_PUBLIC_VELT_API_KEY` is set in your environment
193+
2. Verify user initialization in browser console
194+
3. Ensure you're running the dev server on the correct port
89195

90-
## Important Configuration
196+
### Comments Not Appearing
197+
If comments aren't showing:
198+
1. Check browser console for errors
199+
2. Verify document ID is properly initialized
200+
3. Ensure Velt components are properly configured
91201

92-
### .npmrc File
93-
This demo includes a `.npmrc` file that prevents pnpm from hoisting Tailwind CSS v4 from other workspace packages. This is necessary because:
94-
- This demo uses Tailwind CSS v3.4.x with traditional PostCSS configuration
95-
- Other apps in the monorepo may use Tailwind CSS v4
96-
- Without the `.npmrc`, pnpm would hoist v4 and cause PostCSS errors
202+
## About Velt SDK
97203

98-
**Do not delete the `.npmrc` file** - it ensures the correct Tailwind version is used.
204+
<a href="https://npmjs.org/package/@veltdev/react">
205+
<img src="https://img.shields.io/npm/v/@veltdev/react?style=flat&label=npm&color=09f" alt="NPM" />
206+
</a>
99207

100-
## Next Steps
208+
With Velt SDK you can add powerful collaboration features to your product extremely fast.
101209

102-
1. Add your inline-comments implementation in `components/document/`
103-
2. Add Velt collaboration features in `components/header/`
104-
3. Update this README with specific usage instructions
105-
4. Add the demo to `master-sample-app` if it should be showcased
106-
5. Update deployment configs (Vercel, GitHub Actions) if needed
210+
The SDK provides **fullstack components**:
211+
- UI and behavior are fully customizable to match your product's needs
212+
- Fully-managed on a scalable realtime backend
107213

108-
## Learn More
214+
**Features include:**
215+
- **Comments** like Figma, Frame.io, Google Docs, Sheets and more
216+
- **Recording** like Loom (audio, video, screen)
217+
- **Huddle** like Slack (audio, video, screensharing)
218+
- In-app and off-app **notifications**
219+
- **@mentions** and assignment
220+
- **Presence**, **Cursors**, **Live Selection**
221+
- **Live state sync** with Single Editor mode
222+
- **Multiplayer editing** with conflict resolution
223+
- **Follow mode** like Figma
224+
- ... and so much more
109225

110-
- [Monorepo Structure Guide](../../../../../README_MONOREPO.md)
111-
- [Structure Documentation](../../../../../docs/structure.md)
112-
- [Velt Documentation](https://docs.velt.dev)
226+
### Resources
227+
- 📚 [Documentation](https://docs.velt.dev/get-started/overview) - Guides and API references
228+
- 🎨 [Use Cases](https://velt.dev/use-case) - See collaboration in action
229+
- 🎭 [Figma Template](https://www.figma.com/community/file/1402312407969730816/velt-collaboration-kit) - Visualize features for your product
230+
- 📝 [Release Notes](https://docs.velt.dev/release-notes/version-4/sdk-changelog) - Latest changes
231+
- 🔒 [Security](https://velt.dev/security) - SOC2 Type 2 & HIPAA compliant
232+
- 🐦 [X/Twitter](https://x.com/veltjs) - Updates and announcements

0 commit comments

Comments
 (0)