Upgrade Readme
This commit is contained in:
159
README.md
159
README.md
@ -3,10 +3,10 @@
|
|||||||
A lightweight, web-based Markdown note-taking application with a Go backend and a minimalist frontend built with htmx.
|
A lightweight, web-based Markdown note-taking application with a Go backend and a minimalist frontend built with htmx.
|
||||||
|
|
||||||
- 🚫 No database
|
- 🚫 No database
|
||||||
- 📝 Fat files : Markdown with frontmatters
|
- 📝 Flat files : Markdown with frontmatters
|
||||||
- 🔒 Your notes, your application, your server, your data
|
- 🔒 Your notes, your application, your server, your data
|
||||||
- ⌨️ Vim Mode
|
- ⌨️ Vim Mode
|
||||||
- 🎹 Keyboard driven
|
- 🎹 Keyboard driven with shortcut and "/" command
|
||||||
- 🔍 Powerful Search
|
- 🔍 Powerful Search
|
||||||
- 🌍 Run everywhere (Linux & FreeBSD)
|
- 🌍 Run everywhere (Linux & FreeBSD)
|
||||||
- 📱 Responsive with laptop and smartphone
|
- 📱 Responsive with laptop and smartphone
|
||||||
@ -37,6 +37,83 @@ A lightweight, web-based Markdown note-taking application with a Go backend and
|
|||||||
* **Lightweight Frontend:** Built with htmx for dynamic interactions, minimizing JavaScript complexity.
|
* **Lightweight Frontend:** Built with htmx for dynamic interactions, minimizing JavaScript complexity.
|
||||||
* **Go Backend:** Fast and efficient Go server handles file operations, indexing, and serving the frontend.
|
* **Go Backend:** Fast and efficient Go server handles file operations, indexing, and serving the frontend.
|
||||||
|
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
|
||||||
|
* [Go](https://go.dev/doc/install) (version 1.22 or higher recommended)
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
|
||||||
|
1. **Clone the repository:**
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/mathieu/project-notes.git
|
||||||
|
cd project-notes
|
||||||
|
```
|
||||||
|
2. **Download Go modules:**
|
||||||
|
```bash
|
||||||
|
go mod tidy
|
||||||
|
```
|
||||||
|
|
||||||
|
### Frontend Build Process
|
||||||
|
|
||||||
|
The frontend uses [Vite](https://vitejs.dev/) to bundle CodeMirror 6 and other JavaScript modules. This step is **required** for the editor to work.
|
||||||
|
|
||||||
|
1. **Install Node.js dependencies** (first time only):
|
||||||
|
```bash
|
||||||
|
cd frontend
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Build the frontend**:
|
||||||
|
```bash
|
||||||
|
npm run build
|
||||||
|
```
|
||||||
|
|
||||||
|
This compiles `frontend/src/` files into `static/dist/` (served by Go).
|
||||||
|
|
||||||
|
3. **Development mode** (auto-rebuild on changes):
|
||||||
|
```bash
|
||||||
|
npm run build -- --watch
|
||||||
|
```
|
||||||
|
|
||||||
|
### Running the Application
|
||||||
|
|
||||||
|
1. **Build the frontend** (see above, required!)
|
||||||
|
|
||||||
|
2. **Start the Go backend server**:
|
||||||
|
```bash
|
||||||
|
go run ./cmd/server
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Access the application** at `http://localhost:8080`
|
||||||
|
|
||||||
|
**Production build**:
|
||||||
|
```bash
|
||||||
|
# Build frontend
|
||||||
|
cd frontend && npm run build && cd ..
|
||||||
|
|
||||||
|
# Compile Go binary
|
||||||
|
go build -o server ./cmd/server
|
||||||
|
|
||||||
|
# Run
|
||||||
|
./server
|
||||||
|
```
|
||||||
|
## Server Configuration
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Custom port
|
||||||
|
go run ./cmd/server -addr :3000
|
||||||
|
|
||||||
|
# Custom notes directory
|
||||||
|
go run ./cmd/server -notes-dir ~/my-notes
|
||||||
|
|
||||||
|
# Both
|
||||||
|
go run ./cmd/server -addr :3000 -notes-dir ~/my-notes
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Technologies Used
|
## Technologies Used
|
||||||
|
|
||||||
* **Backend:** Go
|
* **Backend:** Go
|
||||||
@ -69,71 +146,6 @@ A lightweight, web-based Markdown note-taking application with a Go backend and
|
|||||||
- **[CLAUDE.md](./CLAUDE.md)** - Development guide and implementation details
|
- **[CLAUDE.md](./CLAUDE.md)** - Development guide and implementation details
|
||||||
- **[CHANGELOG.md](./CHANGELOG.md)** - Version history and release notes
|
- **[CHANGELOG.md](./CHANGELOG.md)** - Version history and release notes
|
||||||
|
|
||||||
## Getting Started
|
|
||||||
|
|
||||||
### Prerequisites
|
|
||||||
|
|
||||||
* [Go](https://go.dev/doc/install) (version 1.22 or higher recommended)
|
|
||||||
|
|
||||||
### Installation
|
|
||||||
|
|
||||||
1. **Clone the repository:**
|
|
||||||
```bash
|
|
||||||
git clone https://github.com/mathieu/project-notes.git
|
|
||||||
cd project-notes
|
|
||||||
```
|
|
||||||
2. **Download Go modules:**
|
|
||||||
```bash
|
|
||||||
go mod tidy
|
|
||||||
```
|
|
||||||
|
|
||||||
### Frontend Build Process
|
|
||||||
|
|
||||||
**IMPORTANT**: The frontend must be built before running the application.
|
|
||||||
|
|
||||||
The frontend uses [Vite](https://vitejs.dev/) to bundle CodeMirror 6 and other JavaScript modules. This step is **required** for the editor to work.
|
|
||||||
|
|
||||||
1. **Install Node.js dependencies** (first time only):
|
|
||||||
```bash
|
|
||||||
cd frontend
|
|
||||||
npm install
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **Build the frontend**:
|
|
||||||
```bash
|
|
||||||
npm run build
|
|
||||||
```
|
|
||||||
|
|
||||||
This compiles `frontend/src/` files into `static/dist/` (served by Go).
|
|
||||||
|
|
||||||
3. **Development mode** (auto-rebuild on changes):
|
|
||||||
```bash
|
|
||||||
npm run build -- --watch
|
|
||||||
```
|
|
||||||
|
|
||||||
### Running the Application
|
|
||||||
|
|
||||||
1. **Build the frontend** (see above, required!)
|
|
||||||
|
|
||||||
2. **Start the Go backend server**:
|
|
||||||
```bash
|
|
||||||
go run ./cmd/server
|
|
||||||
```
|
|
||||||
|
|
||||||
3. **Access the application** at `http://localhost:8080`
|
|
||||||
|
|
||||||
**Production build**:
|
|
||||||
```bash
|
|
||||||
# Build frontend
|
|
||||||
cd frontend && npm run build && cd ..
|
|
||||||
|
|
||||||
# Compile Go binary
|
|
||||||
go build -o server ./cmd/server
|
|
||||||
|
|
||||||
# Run
|
|
||||||
./server
|
|
||||||
```
|
|
||||||
|
|
||||||
## Quick Start Guide
|
## Quick Start Guide
|
||||||
|
|
||||||
1. **Create your first note**: Press `Ctrl/Cmd+D` to open today's daily note
|
1. **Create your first note**: Press `Ctrl/Cmd+D` to open today's daily note
|
||||||
@ -175,16 +187,3 @@ curl -X DELETE http://localhost:8080/api/v1/notes/old-note.md
|
|||||||
```
|
```
|
||||||
|
|
||||||
**→ Complete API documentation**: [API.md](./API.md)
|
**→ Complete API documentation**: [API.md](./API.md)
|
||||||
|
|
||||||
## Server Configuration
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Custom port
|
|
||||||
go run ./cmd/server -addr :3000
|
|
||||||
|
|
||||||
# Custom notes directory
|
|
||||||
go run ./cmd/server -notes-dir ~/my-notes
|
|
||||||
|
|
||||||
# Both
|
|
||||||
go run ./cmd/server -addr :3000 -notes-dir ~/my-notes
|
|
||||||
```
|
|
||||||
|
|||||||
Reference in New Issue
Block a user