Git Product home page Git Product logo

clack's Introduction

Clack is an open-source writing activity tracker with a Notion-style rich text editor.

Clack

Track your writing progress effortlessly
Learn more »

Introduction · Features · Tech Stack · Author

X (formerly Twitter) Follow GitHub License


Introduction

Clack syncs your writing activity from Notion and Google Docs, and comes with an AI assistant and a Notion-style WYSIWYG editor.

Features

  • Encrypted Notes
  • Google Integration
  • Notion Integration
  • Notion Widget
  • AI Writing Assistant
  • Notion-style WYSIWYG editor
  • 14 Heatmap Themes

Tech Stack

Author

Nuances

  • Always use finally in async worksloads if a UI state depends on it!!. Otherwise, the UI will forever be stuck and never update after the async work is done.

Cron Job

  • A vercel cronjob triggers at 0000hrs UTC to set the word-count reference.
  • A second cronjob from an EC2 instance triggers at 0530hrs IST or 0000hrs UTC for redundancy.

Encryption

Type : AES-256-CBC

  • The key should be 32 bytes or 256 bits in length!!
  • Initialization Vector should be 16 bytes or 128 bits.

Contribution logic

  • Update wordcount Ref if a document is removed.
  • Missing contributions are showed as blank on the canvas. No need to add blank contribution data to keep contributions array filled with consecutive dates.
  • Works only if the day comes before the current system date.
  • Non-consecutive dates after the current system date are not rendered.

⚠ Documents

  • Added specific error handling for Prisma's known request errors
  • Checked for error code 'P2002' to identify unique constraint violations
  • Checked if the 'url' field was involved in the constraint violation
  • Provided a custom error message for duplicate URL scenarios
  • Added checks for unauthorized request on another User's documents.

This change enhances the reliability and user experience of the addDocument function by ensuring that duplicate URLs are handled in a more informative and user-friendly manner.

Prisma

  • After schema changes run npx prisma migrate dev

  • Reset KV store by sending a GET request on the KV worker url with the param ?sayonara and a populated X-Custom-Auth-Key header.

  • User registers

  • Generate a new verification token using the email they used to register

  • Send verification token to that email

  • Inside the email send the route '/auth/new-verification'

  • Add that route to the public route

  • That route renders the new verification form

  • Inside that page, use the search params to fetch the token -->

clack's People

Contributors

phukon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

rudrodip

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.