A modern SaaS platform combining Slack-style channels with Notion-style documentation. PulseDocs helps teams unify communication and knowledge management in a single workspace, eliminating context switching between tools.
- Workspace Management - Isolated team spaces with role-based access control (owner, admin, member, guest)
- Authentication - Email/password auth with session persistence
- Channels - Real-time team communication with message history
- Documents - Markdown-based knowledge base with folder organization
- Search - Full-text search across documents and messages using PostgreSQL vectors
- Responsive UI - Desktop, tablet, and mobile support with Tailwind CSS
- Real-time Subscriptions - Live updates for messages, channels, and documents using Supabase Realtime
- Notifications - Mention alerts, comment notifications, and activity digests with bell icon UI
- Member Management - Invite members, manage roles, revoke invitations, with pending state tracking
- Document Comments - Inline threading, edit/delete with author permissions, comment count badges
- Activity Logs - Comprehensive workspace audit trail with event categorization and metadata
- Frontend: Next.js 14 (App Router), React 18, TypeScript, Tailwind CSS
- Backend: Supabase (PostgreSQL, Auth, Realtime), Server Actions for type-safe mutations
- Database: PostgreSQL with Row-Level Security (RLS) policies, full-text search vectors
- Deployment: Optimized for Vercel
- Node.js 18+ and npm
- Supabase account (free tier: supabase.com)
-
Clone and install dependencies:
git clone <repo> cd pulsedocs npm install
-
Create Supabase project:
- Sign up at supabase.com
- Create a new project and copy the project URL and anon key from Settings > API
-
Configure environment:
cp .env.local.example .env.local
Add your Supabase credentials:
NEXT_PUBLIC_SUPABASE_URL=your_project_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key -
Set up database schema:
Open your Supabase SQL Editor and run migrations in order:
supabase/migrations/001_initial_schema.sql- Creates 10 core tablessupabase/migrations/002_functions_and_rls.sql- Adds RLS policies and helper functions- (Optional)
supabase/seed/001_dev_seed.sql- Loads dev sample data
⚠️ Important: Keep "Enable Automatic RLS" disabled. PulseDocs uses explicit RLS policies. -
Run dev server:
npm run dev
src/
├── app/ # Next.js App Router (pages, layouts, server actions)
│ ├── actions/ # Server Actions (workspace, members, notifications, comments, activity)
│ ├── auth/ # Authentication flows (signin, signup, confirm)
│ ├── dashboard/ # Workspace switcher and creation
│ ├── workspace/[id]/ # Workspace shell and sub-routes
│ │ ├── channels/ # Channel creation and messaging
│ │ ├── docs/ # Document management and viewing
│ │ ├── search/ # Full-text search interface
│ │ ├── members/ # Member management and invitations
│ │ ├── activity/ # Audit log and event history
│ │ └── notifications/ # Notification center
│ └── page.tsx # Landing page
├── components/ # Reusable React components
│ ├── NotificationBell # Real-time notification dropdown
│ ├── InviteMembers # Member invitation form
│ ├── DocumentComments # Comment threading UI
│ ├── ActivityFeed # Audit trail display
│ └── ...
├── hooks/ # Custom React hooks
│ ├── useMessagesSubscription # Real-time message listener
│ ├── useChannelsSubscription # Real-time channel listener
│ ├── useDocumentsSubscription # Real-time document listener
│ ├── useDocumentCommentsSubscription # Real-time comment listener
│ └── useNotificationsSubscription # Real-time notification listener
├── lib/ # Utility modules
│ ├── supabase/ # Client and server Supabase factories
│ ├── auth-helpers.ts # Auth and permission utilities
│ ├── permissions.ts # Role-based permission checks
│ └── constants.ts # App-wide constants
├── types/
│ ├── database.ts # Database table types (10 tables)
│ └── index.ts # Re-exports
└── middleware.ts # Auth session middleware
supabase/
├── migrations/ # SQL schema and RLS policy definitions
└── seed/ # Development fixture data
public/ # Static assets
All mutations (create, update, delete) use Next.js Server Actions for:
- Type safety across network boundary
- Permission checks at data access layer
- Optimistic UI updates in client
- Reduced attack surface (sensitive logic server-side)
Client components use custom React hooks (useXxxSubscription) that:
- Fetch initial state with Server Actions
- Subscribe to
postgres_changesevents for live updates - Handle INSERT/UPDATE/DELETE events with optimistic state
- Auto-cleanup subscriptions on unmount
All table access enforced at database layer:
- Workspace members can only see content they have access to
- Role-based filters on channels, documents, messages
- No admin bypass - RLS applies to all authenticated users
- Server Actions verify role before mutations
Full-text search uses PostgreSQL:
tsvectorcolumns updated via triggers on document/message inserts- Search ranking by relevance and recency
- Instant filtering without external search service
# Type check
npm run type-check
# Build for production
npm run build
# Start production server
npm start- Phase 5: Direct messaging and video calls
- Phase 6: Collaborative editing and version history
- Phase 7: Integrations (Slack, Zapier, GitHub)
- Phase 8: Advanced analytics and insights
- Phase 9: Mobile apps (React Native)
- Phase 10: Enterprise features (SSO, audit logs export)
- Phase 11: AI-powered search and summarization
This is an actively developed project. Contributions welcome—open issues for bugs or feature requests.
MIT 8. Workspace Dashboard 9. Notifications & Comments 10. Polish & Responsive Design 11. Testing & Deployment
# Start dev server
npm run dev
# Type checking
npm run type-check
# Build for production
npm run build
# Start production server
npm startKey entities in Supabase PostgreSQL:
users- User accounts (managed by Supabase Auth)workspaces- Team/organization workspacesworkspace_members- Membership with role-based accesschannels- Team communication channelsmessages- Channel messagesdocuments- Knowledge base documentsfolders- Document organizationdocument_comments- Comments on documentsnotifications- User notificationsactivity_logs- Workspace activity history
Row-Level Security (RLS) policies ensure users only access data from workspaces they're members of.
The app is built for deployment on Vercel:
- Push your code to GitHub
- Connect the repository to Vercel
- Set environment variables in Vercel dashboard
- Vercel auto-deploys on push to main branch
Learn more about Vercel deployment
- Authentication and workspaces
- Channels with messaging
- Document management
- Basic search
- Notifications
- Dashboard overview
- Real-time collaborative editing
- Video/audio calls
- File attachments and uploads
- Advanced document versioning
- Team analytics
- Integrations (Slack, GitHub, etc.)
- Mobile native apps
This is a portfolio project, but contributions and suggestions are welcome!
MIT License - feel free to use this project as a reference or foundation for your own work.
For issues or questions:
- Check the implementation plan in
/memories/session/plan.md - Review Supabase documentation at supabase.com/docs
- Check Next.js documentation at nextjs.org/docs
Author: Built as a modern team collaboration SaaS MVP
Last Updated: March 25, 2026