This is a Next.js project that serves as a document editor with support for rich text editing and collaborative features. It utilizes Clerk for authentication, Liveblocks for real-time collaboration, and Convex for serverless functions.
- Node.js (version 14 or later)
- npm or yarn
-
Clone the repository:
git clone https://github.com/TheCaptain1810/docs-tutorial.git cd docs-tutorial -
Install the dependencies:
npm install # or yarn install -
Set up environment variables. Create a
.env.localfile in the root directory and add the following:NEXT_PUBLIC_CLERK_FRONTEND_API=your_clerk_frontend_api NEXT_PUBLIC_CLERK_API_KEY=your_clerk_api_key NEXT_PUBLIC_CONVEX_URL=your_convex_url
Replace the placeholders with your actual Clerk and Convex API keys.
To start the development server, run:
npm run dev
# or
yarn devOpen http://localhost:3000 in your browser to see the application.
- Rich Text Editing: Built using Tiptap, allowing users to format text, insert images, and create tables.
- Real-time Collaboration: Users can edit documents simultaneously with Liveblocks integration.
- Document Management: Create, edit, and delete documents with a user-friendly interface.
- Templates: Start new documents from predefined templates.
- Authentication: Secure user authentication using Clerk.
src/app: Contains the main application files, including pages and components.src/components: Reusable UI components.src/store: State management using hooks.src/constants: Constants and configuration files.src/extensions: Custom Tiptap extensions for enhanced functionality.convex: Server-side functions and API definitions.
- Click on "Start a new document" to choose a template or create a blank document.
- Use the toolbar to format text, insert images, or create tables.
- Your changes will be saved automatically.
Invite other users to edit the document simultaneously. Changes made by any user will be reflected in real-time for all collaborators.
To deploy your application, you can use platforms like Vercel or Netlify. Follow their documentation for deploying Next.js applications.
Contributions are welcome! Please open an issue or submit a pull request for any enhancements or bug fixes.
- Next.js - The React framework for production.
- Clerk - Authentication for your applications.
- Liveblocks - Real-time collaboration made easy.
- Convex - Serverless functions for your applications.