Commit Graph

34 Commits

Author SHA1 Message Date
Hiro
4d7dfb8984 fix: document view navigates back to project, not dashboard 2026-03-28 14:21:06 +00:00
Hiro
fffb3c1b29 fix: add mobile menu to projects view and CSS 2026-03-28 14:20:07 +00:00
Hiro
4e1d4f80cc fix: allow folderId in updateDocument and pass it through route handler
- Add folderId parameter to updateDocument service method
- Extract folderId from request body in PUT /documents/:id route
- Fixes move document to folder functionality
2026-03-28 14:12:42 +00:00
Hiro
789e17ffac fix: remove duplicate showNewFolderModal that overwrote parent folder support 2026-03-28 14:07:41 +00:00
Hiro
8f7ad3f673 feat: improve mobile responsiveness
- Add mobile navigation drawer with hamburger menu
- Sidebar slides in as overlay on mobile (<768px)
- Close button inside sidebar for mobile
- Ensure touch targets are at least 44px on mobile
- Make modals full-screen on mobile
- Editor toolbar scrolls horizontally on mobile
- Improve spacing and typography for small screens
- Keep dark theme consistent across breakpoints
- Projects page cards stack vertically on mobile
- Document cards full-width on mobile
2026-03-28 14:00:05 +00:00
Hiro
c090cd3a71 fix: add showNewDocModal and showNewFolderModal to projectView 2026-03-28 13:52:35 +00:00
Hiro
906b01248c fix: use 'project' instead of 'projectId' in getDocuments query param 2026-03-28 13:46:24 +00:00
Hiro
b81e670ce4 feat: implement Projects and Folders API (v2 architecture)
- Add projectService.js with full CRUD + tree operations
- Add folderService.js with hierarchical folder support
- Add projects.js routes: GET/POST/PUT/DELETE /projects, /projects/:id/tree, /projects/:id/documents
- Add folders.js routes: GET/POST/PUT/DELETE /folders, /folders/:id/tree, /folders/:id/documents
- Update documentService.js to support projectId/folderId with backwards compat (libraryId)
- Update routes/index.js to mount new routers
- Maintain backwards compatibility with legacy libraryId
- All endpoints tested and working
2026-03-28 13:07:09 +00:00
Hiro
9496fc8e36 feat: Add Projects and Folders UI (SimpleNote v2)
- New Projects view (projects.js): Lists all projects with cards
- New ProjectView (projectView.js): Project dashboard with folder tree
- Updated API client: Projects and Folders CRUD methods
- New modals: NewProjectModal, NewFolderModal, MoveToFolderModal
- Edit/Delete project functionality
- Updated navigation: ProjectList -> ProjectView -> FolderView
- Consistent dark theme styling

Changes:
- public/js/views/projects.js (NEW)
- public/js/views/projectView.js (NEW)
- public/js/api.js (added Projects/Folders API methods)
- public/js/app.js (added navigation routes)
- public/js/components/sidebar.js (added Projects link)
- public/css/style.css (added project/folder styles)
2026-03-28 13:03:23 +00:00
Hiro
d7bb018c83 fix: prevent event propagation issues in sidebar and editor
- Add type=button to Cancel/Save buttons in editor to prevent form submission
- Add href=# and return false to quick-links to prevent default anchor behavior
- StopPropagation was already present in sidebar handlers (verified)
- Document view buttons already had type=button (verified)

