MCPcopy
hub / github.com/taniarascia/takenote

github.com/taniarascia/takenote @v0.7.2 sqlite

repository ↗ · DeepWiki ↗ · release v0.7.2 ↗
355 symbols 885 edges 106 files 0 documented · 0%
README

Coverage Status

A free, open-source notes app for the web. (Demo only)

Note: TakeNote is available as a demo only. You can use the app at takenote.dev but the notes are only persisted in temporary local storage. However, you can download all notes as a zip.

Screenshot

TakeNote is a note-taking app for the web. You can use the demo app at takenote.dev. It is a static site without a database and does not sync your notes to the cloud. The notes are persisted temporarily in local storage, but you can download all notes in markdown format as a zip.

Hidden within the code is an alternate version that contain a Node/Express server and integration with GitHub. This version involves creating an OAuth application for GitHub and signing up to it with private repository permissions. Instead of backing up to local storage, your notes will back up to a private repository in your account called takenote-data. Due to the following reasons I'm choosing not to deploy or maintain this portion of the application:

  • I do not want to maintain a free app with users alongside my career and other commitments
  • I do not want to request private repository permissions from users
  • I do not want to maintain an active server
  • I do not want to worry about GitHub rate limiting from the server
  • There is no way to batch create many files from the GitHub API, leading to a suboptimal GitHub storage solution

However, I'm leaving the code available so you can feel free to host your own TakeNote instance or study the code for learning purposes. I do not provide support or guidance for these purposes.

TakeNote was created with TypeScript, React, Redux, Node, Express, Codemirror, Webpack, Jest, Cypress, Feather Icons, ESLint, and Mousetrap, among other awesome open-source software.

Features

  • Plain text notes
  • Markdown preview
  • Syntax highlighting
  • Keyboard shortcuts
  • Drag and drop
  • Favorites and categories
  • Multi-note actions
  • Multi-cursor editing
  • Light/dark theme
  • Search notes
  • Prettify notes
  • No WYSIWYG
  • No database
  • No tracking or analytics

Reviews

"I think the lack of extra crap is a feature." — Craig Lam

Demo Development

Clone and install.

git clone git@github.com:taniarascia/takenote
cd takenote
npm i

Run a development server.

npm run client

Full Application Development

In src/client/sagas/index.ts and src/client/components/LandingPage.tsx, change isDemo to false.

Pre-Installation

Before working on TakeNote locally, you must create a GitHub OAuth app for development.

Go to your GitHub profile settings, and click on Developer Settings.

Click the New OAuth App button.

  • Application name: TakeNote Development
  • Homepage URL: http://localhost:3000
  • Authorization callback URL: http://localhost:3000/api/auth/callback

Create a .env file in the root of the project, and add the app's client ID and secret.

CLIENT_ID=xxx
CLIENT_SECRET=xxxx

Change the URLs to port 5000 in production mode or Docker.

Installation

git clone git@github.com:taniarascia/takenote
cd takenote
npm i

Development mode

In the development environment, an Express server is running on port 5000 to handle all API calls, and a hot Webpack dev server is running on port 3000 for the React frontend. To run both of these servers concurrently, run the dev command.

npm run dev

Go to localhost:3000 to view the app.

API requests will be proxied to port 5000 automatically.

Production mode

In the production environment, the React app is built, and Express redirects all incoming requests to the dist directory on port 5000.

npm run build && npm run start

Go to localhost:5000 to view the app.

Run in Docker

Follow these instructions to build an image and run a container.

# Build Docker image
docker build --build-arg CLIENT_ID=xxx -t takenote:mytag .

# Run Docker container in port 5000
docker run \
-e CLIENT_ID=xxx \
-e CLIENT_SECRET=xxxx \
-e NODE_ENV=development \
-p 5000:5000 \
takenote:mytag

Go to localhost:5000 to view the app.

Note: You will see some errors during the installation phase, but these are simply warnings that unnecessary packages do not exist, since the Node Alpine base image is minimal.

Seed data

To seed the app with some test data, paste the contents of seed.js into your browser console.

Testing

Run unit and component/integration tests.

npm run test

If using Jest Runner in VSCode, add "jestrunner.configPath": "config/jest.config.js" to your settings

Run Cypress end-to-end tests.

# In one window, run the application in test mode
npm run dev:test

# In another window, run the end-to-end tests
npm run test:e2e:open

Contributing

TakeNote is an open source project, and contributions of any kind are welcome and appreciated. Open issues, bugs, and feature requests are all listed on the issues tab and labeled accordingly. Feel free to open bug tickets and make feature requests. Easy bugs and features will be tagged with the good first issue label.

View CONTRIBUTING.md to learn about the style guide, folder structure, scripts, and how to contribute.

Contributors

Thanks goes to these wonderful people:

Tania Rascia 💻 🤔 🐛 hankolsen 💻 🐛 ⚠️ Joseph Perez 💻 Paul 💻 ⚠️ Martin Rosenberg 💻 🐛 🚧 Melissa 💻 Jason Towle 💻
Mark Erikson 🤔 Alphonse Bouy 🐛 dave2kb 🎨 🤔 Devin McIntyre 💻 Jeffrey Fisher 🐛 Alex Dong 💻 Publicker 💻
Jakub Naskręski 💻 🐛 ⚠️ Benny O 💻 Justin Payne 💻 marshmallow 🚧 Jose Felix 💻 Nikolay Kirsh 💻 Mudassar Ali 💻
Nathan Bland

Extension points exported contracts — how you extend this code

NoteItem (Interface)
(no doc)
src/client/types/index.ts
RenderWithRouterOptions (Interface)
(no doc)
tests/unit/client/testHelpers.tsx
CategoryItem (Interface)
(no doc)
src/client/types/index.ts
GithubUser (Interface)
(no doc)
src/client/types/index.ts
AuthState (Interface)
(no doc)
src/client/types/index.ts
CategoryState (Interface)
(no doc)
src/client/types/index.ts

Core symbols most depended-on inside this repo

assertNoteListLengthEquals
called by 41
tests/e2e/utils/testNotesHelperUtils.ts
holdKeyAndClickNoteAtIndex
called by 40
tests/e2e/utils/testNotesHelperUtils.ts
createXUniqueNotes
called by 21
tests/e2e/utils/testNotesHelperUtils.ts
openNoteContextMenu
called by 19
tests/e2e/utils/testNotesHelperUtils.ts
clickCreateNewNote
called by 18
tests/e2e/utils/testNotesHelperUtils.ts
addCategory
called by 18
tests/e2e/utils/testCategoryHelperUtils.ts
clickTestID
called by 17
tests/e2e/utils/testHelperUtils.ts
typeNoteEditor
called by 15
tests/e2e/utils/testNotesHelperUtils.ts

Shape

Function 300
Interface 46
Enum 8
Method 1

Languages

TypeScript100%

Modules by API surface

tests/e2e/utils/testNotesHelperUtils.ts25 symbols
src/client/containers/ContextMenuOptions.tsx21 symbols
tests/e2e/utils/testSettingsUtils.ts18 symbols
src/client/utils/helpers.ts18 symbols
src/client/containers/KeyboardShortcuts.tsx18 symbols
tests/e2e/utils/testCategoryHelperUtils.ts17 symbols
src/client/containers/SettingsModal.tsx17 symbols
tests/e2e/utils/testHelperUtils.ts16 symbols
src/client/containers/NoteMenuBar.tsx14 symbols
src/client/types/index.ts11 symbols
src/client/containers/ContextMenu.tsx11 symbols
src/client/containers/AppSidebar.tsx11 symbols

Dependencies from manifests, versioned

@cypress/webpack-preprocessor5.4.8 · 1×
@reduxjs/toolkit1.4.0 · 1×
@testing-library/jest-dom5.11.4 · 1×
@testing-library/react11.1.0 · 1×
@types/axios0.14.0 · 1×
@types/codemirror0.0.98 · 1×
@types/compression1.7.0 · 1×
@types/cookie-parser1.4.2 · 1×
@types/cors2.8.8 · 1×
@types/express4.17.8 · 1×
@types/faker5.1.2 · 1×

For agents

$ claude mcp add takenote \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact