Giter Site home page Giter Site logo

notion-clone-tutorial's Introduction

Fullstack Notion Clone: Next.js 13, React, Convex, Tailwind | Full Course 2023

Copy of Copy of Copy of Fullstack Twitter Clone (6)

This is a repository for Fullstack Notion Clone: Next.js 13, React, Convex, Tailwind | Full Course 2023

VIDEO TUTORIAL

Key Features:

  • Real-time database ๐Ÿ”—
  • Notion-style editor ๐Ÿ“
  • Light and Dark mode ๐ŸŒ“
  • Infinite children documents ๐ŸŒฒ
  • Trash can & soft delete ๐Ÿ—‘๏ธ
  • Authentication ๐Ÿ”
  • File upload
  • File deletion
  • File replacement
  • Icons for each document (changes in real-time) ๐ŸŒ 
  • Expandable sidebar โžก๏ธ๐Ÿ”€โฌ…๏ธ
  • Full mobile responsiveness ๐Ÿ“ฑ
  • Publish your note to the web ๐ŸŒ
  • Fully collapsable sidebar โ†•๏ธ
  • Landing page ๐Ÿ›ฌ
  • Cover image of each document ๐Ÿ–ผ๏ธ
  • Recover deleted files ๐Ÿ”„๐Ÿ“„

Prerequisites

Node version 18.x.x

Cloning the repository

git clone https://github.com/AntonioErdeljac/notion-clone-tutorial.git

Install packages

npm i

Setup .env file

# Deployment used by `npx convex dev`
CONVEX_DEPLOYMENT=
NEXT_PUBLIC_CONVEX_URL=

NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
CLERK_SECRET_KEY=

EDGE_STORE_ACCESS_KEY=
EDGE_STORE_SECRET_KEY=

Setup Convex

npx convex dev

Start the app

npm run dev

notion-clone-tutorial's People

Contributors

antonioerdeljac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

notion-clone-tutorial's Issues

dark:hidden & dark:block not working properly

Hey there, while toggling from light to dark theme and from large to medium screen, not getting proper ui look.
seems like dark:hidden & dark:block is not working, how can I resolve these issue please help..

image image

api.documents.getById: missing the required field `id` issue

Hi there, i have encountered this issue.

Unhandled Runtime Error
Error: [CONVEX Q(documents:getById)] [Request ID: 81d15a7f7fb88b35] Server Error
ArgumentValidationError: Object is missing the required field `id`. Consider wrapping the field validator in `v.optional(...)` if this is expected.

Object: {}
Validator: v.object({id: v.id("documents")})


  Called by client

app/(main)/(routes)/documents/[documentsId]/page.tsx (24:28) @ api

  22 | const Editor = useMemo(() => dynamic(() => import("@/components/editor"), { ssr: false }) ,[]);
  23 | 
> 24 | const document = useQuery(api.documents.getById, {
     |                          ^
  25 |   id: params.id
  26 | });
  27 | 

Does anyone could help with that? really appreciate that!

Convex Login Fail

When Login from comand-line. Browser window day successful but terminal fail with error
Error: Socket connection timeout
Please help me tried to find online docs but didn't find any solution. Tried to login multiple times.

Convex useConvexAuth

Not sure why Convex UseConvexAuth is not working for me. isAuthenticated is always false despite logging in and Clerk says i'm logged in. could be a convex problem..tbh i just want to follow the tutorial without the hassle.

this is my solution to overcome the problem so far..


import { SignInButton, SignUpButton, UserButton, useAuth } from "@clerk/clerk-react";
import Link from "next/link";

import { useScrollTop } from "@/hooks/use-scroll-top";
import { ModeToggle } from "@/components/mode-toggle";
import { Button } from "@/components/ui/button";
import { Spinner } from "@/components/spinner";
import { cn } from "@/lib/utils";

import Logo from "./logo";

export const NavBar = () => {
  const { isSignedIn, isLoaded } = useAuth();
  const scrolled = useScrollTop();

  return (
    <div
      className={cn(
        "z-50 bg-background dark:bg-[#1F1F1F] fixed top-0 flex items-center w-full p-6",
        scrolled && "border-b shadow-sm"
      )}
    >
      <Logo />
      <div className="md:ml-auto md:justify-end justify-between w-full flex items-center gap-x-2">
        {!isLoaded && <Spinner />}
        {!isSignedIn && isLoaded && (
          <>
            <SignInButton mode="modal">
              <Button variant="ghost" size="sm">
                Log in
              </Button>
            </SignInButton>
            <SignUpButton mode="modal">
              <Button size="sm">Get Jotion free</Button>
            </SignUpButton>
          </>
        )}
        {isSignedIn && (
          <>
            <Button variant="ghost" size="sm" asChild>
              <Link href="/documents">Enter Jotion</Link>
            </Button>
            <UserButton afterSignOutUrl="/" />
          </>
        )}
        <ModeToggle />
      </div>
    </div>
  );
};

export default NavBar;

Un-archive will bring back the dead

I believe un-archiving a parent will un-archive children that had been archived before the parent was. E.g.:

  • Add a document P
  • Add a child document C
  • Archive document C - maybe we didn't mean to create it.
  • Later on, you accidentally archive P
  • Un-archive P
  • Now C has been restored too, maybe not what you want

onEditorContentChange initialization option is deprecated

const editor: BlockNoteEditor = useBlockNote({ editable, initialContent: initialContent ? (JSON.parse(initialContent) as PartialBlock[]) : undefined, onEditorContentChange: (editor) => { onChange(JSON.stringify(editor.topLevelBlocks, null, 2)); }, uploadFile: handleUpload, });

Error: onEditorContentChange initialization option is deprecated, use , the useEditorChange(...) hook, or editor.onChange(...)

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.