These fixes ensure:
- Library/tag clicks don't bubble up and trigger wrong handlers
- Quick-link buttons don't cause unexpected navigation
- Editor buttons don't accidentally submit forms
2026-03-28 12:45:22 +00:00
Hiro
929c658e45 UX: Clarify document/library creation flow
- Replace direct 'New Document' with modal wizard that asks for library first
- Separate 'New Document' (📄) and 'New Library' (📁) buttons in header
- Update sidebar quick links to show both options with clear icons
- Add modal for library creation with name input
- Add CSS for form-control and modal-close button styling
- Minor improvements to document.js (type=button, event.stopPropagation)
- Keyboard shortcut Ctrl+N now opens document creation modal
2026-03-28 12:41:21 +00:00
Hiro
47e4394433 fix: extract libraries array from API response in editor
Some checks failed
Proyectos/simplenote-web/pipeline/head There was a failure building this commit
2026-03-28 12:30:55 +00:00
Hiro
76d19d3bc7 fix: extract arrays from API response objects 2026-03-28 12:27:15 +00:00
Hiro
98e9eb3fb4 fix: set token before making auth verify request 2026-03-28 12:22:37 +00:00
Hiro
461a17bc45 fix: multiple critical bugs in frontend
- sidebar: fix library/tag selection event handlers not firing (callbacks never invoked)
- sidebar: fix handleSelectLibrary always passing empty string instead of library id
- dashboard: fix tag filter not persisting when navigating from document view
- app: fix XSS vulnerability in showToast (API error messages not escaped)
- app: fix XSS vulnerability in confirmDelete modal message
- document: fix path traversal risk in export filename
2026-03-28 12:06:16 +00:00
Hiro
af7f639c20 fix: login form handlers not executing on innerHTML injection 2026-03-28 11:56:21 +00:00
Hiro
538e99adab fix: add public/ folder to Dockerfile 2026-03-28 11:52:47 +00:00
Hiro
86ec06c2d5 chore: update package-lock.json with marked dependency 2026-03-28 11:49:25 +00:00
Hiro
c4921c8e73 feat: add frontend UI for SimpleNote Web
- Vanilla JS frontend with dark theme
- Dashboard with sidebar (libraries tree, tags), document grid, search
- Document viewer with markdown rendering and metadata panel
- Document editor with split write/preview and formatting toolbar
- Login screen with token authentication
- All styled according to UI/UX specs (dark theme, accent #00d4aa)
- API client for all endpoints
- Responsive design
2026-03-28 11:44:42 +00:00
Hiro
c3e48596f3 chore: add generated admin token to env files 2026-03-28 11:36:45 +00:00
Hiro
bc6e00e654 fix: remove data/ from .dockerignore
Some checks failed
Proyectos/simplenote-web/pipeline/head There was a failure building this commit
2026-03-28 11:25:25 +00:00
ff6170bfa2 Update Jenkinsfile
Some checks failed
Proyectos/simplenote-web/pipeline/head There was a failure building this commit
2026-03-28 11:19:43 +00:00
Hiro
a5a1563f6e fix: change PROJECT from darroyo to proyectos 2026-03-28 11:13:08 +00:00
Hiro
7973d02a4f fix: update Jenkinsfile with correct sshagent and deploy syntax 2026-03-28 11:11:41 +00:00
Hiro
d1dbd22766 feat: add Jenkinsfile for CI/CD 2026-03-28 11:11:09 +00:00
Hiro
102cf899f1 feat: add Docker configuration for deployment 2026-03-28 11:09:39 +00:00
Hiro
75f67c0b11 fix: adminOnly checks isAdmin flag from stored tokens 2026-03-28 03:37:43 +00:00
Hiro
08a88b5e06 feat(ui): add UI/UX design specification for SimpleNote Web
- SPEC.md: Complete UI/UX specification with design principles,
  layout architecture, interaction patterns, data flow, and
  accessibility requirements
- VIEWS.md: Text-based wireframes for Dashboard, Document Viewer,
  Document Editor, and Library Browser views (desktop and mobile)
- COMPONENTS.md: Reusable component library with buttons, inputs,
  cards, tags, navigation, modals, and feedback components
- STYLES.md: Style guide with design tokens (colors, typography,
  spacing), global styles, animations, responsive breakpoints,
  and dark mode implementation

Design follows dark mode first approach inspired by Mission
Control dashboard, with full mobile responsiveness.
2026-03-28 03:36:23 +00:00
Erwin
82391ee079 docs: add TESTING.md with API testing guide 2026-03-28 03:32:19 +00:00
Erwin
8b0b60db33 fix: add missing libraryService.js and fix two bugs
- Create missing src/services/libraryService.js (was imported but never created)
- Fix readJSONFile import in tagIndexer.js (unused import)
- Fix found.found?.libId typo in deleteDocument (double .found lookup)

These were blocking the application from starting.
2026-03-28 03:31:14 +00:00
Erwin
825dfba2a7 Implement SimpleNote Web API - full REST API with Express
- Express server with CORS, JSON middleware
- Auth middleware (Bearer token)
- Document CRUD with markdown storage
- Library CRUD with nested support
- Tag indexing and search
- Error handler middleware
- Config from env vars
- Init script for data structure
2026-03-28 03:27:27 +00:00
Erwin
0e244d2b30 feat: basic entry point and health check 2026-03-28 03:14:22 +00:00
Erwin
e123bf596b Initial project structure 2026-03-28 03:13:43 +00:00
c53aad9061 Initial commit 2026-03-28 03:07:55 +00:00