A real-time collaborative document editor with AI capabilities, built with Next.js 15 and LiveBlocks.
- Multi-user document editing with cursor tracking
- Presence awareness and user avatars
- Role-based access control (owner/editor)
- Document sharing and permissions management
- BlockNote-based WYSIWYG editor (v0.21.0)
- Real-time synchronization via YJS
- Dark/Light mode support
- Markdown support
- Multiple AI model support:
- OpenAI
- Anthropic
- Google AI
- Mistral
- Fireworks
- Document translation
- AI-powered chat interface
- Content generation and analysis
- Next.js 15.1.3
- React 19.0.0
- TypeScript 5.6.2
- TailwindCSS 3.4.16
- Framer Motion 11.13.3
- Clerk 6.0.2
- Firebase 11.0.0
- Firebase Admin 13.0.1
- LiveBlocks Suite 2.7.2
- YJS 13.6.19
- Radix UI
- Lucide React 0.469.0
- Sonner 1.7.1
- BlockNote Editor
node >= 18.0.0
npm >= 9.0.0
- Clone and install dependencies:
git clone https://github.com/yourusername/spacesapp.git
cd spacesapp
npm install
- Set up environment variables:
cp .env.example .env.local
Required environment variables:
# Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
CLERK_SECRET_KEY=
# LiveBlocks
NEXT_PUBLIC_LIVEBLOCKS_PUBLIC_KEY=
LIVEBLOCKS_SECRET_KEY=
# AI Models
OPENAI_API_KEY=
ANTHROPIC_API_KEY=
GOOGLE_GENERATIVE_AI_API_KEY=
MISTRAL_API_KEY=
FIREWORKS_API_KEY=
# Firebase
NEXT_PUBLIC_FIREBASE_APIKEY=
NEXT_PUBLIC_FIREBASE_AUTHDOMAIN=
NEXT_PUBLIC_FIREBASE_PROJECTID=
NEXT_PUBLIC_FIREBASE_STORAGEBUCKET=
NEXT_PUBLIC_FIREBASE_MESSAGINGSENDERID=
NEXT_PUBLIC_FIREBASE_APPID=
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
src/
├── app/ # Next.js app router
├── components/ # React components
├── lib/ # Utility functions
├── firebase/ # Firebase configuration
└── types/ # TypeScript definitions
- Document Editor: Real-time collaborative editor with cursor tracking
- User Management: Role-based access control and user permissions
- AI Integration: Multiple AI model support for document processing
- Authentication: Secure user authentication with Clerk
- Real-time Sync: LiveBlocks integration for collaboration
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License.