Skip to content
Projetos

sanidhyy/google-docs-clone

Ver no GitHub

Sobre

Full-stack Realtime Google Docs Clone using Next.js 15 and Convex.

Desenvolvimento web e de aplicativos

Como estes números são medidos

Crescimento medido de estrelas

em 24 h
0
em 7 dias
+1
em 15 dias
+1
em 1 mês
Coletando histórico

Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.

README.md

Original

Full-stack Realtime Google Docs Clone using Next.js 15 and Convex

Full-stack Realtime Google Docs Clone using Next.js 15 and Convex

Ask Me Anything! GitHub license Maintenance GitHub branches Github commits GitHub issues GitHub pull requests Vercel status

:notebook_with_decorative_cover: Table of Contents

:bangbang: Folder Structure

Here is the folder structure of this app.

google-docs-clone/
  |- convex/
    |-- _generated/
    |-- .env.example
    |-- auth.config.ts
    |-- documents.ts
    |-- environment.d.ts
    |-- schema.ts
  |- public/
  |- src/
    |-- app/
      |--- (auth)/
      |--- (main)/
      |--- api/
      |--- apple-icon.png
      |--- error.tsx
      |--- favicon.ico
      |--- globals.css
      |--- icon1.png
      |--- icon2.png
      |--- layout.tsx
      |--- not-found.tsx
    |-- components/
      |--- ui/
      |--- auth-gate.tsx
      |--- convex-client-provider.tsx
      |--- fullscreen-loader.tsx
      |--- remove-dialog.tsx
      |--- rename-dialog.tsx
    |-- config/
      |--- editor.ts
      |--- index.ts
    |-- constants/
      |--- templates.ts
    |-- extensions/
      |--- font-size.ts
      |--- line-height.ts
    |-- hooks/
      |--- use-debounce.ts
      |--- use-search-param.ts
    |-- lib/
      |--- utils.ts
    |-- store/
      |--- use-editor-store.ts
    |-- middleware.ts
  |- .env.example
  |- .env/.env.local
  |- .gitignore
  |- .prettierignore
  |- .prettierrc.json
  |- components.json
  |- convex.json
  |- environment.d.ts
  |- eslint.config.mjs
  |- liveblocks.config.ts
  |- next.config.ts
  |- package.json
  |- pnpm-lock.yaml
  |- pnpm-workspace.yaml
  |- postcss.config.mjs
  |- tailwind.config.ts
  |- tsconfig.json
  |- vercel.ts

:toolbox: Getting Started

  1. Make sure Git and NodeJS is installed.
  2. Clone this repository to your local computer.
  3. Create .env.local file in root and convex directory.
  4. Contents of .env.local:
# disabled telemetry
DO_NOT_TRACK="1"
NEXT_TELEMETRY_DISABLED="1"
CLERK_TELEMETRY_DISABLED="1"

# app base url
NEXT_PUBLIC_APP_BASE_URL="http://localhost:3000"

# convex deployment & url
CONVEX_DEPLOYMENT="dev:<deployment-id>" # team: <team-id>, project: <project-id>
NEXT_PUBLIC_CONVEX_URL="https://<deployment-id>.convex.cloud"
NEXT_PUBLIC_CONVEX_SITE_URL="https://<deployment-id>.convex.site"

# clerk auth keys
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY="pk_test_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
CLERK_SECRET_KEY="sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

# clerk redirect urls
NEXT_PUBLIC_CLERK_SIGN_IN_URL="/sign-in"
NEXT_PUBLIC_CLERK_SIGN_UP_URL="/sign-up"
NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL="/"
NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL="/"

# liveblocks key
LIVEBLOCKS_SECRET_KEY="sk_dev_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  1. Contents of convex/.env.local:
# clerk issuer url (go to your clerk dashboard > JWT Templates > New template > Convex > Save and copy your Issuer URL)
CLERK_ISSUER_URL=https://example-id.clerk.accounts.dev

6. App Base URL

Set the NEXT_PUBLIC_APP_BASE_URL to http://localhost:3000 where your app will be running locally or in production.

7. Convex Deployment

  • Visit the Convex website: https://convex.dev
  • Log in to your Convex account or sign up if you don't have one.
  • Once logged in, navigate to the "Deployments" section.
  • Create a new deployment or select an existing one.
  • Replace <deployment-name>, <team-name>, and <project-name> in the .env.local file with your Convex deployment details.
  • In the Convex dashboard, find the public URL associated with your deployment.
  • Replace <your-convex-url> in the .env.local file with your Convex public URL.

8. Clerk Authentication Keys

  • Visit the Clerk dashboard: https://clerk.dev
  • Log in to your Clerk account or sign up if you don't have one.
  • Go to the "Projects" section and select your project.
  • Navigate to the "API Keys" tab.
  • Copy the "Publishable Key" and replace <your-clerk-publishable-key> in the .env.local file with the copied key.
  • Copy the "Secret Key" and replace <your-clerk-secret-key> in the .env.local file with the copied key.
  • Go to your Clerk dashboard > JWT Templates > New template > Convex.
  • In the Claims section add "organization_id": "{{org.id}}" along with the existing json values.
  • Click on save and copy the Issuer url.
  • Replace <your-clerk-issuer-url> with the url that you copied.
  • Also, go to Convex dashboard > Settings > Environment Variables > Add CLERK_ISSUER_URL variable with value that you copied.

9. Liveblocks API Keys

  • Visit the Liveblocks website > dashboard.
  • Navigate to API settings or keys section.
  • Generate or locate your API secret.
  • Set LIVEBLOCKS_SECRET_KEY in the .env file according to the obtained information.
  1. Install Project Dependencies using npm install --legacy-peer-deps or yarn install --legacy-peer-deps or bun install --legacy-peer-deps.

  2. Now app is fully configured 👍 and you can start using this app using either one of npm run dev or yarn dev or bun dev.

NOTE: Please make sure to keep your API keys and configuration values secure and do not expose them publicly.

:raising_hand: Need Help?

If you run into issues during installation or setup:

:camera: Screenshots

Modern UI/UX

Realtime Tiptap Editor

Mentions, Replies and Reactions

:gear: Tech Stack

React JS Next JS Typescript Tailwind CSS Vercel

:wrench: Stats

Stats for Docs

:raised_hands: Contribute

You might encounter some bugs while using this app. You are more than welcome to contribute. Just submit changes via pull request and I will review them before merging. Make sure you follow community guidelines.

:gem: Acknowledgements

Useful resources and dependencies that are used in Docs.

:coffee: Buy Me a Coffee

:rocket: Follow Me

Follow Me Tweet about this project

:books: Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

:page_with_curl: Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out Next.js deployment documentation for more details.

:star: Give A Star

You can also give this repository a star to show more people and they can use this repository.

:star2: Star History


(back to top)

Explore projetos relacionados

Carregando…