Skip to content

wafiqpuyol/VOID

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

48 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“ VOID | Real-time Collaborative Workspace

VOID Banner

TypeScript Next.js 13 Supabase TailwindCSS Stripe

๐Ÿš€ Overview

VOID is a production-ready collaborative workspace platform inspired by Notion, built with a modern tech stack focusing on real-time collaboration. Experience seamless multi-user editing with real-time cursors, text selection, and presence indicators.

โšก Core Technologies

  • Frontend: Next.js 13 (App Router), React, TypeScript, TailwindCSS
  • Backend: Supabase, WebSockets, Drizzle ORM
  • Real-time: Custom WebSocket implementation for cursors, selection, and presence
  • Authentication: Custom auth flow with 2FA email invitations
  • Payments: Stripe integration with customer portal
  • Database: PostgreSQL with row-level security policies

๐Ÿ”ฅ Key Features

Collaborative Editing

  • Real-time cursor tracking shows exactly where teammates are working
  • Text selection visualization across multiple users
  • Presence indicators show who's online and their current location
  • Custom rich text editor with collaborative editing

Enterprise-Grade Security

  • Row-level security policies with Supabase
  • Custom authentication system
  • Email-based 2FA for workspace invitations

Seamless User Experience

  • Optimistic UI updates for zero-lag feel
  • Custom emoji picker for expressive communication
  • Light/dark mode with system preference detection
  • Trash functionality with restore options
  • Responsive design works across all devices

Monetization Ready

  • Stripe integration for subscription management
  • Custom pricing plans with feature restrictions
  • User-friendly payment portal

๐Ÿ–ฅ๏ธ Architecture Overview

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                 โ”‚     โ”‚                  โ”‚     โ”‚                 โ”‚
โ”‚  Next.js 13     โ”‚โ—„โ”€โ”€โ”€โ”€โ”ค  WebSocket       โ”‚โ—„โ”€โ”€โ”€โ”€โ”ค  Supabase       โ”‚
โ”‚  Frontend       โ”‚     โ”‚  Server          โ”‚     โ”‚  PostgreSQL     โ”‚
โ”‚                 โ”‚     โ”‚                  โ”‚     โ”‚                 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚                                               โ–ฒ
         โ”‚                                               โ”‚
         โ”‚                                               โ”‚
         โ–ผ                                               โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                             โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                 โ”‚                             โ”‚                 โ”‚
โ”‚  Stripe         โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค  Drizzle ORM    โ”‚
โ”‚  Payments       โ”‚                             โ”‚  Layer          โ”‚
โ”‚                 โ”‚                             โ”‚                 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                             โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“ธ Screenshots

Real-time collaboration Document editing
Dashboard view Payment portal

๐Ÿ› ๏ธ Technical Highlights

Real-time Implementation

Our custom WebSocket implementation handles differential synchronization between clients with minimal bandwidth usage and optimistic UI updates.

// Example of real-time cursor tracking implementation
const updateCursorPosition = useCallback(
  throttle((position: CursorPosition) => {
    if (!socket || !user) return;
    
    // Send position only if it changed significantly
    if (Math.abs(position.x - lastPosition.current.x) > 5 || 
        Math.abs(position.y - lastPosition.current.y) > 5) {
      socket.emit('cursor:update', {
        position,
        userId: user.id,
        documentId: currentDocument.id
      });
      lastPosition.current = position;
    }
  }, 50),
  [socket, user, currentDocument]
);

Row-Level Security

Supabase RLS policies ensure users can only access authorized content:

-- Example of row-level security policy
CREATE POLICY "Users can only view their own documents" ON documents
  FOR SELECT USING (
    auth.uid() IN (
      SELECT user_id FROM workspace_users
      WHERE workspace_id = documents.workspace_id
    )
  );

Performance Optimizations

  • Server Components for reduced client JS
  • Selective hydration for interactive elements
  • Chunked data loading with Suspense boundaries
  • Efficient WebSocket message batching

๐Ÿš€ Getting Started

Prerequisites

  • Node.js 18+
  • PostgreSQL database
  • Stripe account

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/VOID.git
    cd VOID
  2. Install dependencies

    npm install
  3. Configure environment variables

    cp .env.example .env.local
    # Fill in your environment variables
  4. Set up the database

    npm run db:migrate
  5. Start the development server

    npm run dev

๐Ÿ“š Documentation

For detailed documentation on the architecture and implementation details:

๐Ÿงช Testing

# Run unit tests
npm run test

# Run end-to-end tests
npm run test:e2e

# Run integration tests
npm run test:integration

๐Ÿ”ฎ Future Roadmap

  • AI-powered content suggestions
  • Real-time commenting system
  • Advanced permissions and roles
  • Custom templates marketplace
  • Mobile applications
  • API for third-party integrations

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgements

  • Vercel for hosting
  • Supabase for database and authentication
  • Stripe for payment processing
  • The amazing open-source community for their tools and inspiration

Built with โค๏ธ by YourName

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors