https://github.com/junongx/justjot-backend
Backend for JustJot, a keyboard-first note-taking app
https://github.com/junongx/justjot-backend
backend javascript pocketbase
Last synced: 12 months ago
JSON representation
Backend for JustJot, a keyboard-first note-taking app
- Host: GitHub
- URL: https://github.com/junongx/justjot-backend
- Owner: JunoNgx
- License: mit
- Created: 2024-03-10T04:41:27.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-27T14:21:28.000Z (about 1 year ago)
- Last Synced: 2025-06-01T20:31:12.841Z (about 1 year ago)
- Topics: backend, javascript, pocketbase
- Language: JavaScript
- Homepage: https://justjot.app
- Size: 155 KB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
# JustJot (backend)
A minimalist keyboard-first note-taking Progressive Web App, tailored for fast operations.
Frontend repository [here](https://github.com/JunoNgx/justjot-frontend).
## Deployment status
[](https://github.com/JunoNgx/justjot-backend/actions/workflows/main.yml)
This production deployment of JustJot is provided by [PocketHost](https://pockethost.io/).
## Overview
[JustJot](https://justjot.app/) is powered by [PocketBase](https://pocketbase.io/). This repository is a set of JS hooks for PocketBase, catered to specific business logic beyond what PocketBase provided out of the box.
It should be noted that PocketBase's JS hooks are powered by [GoJa](https://github.com/dop251/goja), a VM implementation of JavaScript in Go, which come with a lot of caveats.
## Features
With CRUD and authentication logic provided by PocketBase out of the box, the logic in this repository merely serves as extra fine-tuning and data processing to enrich the user data, such as item type classification, meta-data fetching, and management of test account.
## Schemas and migrations
Related [PocketBase documentation](https://pocketbase.io/docs/js-migrations/).
Migration scripts are stored in the `pb_migrations` directory, and is auto-generated from changes made in the schema in the admin UI (as per default settings).
The directory `_misc` stores the schema of the application at the release candidate milestone (in mid-April 2024). The migration scripts in this repository handles changes in the database schema from this point onwards.
For development purposes, to undo the previous migrations (aka, "migrate down"), run `./pocketbase migrate down [n]` (without brackets), with `n` being the number of migrations.
## Branches
An alternative version of the logics implemented in this repository can be found in the `go` branch (incomplete and not up-to-date), where they are implemented in native Go, with PocketBase as a Go framework, compiling to custom binary executable.
## Running locally
This repository requries a PocketBase executable. JustJot was first developed with PocketBase version `0.22.7`.
With PocketBase executable placed in this repository (which is already `gitignore`'ed):
```
./pocketbase serve
```
## Environment varible
This application does not require any environment variables for runtime.
However, there are CI/CD pipelines via GitHub actions that would deploy the JS hooks into the PocketHost instance, whose secret variables are to be managed on GitHub:
* FTP_PASSWORD
* FTP_SERVER
* FTP_USERNAME
## Schema
The database schema used by JustJot is stored in the directory `_misc`.
## Feature roadmap
* Refactor to TypeScript.
* Unit and integration tests.
## Contribution
For bug reporting, issues, and design suggestions, please open new issues.
Due to the highly personal nature of this, I am selective about what to be developed and merged into production. Please discuss with me prior to investing non-trivial efforts.