A modern, interactive sticky notes application built with React, TypeScript, and Vite. Create, edit, organize, and delete notes with a beautiful drag-and-drop interface.
- Create notes - Click anywhere on the dashboard to create a new note
- Edit text - Double-click on a note to edit its content
- Move notes - Drag and drop notes anywhere on the screen
- Resize notes - Drag the bottom-right corner to resize (150-400px)
- Delete notes - Drag notes to the trash area at the bottom to delete
- 5 colors - Choose from yellow, green, blue, pink, or purple
- 3 sizes - Small (150x150), Medium (200x200), Large (300x300)
- Persistent storage - Notes are saved to localStorage automatically
- Z-index management - Click a note to bring it to front
- Visual feedback - Notes turn red when hovering over trash
- Easy deletion - Drag and drop to delete
- Trash indicator - Pink background shows trash area
- Interactive guide - Click the "?" button for instructions
- 7 steps tutorial - Learn all features quickly
- Node.js 18+
- npm or yarn
# Clone the repository
git clone https://github.com/programistka/stickynotes.git
cd stickynotes
# Install dependencies
npm install
# Start development server
npm run devThe app will be available at http://localhost:5173
- Select a color from the color picker (top-left)
- Select a size: Small, Medium, or Large
- Click anywhere on the dashboard
- A new note appears at the clicked position
- Double-click on any note
- Type your text
- Click outside or press ESC to save/cancel
- Click and hold on a note
- Drag it to the desired position
- Release to drop
- Hover over the bottom-right corner (⇲ icon appears)
- Click and drag to resize
- Minimum: 150x150px, Maximum: 400x400px
- Click and drag a note
- Move it to the pink "Trash area" at the bottom
- Note turns red when over trash
- Release to delete
- Click the "Clear All" button in the top-right corner
- Button is disabled when there are no notes
# Run all tests
npm test
# Run tests in watch mode
npm test -- --watch
# Run tests with UI
npm run test:ui
# Generate coverage report
npm run test:coverageTest Files 8 passed (8)
Tests 58 passed (58)
Coverage ~56%
- Statements: 56.33% (160/284)
- Branches: 45.74% (43/94)
- Functions: 49.39% (41/83)
- Lines: 58.42% (156/267)
src/
├── components/
│ ├── Dashboard/
│ │ ├── Dashboard.test.tsx
│ │ └── Note/
│ │ └── Note.test.tsx
│ └── Toolbar/
│ ├── Toolbar.test.tsx
│ ├── Help/
│ │ └── Help.test.tsx
│ ├── NoteColor/
│ │ └── NoteColor.test.tsx
│ └── NoteSize/
│ └── NoteSize.test.tsx
├── hooks/
│ └── useNoteManagement.test.ts
└── reducers/
└── notesReducer.test.ts
- React 19.2 - UI framework
- TypeScript 5.9 - Type safety
- Vite 7.2 - Build tool & dev server
- React Context API - Global state
- useReducer - Complex state logic
- Custom hooks - Business logic encapsulation
- CSS Modules - Scoped styling
- Classnames - Dynamic CSS classes
- Vitest - Unit test framework
- React Testing Library - Component testing
- @testing-library/user-event - User interaction simulation
- ESLint - Code linting
- Prettier - Code formatting
- Husky - Git hooks
- Commitlint - Commit message linting
stickynotes/
├── src/
│ ├── components/
│ │ ├── Dashboard/ # Main workspace
│ │ │ ├── Note/ # Individual note component
│ │ │ └── Trash/ # Trash area component
│ │ └── Toolbar/ # Top toolbar
│ │ ├── NoteColor/ # Color picker
│ │ ├── NoteSize/ # Size selector
│ │ └── Help/ # Help modal
│ ├── contexts/
│ │ └── NotesContext.tsx # Global state management
│ ├── hooks/
│ │ ├── useNoteManagement.ts # Note interaction logic
│ │ ├── useNotesApi.ts # Mock API
│ │ └── useLocalStorage.ts # Persistent storage
│ ├── reducers/
│ │ └── notesReducer.ts # State reducer
│ ├── test/
│ │ ├── setup.ts # Test configuration
│ │ └── test-utils.tsx # Test helpers
│ ├── types.ts # TypeScript types
│ ├── utils.ts # Utility functions
│ ├── App.tsx # Root component
│ └── main.tsx # Entry point
├── vitest.config.ts # Test configuration
├── vite.config.ts # Build configuration
├── tsconfig.json # TypeScript config
├── eslint.config.js # ESLint config
└── package.json
- ✅ Hover effects on buttons
- ✅ Note turns red when over trash
- ✅ Shadow effects for depth
- ✅ Smooth animations (transitions)
- ✅ Gradient buttons
- ✅ Fixed toolbar (100px height)
- ✅ Fixed trash area (100px height)
- ✅ Flexible dashboard area
- ✅ Works on all screen sizes
# Development
npm run dev # Start dev server
# Building
npm run build # Build for production
npm run preview # Preview production build
# Code Quality
npm run lint # Run ESLint
# Testing
npm test # Run tests
npm run test:ui # Open test UI
npm run test:coverage # Generate coverage report-
Install dependencies:
npm install
-
Start development:
npm run dev
-
Run tests:
npm test -
Build for production:
npm run build