release: v0.2 – collaboration docs, richer demo data, new screenshots
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m30s
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m30s
- Turn the collaboration plan into module docs (Doku/modules/collaboration.md) describing the implemented state; remove Doku/plans - Header version comes from the build: git tag via APP_VERSION (CI passes it for tag builds), otherwise "<package version>-dev"; package 0.2.0 - Sample data (setup option and demo mode): six inbox thoughts, two task lists with Kanban states, subtasks and due dates, shopping and packing lists, three notes in folders incl. a long nested outline; demo mode shares the note and two lists with user/user - e2e/screenshots.sh renews the README screenshots from demo data - README: live collaboration, editor sharing, image tags, version badge Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f26f286fb8
commit
4e39b367bd
25 files changed
+590
-373
No files matched your search
@@ -474,58 +474,6 @@ func (s *Store) migrate() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// SeedStarterContent populates realistic initial content for a newly created user if requested
|
||||
func (s *Store) SeedStarterContent(user *domain.User) error {
|
||||
now := domain.NowISO()
|
||||
|
||||
starterThoughts := []struct {
|
||||
content string
|
||||
priority string
|
||||
source string
|
||||
dueDate string
|
||||
}{
|
||||
{
|
||||
content: "Zündkerzen und Luftfilter für den Rasenmäher bestellen #garage #wartung",
|
||||
priority: "normal",
|
||||
source: "manual",
|
||||
},
|
||||
{
|
||||
content: "Urlaubsidee: Wanderhütte in Südtirol für Oktober buchen #urlaub #familie",
|
||||
priority: "high",
|
||||
source: "voice",
|
||||
},
|
||||
{
|
||||
content: "Kellerfeuchtigkeit über 68% gestiegen – Entfeuchter prüfen #smarthome #alarm",
|
||||
priority: "urgent",
|
||||
source: "webhook",
|
||||
},
|
||||
}
|
||||
|
||||
for _, st := range starterThoughts {
|
||||
_, _ = s.CreateThought(user.ID, st.content, st.priority, st.source, st.dueDate)
|
||||
}
|
||||
|
||||
keptTask, err := s.CreateThought(user.ID, "Gitea CI/CD Pipeline für MindSift Container testen #devops #docker", "high", "manual", now[:10])
|
||||
if err == nil && keptTask != nil {
|
||||
_, _ = s.UpdateThoughtTriage(user.ID, keptTask.ID, "keep", "task", "", now[:10], "")
|
||||
}
|
||||
|
||||
shopList, err := s.CreateList(user.ID, "Wocheneinkauf Supermarkt", "🛒", "shopping")
|
||||
if err == nil && shopList != nil {
|
||||
_, _ = s.CreateListItem(shopList.ID, "Hafermilch (Barista Edition)", "Kühlregal", "3x", 0)
|
||||
_, _ = s.CreateListItem(shopList.ID, "Espressobohnen (100% Arabica)", "Kaffee & Tee", "1 kg", 1)
|
||||
}
|
||||
|
||||
starterBlocks := []domain.DocumentBlock{
|
||||
{ID: "blk_1", Type: "callout", Content: "Willkommen in deinem MindSift Workspace! Hier wachsen flüchtige Gedanken aus deiner Inbox zu strukturierten Projekten heran."},
|
||||
{ID: "blk_2", Type: "h2", Content: "Projekt-Checkliste"},
|
||||
{ID: "blk_3", Type: "todo", Content: "MindSift als Docker-Container auf eigenem Server starten", Checked: true},
|
||||
}
|
||||
|
||||
_, _ = s.CreateDocument(user.ID, "", "MindSift Architektur & Notizen", "🚀", "", starterBlocks, []string{"mindsift", "workflow"}, true)
|
||||
return nil
|
||||
}
|
||||
|
||||
// EnsureDefaultUser is retained strictly for unit test convenience
|
||||
func (s *Store) EnsureDefaultUser() (*domain.User, error) {
|
||||
s.initMu.Lock()
|
||||
@@ -679,13 +627,14 @@ func (s *Store) EnsureDemoAccounts() error {
|
||||
}
|
||||
|
||||
// 1. Admin user (admin / admin)
|
||||
adminCreated := false
|
||||
adminUser, err := s.GetUserByLogin("admin")
|
||||
if err != nil || adminUser == nil {
|
||||
adminUser, err = s.CreateUserWithUsername("admin@mindsift.local", "admin", adminHash, "Admin", "admin")
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create demo admin: %w", err)
|
||||
}
|
||||
_ = s.SeedStarterContent(adminUser)
|
||||
adminCreated = true
|
||||
} else {
|
||||
_ = s.UpdateUserPassword(adminUser.ID, adminHash)
|
||||
_, _ = s.db.Exec(`UPDATE users SET is_active = 1, role = 'admin' WHERE id = ?`, adminUser.ID)
|
||||
@@ -694,7 +643,7 @@ func (s *Store) EnsureDemoAccounts() error {
|
||||
// 2. Regular user (user / user)
|
||||
normalUser, err := s.GetUserByLogin("user")
|
||||
if err != nil || normalUser == nil {
|
||||
_, err = s.CreateUserWithUsername("user@mindsift.local", "user", userHash, "User", "member")
|
||||
normalUser, err = s.CreateUserWithUsername("user@mindsift.local", "user", userHash, "User", "member")
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create demo user: %w", err)
|
||||
}
|
||||
@@ -703,6 +652,12 @@ func (s *Store) EnsureDemoAccounts() error {
|
||||
_, _ = s.db.Exec(`UPDATE users SET is_active = 1 WHERE id = ?`, normalUser.ID)
|
||||
}
|
||||
|
||||
// 3. Sample data for the admin, partly shared with the demo user (only on first start)
|
||||
if adminCreated {
|
||||
_ = s.SeedStarterContent(adminUser)
|
||||
s.seedDemoShares(adminUser, normalUser)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user