Skip to content

frckbrice/collaborative-platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Real-Time Collaborative Platform

Collaborative Platform

A modern, real-time collaborative platform built with cutting-edge technologies for seamless team collaboration.

Next.js TypeScript Supabase Tailwind CSS

License: MIT PRs Welcome


πŸ“– Table of Contents


✨ Features

🎯 Core Functionality

  • Real-time Collaboration: Multiple users can edit documents simultaneously with live cursors and presence tracking
  • Workspace Management: Create and organize workspaces with folders and files
  • Authentication: Secure user authentication with Supabase Auth
  • File Management: Create, edit, and organize files and folders
  • Banner Upload: Add custom banners to workspaces, folders, and files
  • Emoji Picker: Customize icons for workspaces, folders, and files
  • Subscription Management: Premium features with Stripe integration

🎨 User Experience

  • Dark Mode Support: Full dark mode support for all components including Quill editor
  • Responsive Design: Works seamlessly on desktop and mobile devices
  • Inline Editing: Rename workspaces, folders, and files directly in the interface
  • Real-time Updates: Changes appear instantly for all collaborators
  • Profile Management: Upload and manage profile pictures

πŸ”§ Developer Experience

  • TypeScript: Full TypeScript support for type safety
  • ESLint: Code quality and consistency
  • CI/CD Pipeline: Automated testing, building, and deployment
  • Comprehensive Documentation: Detailed setup and troubleshooting guides

πŸ–ΌοΈ Screenshots

Landing Page

πŸ“ Real-time Editor

Real-time Editor Collaboration

πŸ‘₯ Collaboration

Collaboration Collaboration Collaboration

Collaboration Collaboration

🎨 Dark Mode

Dark Mode Dark Mode

πŸ“ Workspace Management

Workspace Management Collaboration

πŸ” Authentication

Authentication

βš™οΈ Settings & Profile

Settings

πŸ“± Mobile Responsive

Mobile


πŸ› οΈ Tech Stack

Frontend

Backend & Database

  • Supabase - Backend as a service
    • PostgreSQL database
    • Real-time subscriptions
    • Authentication
    • Storage
  • Drizzle ORM - Type-safe database queries

Real-time Features

Development & Deployment

Payment Integration


πŸš€ Getting Started

Prerequisites

  • Node.js 18rn package manager
  • Supabase account
  • Stripe account (for payments)

Quick Start

  1. Clone the repository
git clone https://github.com/frckbrice/collaborative-platform.git
cd collaborative-platform
  1. Install dependencies
yarn install
  1. Set up environment variables
cp env.example .env.local
  1. Configure your environment variables in .env.local

  2. Start the development server

yarn dev

6 Open [http://localhost:3000](http://localhost:3000 in your browser


πŸ“¦ Installation

Step 1: Environment Setup

Create a .env.local file with the following variables:

# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key

# Database
NEXT_PUBLIC_DATABASE_URL=postgres://postgres:postgres@localhost:54322postgres

# Stripe Configuration (for payments)
STRIPE_SECRET_KEY=your_stripe_secret_key
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret

# JWT Secret (must match the one in docker-compose.yml)
JWT_SECRET=your-super-secret-jwt-token-with-at-least-32racters-long

Step2: Database Setup1 Set up your Supabase project

  1. Run the database migrations:
supabase db reset
  1. Set up storage buckets and policies as described in the setup documentation

Step 3: Start Development

# Install dependencies
yarn install

# Start development server
yarn dev

# Run linting
yarn lint

# Run tests
yarn test

# Build for production
yarn build

πŸ”§ Configuration

Supabase Setup

  1. Create a new Supabase project
  2. Enable the following services:
    • Authentication
    • Database
    • Storage
    • Realtime
  3. Configure authentication providers4up storage buckets for file uploads

Stripe Setup

1e a Stripe account 2. Get your API keys from the dashboard 3. Configure webhooks for payment events 4. Set up subscription products

Local Development

For local development with Supabase:

# Install Supabase CLI
npm install -g supabase

# Start local Supabase
supabase start

# Reset database
supabase db reset

πŸ—οΈ Project Structure

src/
β”œβ”€β”€ app/                    # Next.js15app router
β”‚   β”œβ”€β”€ (auth)/            # Authentication pages
β”‚   β”œβ”€β”€ (main)/            # Main application pages
β”‚   β”œβ”€β”€ (site)/            # Landing page
β”‚   └── api/               # API routes
β”œβ”€β”€ components/             # React components
β”‚   β”œβ”€β”€ features/          # Feature-specific components
β”‚   β”‚   β”œβ”€β”€ auth/          # Authentication components
β”‚   β”‚   β”œβ”€β”€ main/          # Main app components
β”‚   β”‚   └── settings/      # Settings components
β”‚   β”œβ”€β”€ global-components/ # Shared components
β”‚   └── ui/               # UI components (shadcn/ui)
β”œβ”€β”€ lib/                   # Utilities and configurations
β”‚   β”œβ”€β”€ providers/         # React context providers
β”‚   β”œβ”€β”€ supabase/          # Supabase configuration
β”‚   └── stripe/            # Stripe configuration
└── utils/                 # Helper functions

πŸ”„ CI/CD Pipeline

The project includes automated CI/CD workflows:

CI Workflow (.github/workflows/ci.yml)

  • Linting and Type Checking: Ensures code quality
  • Testing: Runs test suite
  • Building: Builds the application
  • Security Scanning: Checks for vulnerabilities
  • Build Artifacts: Uploads build files

Deployment Workflow (.github/workflows/deploy.yml)

  • Automatic Deployment: Deploys to Vercel on push
  • Environment Management: Separate staging and production environments
  • Branch-based Deployment:
    • main branch β†’ Production
    • develop branch β†’ Preview

🀝 Contributing

We welcome contributions! This project is free for collaboration.

How to Contribute

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes4ests if applicable**
  4. Commit your changes: git commit -m 'Add amazing feature'
  5. Push to the branch: git push origin feature/amazing-feature 7mit a pull request**

Development Guidelines

  • Follow the existing code style
  • Add tests for new features
  • Update documentation as needed
  • Ensure all CI checks pass
  • Use TypeScript for all new code
  • Follow the project's commit message conventions

Code of Conduct

  • Be respectful and inclusive
  • Help others learn and grow
  • Provide constructive feedback
  • Follow the project's coding standards

πŸ“š Documentation

Common Issues

  • Supabase CLI Issues: Configuration and setup problems
  • Docker Container Problems: Container conflicts and port issues
  • Email Configuration: Mailpit setup and SMTP configuration
  • Realtime Collaboration: Connection and presence tracking issues
  • Authentication Issues: User management and JWT problems
  • File Upload Problems: Profile pictures and storage issues

πŸš€ Deployment

Vercel (Recommended)

  1. Connect your GitHub repository to Vercel
  2. Configure environment variables in Vercel dashboard
  3. Deploy automatically on push to main branch

Manual Deployment

# Build the application
yarn build

# Start the production server
yarn start

Environment Variables for Production

Make sure to set all required environment variables in your deployment platform:

  • NEXT_PUBLIC_SUPABASE_URL
  • NEXT_PUBLIC_SUPABASE_ANON_KEY
  • SUPABASE_SERVICE_ROLE_KEY
  • STRIPE_SECRET_KEY
  • NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY
  • STRIPE_WEBHOOK_SECRET
  • JWT_SECRET

πŸ“„ License

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


πŸ™ Acknowledgments


GitHub stars GitHub forks GitHub issues GitHub pull requests

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy