Skip to content
/ notion Public

Tried to make the backend for the simplest form of Notion Application. With Basic features. Will extend it with time.

Notifications You must be signed in to change notification settings

pratil/notion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOTION

Notion is an awesome productivity software, please do check it out.

Contents

  1. Problem Statement
  2. Functional Requirements
  3. Extended Requirements
  4. Data Models
    1. Entities
    2. Relationships
    3. Attributes
  5. Tasks

Problem Statement

Build Notion application i.e. all-in-one workspace for notes, docs, wikis, projects, and team collaboration.


Functional Requirements

  • Users can create/modify/delete multiple pages.
  • A page can have multiple nesting, i.e. a page can contain multiple pages.
  • User can mark any page as favourite.
  • User can create/modify/delete a block of information.
  • Every page consists of one or more blocks of information.
  • Blocks are stored in order, which can be reordered at any time.
  • Blocks can be of different types:
    • Text Block: Contains plain texts.
    • Heading Block: Contains plain text which is displayed bold and big, there can be different sub-type of headings based on the size of the heading.
    • Todo Block: Contains plain text with a checkbox.
    • List Block: Contains items list, can be ordered or unordered list.
    • Page Link Block Contains the link of the child page.
  • Fetch all the pages for a user.
  • Fetch all the blocks for a page.

Extended Requirements

  • Blocks can have nesting.
  • Toggle List BLock
  • Search the pages based on the page name.
  • Search the pages based on any of the content inside the page.
  • Users add a comment to a block.
  • Users to be able to share pages with other users.
    • Shared pages maybe hai different access, like read only, comment only, etc.
  • Page can be shared as a template to other users, i.e. making replica of the page with the new user as the owner.

Data Models

1. Entities

  • User
  • Page
  • Block
  • Comment (Future Scope)
  • PageAccess (Future Scope)

2. Relationships

  • User is independent entity
  • Page is dependent on User & the Page itself
    • User (1 : N) Pages
    • Page (1 : N) Pages (parent and child pages)
  • Block is dependent on Page
    • Page (1 : N) Block
  • Comment is dependent on Block & User
    • User (1 : N) Comments
    • Block (1 : N) Comments
  • PageAccess is dependent on Page & User
    • User (1 : N) PageAccess
    • Page (1 : N) PageAccess

3. Attributes

  • Users
    • id (auto generated)
    • created_at (auto generated)
    • updated_at (auto generated)
    • First Name
    • Middle Name
    • Last Name
    • Preferred Name
    • Email Id
    • Password
  • Pages
    • id (auto generated)
    • created_at (auto generated)
    • updated_at (auto generated)
    • title
    • is_favourite
    • user_id (foreign key)
    • parent_page_id (foreign key)
  • Blocks
    • id (auto generated)
    • created_at (auto generated)
    • updated_at (auto generated)
    • block_type
    • value
    • order
    • page_id (foreign key)
    • Some Extra info depending on the type of block
  • Comments
    • id (auto generated)
    • created_at (auto generated)
    • updated_at (auto generated)
    • block_id (foreign key)
    • user_id (foreign key)
    • comment
  • PageAccess
    • id (auto generated)
    • created_at (auto generated)
    • updated_at (auto generated)
    • page_id (foreign key)
    • user_id (foreign key)
    • access_type

Tasks

  • Base Response
    • Base Rest Response
    • Handle Exception Response
  • Data Models (Entity, Repository, Events, etc.)
    • Page
    • Block
    • User
    • Comment
    • PageAccess
  • CRUD Operations (Controller, Service, Model to Dto Conversion, Exception Handling, etc.)
    • Page
    • Block
    • User
    • Comment
    • PageAccess
  • Documenting the whole project

About

Tried to make the backend for the simplest form of Notion Application. With Basic features. Will extend it with time.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages