Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
47d74bf
Code style change
tecc Aug 7, 2022
9ef5eda
Slightly modified login page
tecc Aug 7, 2022
3b354bc
Add some editor gitignores
tecc Aug 7, 2022
ff2c606
The Big Reformat
tecc Aug 7, 2022
2a71756
Standardise UI font
tecc Aug 7, 2022
0db5c65
#85: Make exports keep directory structure
tecc Aug 8, 2022
fbfa9a9
#85: Slightly more organised importing
tecc Aug 9, 2022
81426ae
[fix] Emoji match sometimes applied on null titles
tecc Aug 9, 2022
095e6e0
change(icon-button): Add Refresh icon
tecc Aug 12, 2022
36436c2
change(import): Some minor changes in import.ts
tecc Aug 12, 2022
147473e
feat(config): Add yaml configuration support
tecc Aug 12, 2022
5d6d5f3
change(docker): Add node_modules to .dockerignore
tecc Aug 12, 2022
892c165
change(eslint)[style]: More style changing
tecc Aug 12, 2022
7926404
refactor: Use consistent async/await in libs/server/tree.ts
tecc Aug 12, 2022
7a27842
fix(docker): Dockerfile changes
tecc Aug 12, 2022
94fb166
change(next): Next config now has a wrapper for PWA config
tecc Aug 12, 2022
24d893f
fix(config): Replaced usages of getEnv with new config system
tecc Aug 12, 2022
39b6864
perf: Removed seemingly unnecessary deep copies of trees
tecc Aug 14, 2022
8295bbe
fix(types): Fixed typing errors in libs/server/config.ts
tecc Aug 14, 2022
5aee1e0
change(auth): Add authentication utility file
tecc Aug 14, 2022
bcc7321
change(auth): Login endpoint now uses auth utilities instead of direc…
tecc Aug 14, 2022
e6ca53f
fix(config): Replaced one more usage of getEnv with new config system
tecc Aug 14, 2022
fd17635
fix(config): Config loader now accepting baseUrl from file config
tecc Aug 14, 2022
d2578ec
change(package): Use npm-run-all's `run-s` command instead of NPM dir…
tecc Sep 1, 2022
a2b56d5
change(package): Install `js-yaml` dependency
tecc Sep 1, 2022
ef4dc1d
change(package): Update project version and information
tecc Sep 1, 2022
ec6bc16
change(settings): Settings footer now displays fork information
tecc Sep 1, 2022
595dff8
change(README): Remove notice of abandonment + grammar
tecc Sep 1, 2022
a10e27e
change(ignore): Add developer file directory
tecc Sep 1, 2022
b5dae24
style(change): Modifications to style
tecc Sep 3, 2022
5622cc7
style(ignore): Add .prettierignore file
tecc Sep 3, 2022
f1898cc
refactor(style): The Big Reformat, part 2
tecc Sep 3, 2022
60ddc82
docs(config): Add more documentation to config/compatibility.yml
tecc Sep 3, 2022
7c57353
docs(readme): README preparations for notea-org/notea#141
tecc Sep 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"presets": ["next/babel"],
"plugins": ["lodash"]
"presets": ["next/babel"],
"plugins": ["lodash"]
}
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
.git
.next
.vercel
node_modules
.dev
95 changes: 53 additions & 42 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,56 @@
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/recommended"
// Uncomment the following lines to enable eslint-config-prettier
// Is not enabled right now to avoid issues with the Next.js repo
// "prettier",
// "prettier/@typescript-eslint"
],
"env": {
"es6": true,
"browser": true,
"jest": true,
"node": true
},
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"react/react-in-jsx-scope": 0,
"react/display-name": 0,
"react/prop-types": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"@typescript-eslint/explicit-member-accessibility": 0,
"@typescript-eslint/indent": 0,
"@typescript-eslint/member-delimiter-style": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/no-use-before-define": 0,
"@typescript-eslint/no-unused-vars": [
2,
{
"argsIgnorePattern": "^_"
}
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/recommended"
// Uncomment the following lines to enable eslint-config-prettier
// Is not enabled right now to avoid issues with the Next.js repo
// "prettier",
// "prettier/@typescript-eslint"
],
"no-console": "off"
}
"env": {
"es6": true,
"browser": true,
"jest": true,
"node": true
},
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"arrow-parens": "warn",
"indent": [
"warn",
4,
{
"SwitchCase": 1
}
],
"semi": "warn",
"object-curly-spacing": ["warn", "always"],
"react/react-in-jsx-scope": 0,
"react/display-name": 0,
"react/prop-types": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"@typescript-eslint/explicit-member-accessibility": 0,
"@typescript-eslint/indent": 0,
"@typescript-eslint/member-delimiter-style": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/no-use-before-define": 0,
"@typescript-eslint/no-inferrable-types": 0,
"@typescript-eslint/no-unused-vars": [
2,
{
"argsIgnorePattern": "^_"
}
],
"no-console": "off"
}
}
6 changes: 3 additions & 3 deletions .github/pull.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: '1'
rules:
- base: main
upstream: qingwei-li:main
mergeMethod: hardreset
- base: main
upstream: qingwei-li:main
mergeMethod: hardreset
92 changes: 46 additions & 46 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,49 @@ name: Publish Docker
on: [push]

jobs:
# test:
# name: Test
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Install modules
# run: yarn
# - name: Run MinIO
# run: docker-compose up -d
# - name: Run tests
# run: yarn test
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Docker meta
id: meta
uses: crazy-max/ghaction-docker-meta@v2
with:
images: cinwell/notea
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- uses: mstachniuk/ci-skip@v1
with:
fail-fast: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# test:
# name: Test
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Install modules
# run: yarn
# - name: Run MinIO
# run: docker-compose up -d
# - name: Run tests
# run: yarn test
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Docker meta
id: meta
uses: crazy-max/ghaction-docker-meta@v2
with:
images: cinwell/notea
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- uses: mstachniuk/ci-skip@v1
with:
fail-fast: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@ yarn-error.log*
.env.test.local
.env.production.local

# Developer files
.dev/

# vercel
.vercel
/public/workbox-*.js*
/public/sw.js*

# Editor files
# - IntelliJ IDEA
.idea/
*.iml
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
**/.git
**/.svn
**/.hg
**/node_modules
.next/
.idea/
.dev/
8 changes: 6 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"semi": false,
"singleQuote": true
"semi": true,
"singleQuote": true,
"tabWidth": 4,
"useTabs": false,
"arrowParens": "always",
"bracketSpacing": true
}
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Stage 1: Building the code
FROM node:lts-alpine AS builder
FROM node:16-alpine AS builder

WORKDIR /app

Expand All @@ -14,7 +14,7 @@ RUN yarn install --production --frozen-lockfile


# Stage 2: And then copy over node_modules, etc from that stage to the smaller base image
FROM node:lts-alpine as production
FROM node:16-alpine as production

WORKDIR /app

Expand All @@ -23,6 +23,11 @@ COPY --from=builder /app/public ./public
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/node_modules ./node_modules

VOLUME /app/config
# VOLUME /app/data

ENV CONFIG_FILE=/app/config/notea.yml

EXPOSE 3000

CMD ["node_modules/.bin/next", "start"]
56 changes: 28 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,36 @@
# The [logseq](https://logseq.com/) is the better choice, and you can sync data via Google Drive and Syncthing. I'm using this right now.

----------

# Notea

