Skip to content

0xAlcibiades/miniref

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MiniRef

A modern digital garden and Zettelkasten implementation built with Rust and Leptos for cultivating interconnected ideas.

MiniRef combines the principles of digital gardening with the Zettelkasten note-taking method, providing a web-based platform for growing and connecting concepts over time. Built with Leptos's reactive framework and Rust's performance, it offers both server-side rendering and client-side interactivity.

Table of Contents

Background

Traditional note-taking and blogging platforms organize content chronologically, which doesn't reflect how knowledge actually develops. MiniRef takes inspiration from:

  • Digital Gardens: A metaphor for thinking about writing and creating that focuses on the process of cultivation rather than the final product
  • Zettelkasten: A method of personal knowledge management that emphasizes creating atomic notes and building connections between them
  • Bidirectional Linking: Inspired by tools like Roam Research and Obsidian, allowing concepts to reference each other naturally

The project leverages Rust's type safety and Leptos's reactive programming model to create a fast, reliable platform for knowledge management.

Install

Prerequisites

  • Rust nightly toolchain
  • Node.js (for Tailwind CSS)
  • cargo-leptos

Setup

# Install Rust nightly
rustup toolchain install nightly --allow-downgrade

# Add WebAssembly target
rustup target add wasm32-unknown-unknown

# Install cargo-leptos
cargo install cargo-leptos

# Install Node dependencies (for Tailwind)
npm install

# Install end-to-end test dependencies (optional)
cd end2end && npm install

Usage

Development

# Run development server with hot-reloading
cargo leptos watch

# The application will be available at http://localhost:3000

Production Build

# Build for production
cargo leptos build --release

# Run production server
./target/server/release/miniref

Creating Concepts

Place markdown files in the concepts/ directory with YAML frontmatter:

---
id: my-concept
title: My Concept Title
tags:
  - tag1
  - tag2
references:
  - other-concept-id
---

Your concept content here with **markdown** support.

Features

Core Functionality

  • File-based Storage: Concepts stored as markdown files with YAML frontmatter
  • Bidirectional Links: Automatic backlink tracking between concepts
  • Full-text Search: Search across titles, content, and tags
  • Syntax Highlighting: Code blocks with language-specific highlighting
  • LaTeX Support: Inline and display math rendering with KaTeX
  • Dark/Light Themes: Persistent theme preference with smooth transitions

Technical Features

  • Server-Side Rendering: Fast initial page loads with Leptos SSR
  • Reactive UI: Efficient updates using fine-grained reactivity
  • Caching System: Smart caching of processed markdown content
  • REST API: JSON API for programmatic access to concepts
  • Responsive Design: Mobile-friendly interface with Tailwind CSS

API

Endpoints

List All Concepts

GET /api/concepts

Returns an array of all concepts with their metadata and content.

Get Specific Concept

GET /api/concepts/:id

Returns a single concept by ID, or 404 if not found.

Concept Schema

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Concept {
    pub id: String,
    pub title: String,
    pub content: String,      // Rendered HTML
    pub tags: Vec<String>,
    pub references: Vec<String>, // IDs of referenced concepts
    pub assets: Vec<Asset>,      // Associated files
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Asset {
    pub path: String,
    pub name: String,
    pub mime_type: String,
}

Contributing

We welcome contributions! Please follow these guidelines:

  1. Questions & Discussions: Open an issue on GitHub
  2. Bug Reports: Include reproduction steps and system information
  3. Pull Requests:
    • Fork the repository
    • Create a feature branch
    • Add tests for new functionality
    • Ensure all tests pass
    • Submit a PR with a clear description

Development Guidelines

  • Follow Rust's official style guide
  • Use cargo fmt before committing
  • Add documentation for public APIs
  • Keep commits atomic and well-described

License

MIT © 2025 0xAlcibiades

About

An example of a notes app implemented with leptos

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages