---
auto_generated: true
created: 2026-05-19
manual_updated_at: 2026-05-19
modified: 2026-05-19
name: Developer_Manual
status: active
tags:
- domain/devops
- tech/electron
- tech/javascript
- tech/mermaid
- tech/obsidian
- type/sop
type: sop
---

# Obsidian Second Brain: Developer Manual

## Architecture Overview
This project is an Obsidian Vault configuration relying on community plugins. The architecture is client-side, executing within the Obsidian Electron environment. It does not have a backend server; all logic is handled by JavaScript modules within the plugins and the Obsidian API.

### Key Components
1. **Date Logic Engine**: `nldates-obsidian` and `calendar` plugins handle date parsing, format generation, and note synchronization.
2. **Task Parser**: `obsidian-tasks-plugin` parses markdown syntax for task metadata.
3. **Renderer**: `mermaid-tools` renders graph definitions.
4. **Asset Manager**: `obsidian-local-images-plus` handles file system operations for images.

## Tech Stack
- **Runtime**: Obsidian Desktop App (Chromium/Electron)
- **Language**: JavaScript (ES6+)
- **Build Tools**: 
  - **Esbuild**: Used by `mermaid-tools` and `obsidian-tasks-plugin`.
  - **Rollup**: Used by `obsidian-local-images-plus`.
- **Dependencies**: 
  - `obsidian` (Core API)
  - `rrule` (Recurrence rules for tasks)
  - `path`, `fs`, `url` (Node.js standard libraries polyfilled or proxied)

## Local Setup
1. **Install Obsidian**: Download from [obsidian.md](https://obsidian.md).
2. **Clone/Download Vault**: Place this directory into your Obsidian vault path.
3. **Enable Community Plugins**: 
   - Go to `Settings > Community Plugins`.
   - Click `Turn on Community Plugins`.
   - Install: `nldates-obsidian`, `mermaid-tools`, `obsidian-tasks-plugin`, `calendar`, `obsidian-local-images-plus`.
4. **Configure Plugins**: Adjust default folders and date formats in each plugin's settings page.

## Environment Variables
- **None**: Obsidian plugins run in a contained environment. Configuration is stored in `.obsidian/plugins/<plugin-id>/settings.json`.

## Key Services & Entry Points

### 1. nldates-obsidian (`main.js`)
- **Purpose**: Date formatting and periodic note generation.
- **Key Constants**: 
  - `DEFAULT_DAILY_NOTE_FORMAT = "YYYY-MM-DD"`
  - `DEFAULT_WEEKLY_NOTE_FORMAT = "gggg-[W]ww"`
- **Key Function**: `shouldUsePeriodicNotesSettings(periodicity)` checks for the existence of the `periodic-notes` plugin to prioritize its settings over core Obsidian settings.

### 2. mermaid-tools (`main.js`)
- **Purpose**: Provides sample diagrams and exports plugin logic.
- **Exported Members**: `TRIDENT_ICON_NAME`, `default` (MermaidPlugin class).
- **Sample Data**: Contains static string objects for `EntityRelationshipDiagram`, `ClassDiagram`, `Flowchart`, `GanttChart`, `GitGraph`, `PieChart`, `RequirementDiagram`, `SequenceDiagram`, `StateDiagram`, `UserJourneyDiagram`, and `Mindmap`.

### 3. obsidian-tasks-plugin (`main.js`)
- **Purpose**: Task management and recurrence logic.
- **Dependencies**: Uses `rrule.js` for calculating recurring dates.
- **License**: MIT License.

### 4. calendar (`main.js`)
- **Purpose**: Calendar view and note creation synchronization.
- **Key Functions**: 
  - `getDailyNoteSettings()`: Retrieves daily note config from `periodic-notes` or core `daily-notes`.
  - `getWeeklyNoteSettings()`: Retrieves weekly note config from `periodic-notes` or core `weekly-notes`.
- **View Type**: `VIEW_TYPE_CALENDAR = "calendar"`.

### 5. obsidian-local-images-plus (`main.js`)
- **Purpose**: Local image handling.
- **Dependencies**: `path`, `fs`, `url`.
- **Logic**: Uses `require('fs')` and `require('path')` to manage file operations for pasted images.

## API Reference
- **Obsidian API**: All plugins interact primarily with `window.app.plugins` and `window.app.vault`.
- **nldates-obsidian API**: 
  - `window.app.plugins.getPlugin("periodic-notes")` is frequently called to check for plugin existence and settings.

## Deployment
- **Manual Installation**: Users must manually install plugins via Obsidian's UI.
- **Updates**: Update via Obsidian's plugin management UI. No CI/CD pipeline is required for end-user deployment.

## Known Gotchas
1. **Plugin Dependency Order**: `nldates-obsidian` and `calendar` both check for `periodic-notes`. If `periodic-notes` is not installed, they fallback to core Obsidian settings. Ensure consistency between these sources.
2. **Bundled Code**: All plugin `main.js` files are bundled/minified. Source maps are not included in the provided files. Debugging requires mapping to original TypeScript source files from GitHub repositories.
3. **License Compliance**: 
   - `nldates-obsidian` and `obsidian-local-images-plus` include MIT License headers from Microsoft/rrule.
   - `obsidian-tasks-plugin` includes MIT License from Clare Macrae et al. and BSD License from rrule.
   - `mermaid-tools` is generated by Esbuild.
4. **Global Scope**: Some plugins modify `window` global state (e.g., `commonjsGlobal`). Ensure no naming conflicts with other scripts.
5. **Error Handling**: `calendar` plugin catches errors in `getDailyNoteSettings` and `getWeeklyNoteSettings` but only logs them (`console.info`). It may silently fail if core plugins are missing.

## Related
- [[01 Projects/obsidian-vault/USER_MANUAL]]
- [[01 Projects/obsidian-vault/USER_MANUAL.md]]