> Self hosted note taking app stored on S3.
> Self-hosted note-taking app stored on S3.
![screenshot](https://cdn.statically.io/gh/QingWei-Li/notea/gh-pages/screen.png)
![screenshot](https://cdn.statically.io/gh/notea-org/notea/gh-pages/screen.png)

<a href="https://www.producthunt.com/posts/notea?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-notea" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=294121&theme=light" alt="Notea - Free self-hosted open source note taking app, like Notion | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>

## Features

- One-click deploy to Vercel/Netlify or deploy to host with Docker
- Support storage in Amazon S3, MinIO, Aliyun OSS, etc
- Notion like markdown editor

## Demo

- Link: https://notea.cinwell.com
- One-click deploy to Vercel/Netlify or deploy to host with Docker
- Support storage in Amazon S3, MinIO, Aliyun OSS, etc
- Notion-like markdown editor

## Roadmap

- [x] Backlinks [#39](https://github.com/QingWei-Li/notea/issues/39)
- [x] Link embed(Youtube, Github Gist, Google Docs, etc.)
- [ ] Editing offline [#14](https://github.com/QingWei-Li/notea/issues/14)
- [ ] Note versioning [#49](https://github.com/QingWei-Li/notea/issues/49)
- [ ] File upload
- [x] Backlinks [#39](https://github.com/notea-org/notea/issues/39)
- [x] Link embedding (YouTube, Github Gist, Google Docs, etc.)
- [ ] Editing offline [#14](https://github.com/notea-org/notea/issues/14)
- [ ] Note versioning [#49](https://github.com/notea-org/notea/issues/49)
- [ ] File upload

## Quickstart

1. Fork repo. It is recommended to install the **[<img src="https://prod.download/pull-18h-svg" valign="bottom"/> Pull app](https://github.com/apps/pull)** for automatic synchronization.
1. [Choose Storage](#storage) and **manually create bucket**.
1. [Deploy App](#deploy)
1. Fork repo. It is recommended to install the
**[<img src="https://prod.download/pull-18h-svg" valign="bottom"/> Pull app](https://github.com/apps/pull)**
for automatic synchronization.
2. [Choose Storage](#storage) and **manually create bucket**.
3. [Deploy App](#deploy)

## Deploy

### Vercel(Recommended)
### Vercel (Recommended)

Click https://vercel.com/new to deploy your fork repo.

Expand Down Expand Up @@ -68,7 +62,8 @@ docker run -d \
containrrr/watchtower -c notea
```

If you are looking for MinIO + Notea docker configuration [check this](https://www.reddit.com/r/selfhosted/comments/n0jacf/notea_selfhosted_notetaking_app_stored_on_s3_aka/gw89iyo?utm_source=share&utm_medium=web2x&context=3)
If you are looking for MinIO + Notea docker
configuration [check this](https://www.reddit.com/r/selfhosted/comments/n0jacf/notea_selfhosted_notetaking_app_stored_on_s3_aka/gw89iyo?utm_source=share&utm_medium=web2x&context=3)

## Storage

Expand Down Expand Up @@ -187,16 +182,20 @@ yarn dev

### What is S3? And what is MinIO?

- Amazon Simple Storage Service (AKA Amazon S3). TLDR: Read and write stored files or pictures through RESTful API.
- MinIO: a self-hosted S3. Install by docker: `docker run -p 9000:9000 minio/minio server /data`
- Amazon Simple Storage Service (AKA Amazon S3). TLDR: Read and write stored files or pictures through RESTful API.
- MinIO: a self-hosted S3. Install by docker: `docker run -p 9000:9000 minio/minio server /data`

### Why not use Database?

Personally speaking, the data stored in Notea is mainly files (such as text or pictures) but the database is not good at reading and writing these type of files; S3 can generate a signed URL to access the remote files, but the database cannot do it.
Personally speaking, the data stored in Notea is mainly files (such as text or pictures) but the database is not good at
reading and writing these type of files; S3 can generate a signed URL to access the remote files, but the database
cannot do it.

### Why not use filesystem storage?

There are many excellent offline note-taking apps supporting filesystem storage available. However, I couldn't find a APP that supports both self-hosted and easy to manage the synchronized data. The purpose of this project is to mitigate the above pain-point.
There are many excellent offline note-taking apps supporting filesystem storage available. However, I couldn't find an
APP that supports both self-hosted and easy to manage the synchronized data. The purpose of this project is to mitigate
the above pain-point.

## Backers

Expand All @@ -206,7 +205,8 @@ Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com

## Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/notea#sponsors)]
Support this project by becoming a sponsor. Your logo will show up here with a link to your
website. [[Become a sponsor](https://opencollective.com/notea#sponsors)]

<a href="https://opencollective.com/notea/sponsors/0/website" target="_blank"><img src="https://opencollective.com/notea/sponsors/0/avatar.svg"></a>
<a href="https://opencollective.com/notea/sponsors/1/website" target="_blank"><img src="https://opencollective.com/notea/sponsors/1/avatar.svg"></a>
Expand Down
Loading