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