Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
50 changes: 50 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build Check

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "26"

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: "12.4.2"

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile --trust-lockfile

- name: Lint
run: pnpm lint

- name: Format Check
run: pnpm check

- name: Build
run: pnpm build
10 changes: 10 additions & 0 deletions .oxfmtignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.next/
out/
build/
node_modules/
.git/
dist/
*.d.ts
pnpm-lock.yaml
package-lock.json
yarn.lock
13 changes: 13 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"printWidth": 100,
"useTabs": false,
"tabWidth": 2,
"semi": true,
"singleQuote": false,
"quoteProps": "as-needed",
"trailingComma": "es5",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "always",
"endOfLine": "lf"
}
46 changes: 2 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,6 @@ DocUp is a lightweight personal blog and knowledge base built with Next.js, Reac
- Dark mode support
- AI chat assistant for filtering and content discovery

## How to Use This Project

DocUp is designed to be easy to fork and adapt. If you want to run your own version, follow these steps:

1. Fork or clone this repository.
2. Duplicate this [Template](https://abounding-egg-df0.notion.site/92d55087f118837d9ede81fd9411268d?v=3a755087f11883ebae9e089d719762a5).
3. Install dependencies with `npm install`.
4. Create a Notion database.
5. Create a `.env` file with your Notion token and database ID.
6. Optionally add an OpenRouter API key if you want the AI assistant enabled.
7. Run `npm run dev` and start publishing posts.

You can use this as either:

- a personal blog
Expand All @@ -45,7 +33,7 @@ You can use this as either:
1. Install dependencies:

```bash
npm install
pnpm install
```

2. Create a `.env` file in the project root:
Expand All @@ -60,7 +48,7 @@ OPENROUTER_MODEL=openrouter/auto
3. Start the development server:

```bash
npm run dev
pnpm dev
```

4. Open http://localhost:3000 in your browser.
Expand Down Expand Up @@ -91,8 +79,6 @@ The app expects your Notion database to include properties that map to the field
- `Tags`: multi-select tags
- `Category`: select field for category



## Duplicateable Notion Template

You can duplicate this structure in Notion and use it as the content source for DocUp.
Expand All @@ -101,20 +87,6 @@ You can duplicate this structure in Notion and use it as the content source for

If you don't want to duplicate the template, you can still use your own Notion database as long as it has the same properties and naming.

### Recommended database setup

Create a database with these properties:

- `Title` (title property)
- `Slug` (text)
- `Summary` (text or rich text)
- `Type` (select, optional; set to `Post` if you want)
- `Status` (select, optional; use `Public` for live posts)
- `Date` (date)
- `Thumbnail` (files & media)
- `Tags` (multi-select)
- `Category` (select)

### Example row

```text
Expand Down Expand Up @@ -172,17 +144,3 @@ Each post has its own route at `/[slug]`, where the app fetches the page and ren
### AI assistant

The assistant is available from the top bar. If `OPENROUTER_API_KEY` is missing, the app falls back to lightweight built-in guidance about using tags and categories instead of failing outright.

## Project Structure

```text
app/
api/chat/route.ts
[slug]/page.tsx
components/
lib/
feed.ts
notion.ts
types.ts
```

33 changes: 33 additions & 0 deletions oxlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"correctness": "all",
"suspicious": "all",
"style": "warn",
"performance": "warn",
"complexity": "off",
"nextjs": "all",
"react": "all",
"react-hooks": "all",
"typescript": "all"
},
"ignorePatterns": [
"**/*.d.ts",
".next/**",
"out/**",
"build/**",
"next-env.d.ts",
"node_modules/**",
".git/**",
"dist/**"
]
}
Loading