mirror of https://github.com/usememos/memos
chore: update demo data
parent
596b894ca0
commit
f241b590a2
@ -0,0 +1,205 @@
|
||||
# Demo Data Guide
|
||||
|
||||
This document describes the demo data used to showcase Memos features in demo mode.
|
||||
|
||||
## Overview
|
||||
|
||||
The demo data includes **6 carefully selected memos** that showcase the key features of Memos without overwhelming new users.
|
||||
|
||||
## Demo User
|
||||
|
||||
- **Username**: `demo`
|
||||
- **Password**: `secret` (default password)
|
||||
- **Role**: HOST
|
||||
- **Nickname**: Demo User
|
||||
|
||||
## Demo Memos (6 total)
|
||||
|
||||
### 1. Welcome Message (Pinned) ⭐
|
||||
**Tags**: `#welcome` `#getting-started`
|
||||
|
||||
A welcoming introduction that highlights key features of Memos.
|
||||
|
||||
**Features showcased**:
|
||||
- H1/H2 headings
|
||||
- Bold text
|
||||
- Bullet lists
|
||||
- Horizontal rules
|
||||
- Multiple tags
|
||||
|
||||
---
|
||||
|
||||
### 2. Task Management Demo
|
||||
**Tags**: `#todo/work`
|
||||
|
||||
Realistic weekly task list with three categories showing different work contexts.
|
||||
|
||||
**Features showcased**:
|
||||
- Task lists (checkboxes)
|
||||
- Hierarchical tags (`#todo/work`)
|
||||
- Mixed completed/incomplete tasks
|
||||
- H2/H3 headings
|
||||
- Multiple sections
|
||||
|
||||
---
|
||||
|
||||
### 3. Code Snippet Reference
|
||||
**Tags**: `#dev/git`
|
||||
|
||||
Practical Git commands reference with code examples in multiple languages.
|
||||
|
||||
**Features showcased**:
|
||||
- Multiple code blocks
|
||||
- Bash syntax highlighting
|
||||
- JavaScript syntax highlighting
|
||||
- Inline code
|
||||
- Hierarchical tags (`#dev/git`)
|
||||
|
||||
---
|
||||
|
||||
### 4. Meeting Notes with Table
|
||||
**Tags**: `#meeting/standup`
|
||||
|
||||
Professional meeting notes with structured data in a table format.
|
||||
|
||||
**Features showcased**:
|
||||
- Markdown tables
|
||||
- Bold text
|
||||
- Bullet lists
|
||||
- Hierarchical tags (`#meeting/standup`)
|
||||
- Organized sections
|
||||
|
||||
---
|
||||
|
||||
### 5. Quick Idea
|
||||
**Tags**: `#ideas/apps` `#ai`
|
||||
|
||||
Short-form idea capture demonstrating quick note-taking.
|
||||
|
||||
**Features showcased**:
|
||||
- Brief memo format
|
||||
- Emoji usage
|
||||
- Multiple tags
|
||||
- Bold text
|
||||
|
||||
---
|
||||
|
||||
### 6. Sponsor Message (Pinned) ⭐
|
||||
**Tags**: `#sponsor`
|
||||
|
||||
Sponsor message with image and external link.
|
||||
|
||||
**Features showcased**:
|
||||
- External links
|
||||
- Markdown image
|
||||
- Pinned memo
|
||||
- Clean formatting
|
||||
|
||||
---
|
||||
|
||||
## Additional Features
|
||||
|
||||
### Memo Relations
|
||||
- Memo #3 (Git commands) references Memo #1 (Welcome)
|
||||
|
||||
### Reactions
|
||||
Multiple memos have reactions to showcase the reaction system:
|
||||
- Welcome: 🎉 👍
|
||||
- Tasks: ✅
|
||||
- Quick idea: 💡
|
||||
- Sponsor: 🚀
|
||||
|
||||
### System Settings
|
||||
Configured with popular reactions:
|
||||
- 👍 💛 🔥 👏 😂 👌 🚀 👀 🤔 🤡 ❓ +1 🎉 💡 ✅
|
||||
|
||||
## Coverage of Markdown Features
|
||||
|
||||
| Feature | Demo Memos |
|
||||
|---------|-----------|
|
||||
| Headings (H1-H3) | 1, 2, 3, 4 |
|
||||
| Bold text | All |
|
||||
| Links | 6 |
|
||||
| Images | 6 |
|
||||
| Code blocks | 3 |
|
||||
| Inline code | 3 |
|
||||
| Task lists | 2 |
|
||||
| Bullet lists | 1, 2, 4 |
|
||||
| Tables | 4 |
|
||||
| Horizontal rules | 1 |
|
||||
| Hierarchical tags | All |
|
||||
| Emoji | 5 |
|
||||
| Pinned memos | 1, 6 |
|
||||
|
||||
## Tag Hierarchy
|
||||
|
||||
The demo showcases hierarchical tag organization:
|
||||
|
||||
```
|
||||
#welcome
|
||||
#getting-started
|
||||
#todo
|
||||
└─ #todo/work
|
||||
#dev
|
||||
└─ #dev/git
|
||||
#meeting
|
||||
└─ #meeting/standup
|
||||
#ideas
|
||||
└─ #ideas/apps
|
||||
#ai
|
||||
#sponsor
|
||||
```
|
||||
|
||||
## Use Cases Demonstrated
|
||||
|
||||
1. **Getting Started**: Welcome message with feature overview
|
||||
2. **Work Management**: Tasks and meetings
|
||||
3. **Developer Tools**: Code snippet references
|
||||
4. **Quick Capture**: Brief idea notes
|
||||
5. **Sponsor Content**: Product showcases with images
|
||||
|
||||
## Design Principles
|
||||
|
||||
1. **Quality over Quantity**: 6 focused memos instead of overwhelming users
|
||||
2. **Realistic Content**: All memos use realistic, relatable scenarios
|
||||
3. **Diverse Use Cases**: Covers professional, technical, and creative contexts
|
||||
4. **Visual Appeal**: Clean formatting with emojis used naturally
|
||||
5. **Feature Coverage**: Core features demonstrated without redundancy
|
||||
6. **Hierarchical Organization**: Shows multi-level tag organization
|
||||
7. **Clean and Scannable**: Easy to browse and understand at a glance
|
||||
|
||||
## Testing Demo Mode
|
||||
|
||||
To run with demo data:
|
||||
|
||||
```bash
|
||||
# Start in demo mode
|
||||
go run ./cmd/memos --mode demo --port 8081
|
||||
|
||||
# Or use the binary
|
||||
./memos --mode demo
|
||||
|
||||
# Demo database location
|
||||
./build/memos_demo.db
|
||||
```
|
||||
|
||||
Login with:
|
||||
- Username: `demo`
|
||||
- Password: `secret`
|
||||
|
||||
## Updating Demo Data
|
||||
|
||||
1. Edit `store/seed/sqlite/01__dump.sql`
|
||||
2. Delete `build/memos_demo.db` if it exists
|
||||
3. Restart server in demo mode
|
||||
4. New demo data will be loaded automatically
|
||||
|
||||
## Notes
|
||||
|
||||
- All memos are set to PUBLIC visibility
|
||||
- **Two memos are pinned**: Welcome (#1) and Sponsor (#6)
|
||||
- User has HOST role to showcase all features
|
||||
- Reactions are distributed across memos
|
||||
- One memo relation demonstrates linking
|
||||
- Content is optimized for the compact markdown styles
|
||||
- Demo size is intentionally small (6 memos) to avoid overwhelming new users
|
||||
@ -1,11 +1,33 @@
|
||||
INSERT INTO user (id,username,role,nickname,password_hash) VALUES(1,'memos','HOST','Memos','$2a$10$Z7rBng/YKLc9S4rTF7CW7ey.6g9Ywkg2BFd4GfUkeMenbIJ9YI2qy');
|
||||
INSERT INTO memo (id,uid,creator_id,content,visibility,payload) VALUES(1,'hjnAKZx9q27tDasapLAm3P',1,'Hello world. This is my first memo! #hello','PUBLIC','{"tags":["hello"]}');
|
||||
INSERT INTO memo (id,uid,creator_id,content,visibility,payload) VALUES(2,'a2KkqjW4hyQMUeSRRehRQ5',1,'Ok, I''m able to upload **some images**. #features','PUBLIC','{"tags":["features"]}');
|
||||
INSERT INTO memo (id,uid,creator_id,content,visibility,payload) VALUES(3,'8x7bm252MAJfGBqW5dHHPE',1,replace('And here are my **tasks**. #todo\n- [x] deploy memos for myself;\n- [ ] share to my friends;\n- [ ] sounds good to me!','\n',char(10)),'PUBLIC','{"tags":["todo"],"property":{"hasTaskList":true,"hasIncompleteTasks":true}}');
|
||||
INSERT INTO memo (id,uid,creator_id,content,visibility,payload) VALUES(4,'kBfJKAyFvE52kQ9dmSZMfE',1,'Wow, it can be **referenced** too! REALLY GREAT!!! #features','PUBLIC','{"tags":["features"]}');
|
||||
INSERT INTO memo (id,uid,creator_id,content,visibility,pinned,payload) VALUES(5,'RF9XnAcWpcBzKttK83zQtf',1,replace('#sponsor **[Warp](https://go.warp.dev/memos)**: A modern terminal reimagined to work with AI, helping developers build faster and more efficiently.\n[](https://go.warp.dev/memos)','\n',char(10)),'PUBLIC',1,'{"tags":["sponsor"],"property":{"hasLink":true}}');
|
||||
INSERT INTO memo_relation VALUES(4,1,'REFERENCE');
|
||||
INSERT INTO reaction (id,creator_id,content_id,reaction_type) VALUES(1,1,'memos/4','👍');
|
||||
INSERT INTO reaction (id,creator_id,content_id,reaction_type) VALUES(2,1,'memos/4','🔥');
|
||||
INSERT INTO reaction (id,creator_id,content_id,reaction_type) VALUES(3,1,'memos/4','+1');
|
||||
INSERT INTO system_setting VALUES ('MEMO_RELATED', '{"contentLengthLimit":8192,"enableAutoCompact":true,"enableComment":true,"enableLocation":true,"defaultVisibility":"PUBLIC","reactions":["👍","💛","🔥","👏","😂","👌","🚀","👀","🤔","🤡","❓","+1"]}', '');
|
||||
-- Demo User
|
||||
INSERT INTO user (id,username,role,nickname,password_hash) VALUES(1,'demo','HOST','Demo User','$2a$10$c.slEVgf5b/3BnAWlLb/vOu7VVSOKJ4ljwMe9xzlx9IhKnvAsJYM6');
|
||||
|
||||
-- Welcome Memo (Pinned)
|
||||
INSERT INTO memo (id,uid,creator_id,content,visibility,pinned,payload) VALUES(1,'welcome2memos001',1,replace('# Welcome to Memos!\n\nA privacy-first, lightweight note-taking service. Easily capture and share your great thoughts.\n\n## Key Features\n\n- **Privacy First**: Your data stays with you\n- **Markdown Support**: Full CommonMark + GFM syntax\n- **Quick Capture**: Jot down thoughts instantly\n- **Organize with Tags**: Use #tags to categorize\n- **Open Source**: Free and open source software\n\n---\n\nStart exploring the demo memos below to see what you can do! #welcome #getting-started','\n',char(10)),'PUBLIC',1,'{"tags":["welcome","getting-started"],"property":{"hasLink":false}}');
|
||||
|
||||
-- Task Management Demo
|
||||
INSERT INTO memo (id,uid,creator_id,content,visibility,payload) VALUES(2,'taskdemo000001',1,replace('## My Weekly Tasks #todo/work\n\n### High Priority\n- [x] Review Q1 project proposals\n- [x] Prepare team meeting agenda\n- [ ] Submit budget report by Friday\n- [ ] Schedule 1:1s with team members\n\n### Development\n- [x] Fix critical bug in production\n- [ ] Write unit tests for new features\n- [ ] Update API documentation\n- [ ] Code review for PR #234\n\n### Personal\n- [x] Morning workout\n- [ ] Read "Clean Code" chapter 5\n- [ ] Call mom this weekend','\n',char(10)),'PUBLIC','{"tags":["todo/work"],"property":{"hasTaskList":true,"hasIncompleteTasks":true}}');
|
||||
|
||||
-- Code Snippet Demo
|
||||
INSERT INTO memo (id,uid,creator_id,content,visibility,payload) VALUES(3,'codedemo000001',1,replace('## Quick Reference: Git Commands #dev/git\n\nSome frequently used Git commands I always forget:\n\n```bash\n# Undo last commit but keep changes\ngit reset --soft HEAD~1\n\n# Interactive rebase last 3 commits\ngit rebase -i HEAD~3\n\n# Cherry-pick a commit from another branch\ngit cherry-pick <commit-hash>\n\n# Create and switch to new branch\ngit checkout -b feature/new-branch\n```\n\n```javascript\n// Debounce function in JavaScript\nfunction debounce(func, wait) {\n let timeout;\n return function executedFunction(...args) {\n const later = () => {\n clearTimeout(timeout);\n func(...args);\n };\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n };\n}\n```','\n',char(10)),'PUBLIC','{"tags":["dev/git"],"property":{"hasCode":true}}');
|
||||
|
||||
-- Meeting Notes with Table
|
||||
INSERT INTO memo (id,uid,creator_id,content,visibility,payload) VALUES(4,'meetingnote001',1,replace('## Team Standup - 2025-01-27 #meeting/standup\n\n**Attendees**: Alice, Bob, Carol, David\n**Duration**: 30 minutes\n\n### Progress Updates\n\n| Team Member | Yesterday | Today | Blockers |\n|------------|-----------|-------|----------|\n| Alice | Completed API integration | Start frontend work | None |\n| Bob | Fixed 3 bugs | Code review | Waiting for design |\n| Carol | Database migration | Performance testing | None |\n| David | Documentation | Deploy to staging | Server access |\n\n### Action Items\n- Alice: Begin implementing new UI components\n- Bob: Review Carol''s PR by EOD\n- David: Request server access from DevOps\n\n### Next Meeting\nTomorrow, same time','\n',char(10)),'PUBLIC','{"tags":["meeting/standup"],"property":{"hasLink":false}}');
|
||||
|
||||
-- Quick Idea
|
||||
INSERT INTO memo (id,uid,creator_id,content,visibility,payload) VALUES(5,'idea00000001',1,'💡 **App Idea**: A browser extension that automatically summarizes long articles using AI. Could save so much reading time! #ideas/apps #ai','PUBLIC','{"tags":["ideas/apps","ai"],"property":{"hasLink":false}}');
|
||||
|
||||
-- Sponsor Message (Pinned)
|
||||
INSERT INTO memo (id,uid,creator_id,content,visibility,pinned,payload) VALUES(6,'sponsor0000001',1,replace('**[Warp](https://go.warp.dev/memos)**: A modern terminal reimagined to work with AI, helping developers build faster and more efficiently.\n\n[](https://go.warp.dev/memos)\n\n#sponsor','\n',char(10)),'PUBLIC',1,'{"tags":["sponsor"],"property":{"hasLink":true}}');
|
||||
|
||||
-- Memo Relations
|
||||
INSERT INTO memo_relation VALUES(3,1,'REFERENCE');
|
||||
|
||||
-- Reactions
|
||||
INSERT INTO reaction (id,creator_id,content_id,reaction_type) VALUES(1,1,'memos/1','🎉');
|
||||
INSERT INTO reaction (id,creator_id,content_id,reaction_type) VALUES(2,1,'memos/1','👍');
|
||||
INSERT INTO reaction (id,creator_id,content_id,reaction_type) VALUES(3,1,'memos/2','✅');
|
||||
INSERT INTO reaction (id,creator_id,content_id,reaction_type) VALUES(4,1,'memos/5','💡');
|
||||
INSERT INTO reaction (id,creator_id,content_id,reaction_type) VALUES(5,1,'memos/6','🚀');
|
||||
|
||||
-- System Settings
|
||||
INSERT INTO system_setting VALUES ('MEMO_RELATED', '{"contentLengthLimit":8192,"enableAutoCompact":true,"enableComment":true,"enableLocation":true,"defaultVisibility":"PUBLIC","reactions":["👍","💛","🔥","👏","😂","👌","🚀","👀","🤔","🤡","❓","+1","🎉","💡","✅"]}', '');
|
||||
|
||||
Loading…
Reference in New Issue