A lightweight, offline-first notes application built with HTML, CSS, and vanilla JavaScript.
MyNotes runs directly in the browser, stores notes locally, and can optionally be installed as a Progressive Web App (PWA) on supported devices.
No backend or database server is required.
Try MyNotes directly in your browser. No installation or account is required.
-
Create, edit, and delete notes
-
Search notes by title or content
-
Sort notes by:
- Recently updated
- Recently created
- Title AβZ
- Title ZβA
- Manual order
-
Drag and drop notes when manual sorting is enabled
-
Light and dark themes
-
Custom note colors
-
Character counters for titles and note content
-
Client-side form validation
-
Confirmation dialogs for destructive and data-changing actions
-
Toast notifications
-
JSON backup and restore
-
Responsive interface for desktop and mobile devices
-
Local data persistence using
localStorage -
Offline-capable Progressive Web App
-
Optional PWA installation on supported browsers and devices
-
Native file sharing on supported mobile browsers
-
No backend required
MyNotes is more than a simple notes application. It is also an example of how modern web technologies can be used to build a practical cross-platform application without introducing a backend or a complex development environment.
The project demonstrates how:
- HTML can provide the application structure.
- CSS can create a responsive and themeable user interface.
- Vanilla JavaScript can handle application state and user interactions.
localStoragecan provide persistent client-side storage.- Browser APIs can provide file handling and native sharing capabilities.
- A Service Worker can provide offline functionality.
- A Web App Manifest can make the application installable as a PWA.
The same application can therefore be used in two different ways:
No installation is required. Open the application and start using it.
On supported browsers and devices, MyNotes can be installed and launched as a standalone application.
MyNotes deliberately uses a lightweight technology stack:
- HTML5
- CSS3
- Vanilla JavaScript
- Bootstrap
- Bootstrap Icons
- Web APIs
- LocalStorage
- Service Worker
- Web App Manifest
There is no frontend framework, backend API, database server, package manager, or build pipeline required to run the application.
Bootstrap and Bootstrap Icons are included locally in the repository, so the application does not depend on external CDN resources at runtime.
The application is primarily built around three source files:
index.html
css/style.css
js/app.js
Their responsibilities are intentionally separated.
Defines the application structure and user interface.
It contains:
- Application header
- Search and sorting controls
- Notes container
- Note editor modal
- Confirmation modal
- Toast container
- PWA metadata
- References to CSS and JavaScript resources
Contains the application's custom styling.
It is responsible for:
- Application layout
- Responsive behavior
- Light and dark themes
- Note card styling
- Note colors
- Modal customization
- Drag-and-drop visual states
- Mobile-specific adjustments
- Toast styling
Bootstrap provides the general UI framework, while style.css contains the application-specific design.
Contains the application's behavior and business logic.
It handles:
- Application initialization
- Application state
- Note creation, editing, and deletion
- LocalStorage persistence
- Searching
- Sorting
- Drag-and-drop ordering
- Theme management
- Form validation
- Character counters
- Backup and restore
- Browser API integration
- Modal and toast interactions
- Keyboard shortcuts
MyNotes/
β
βββ index.html
βββ manifest.json
βββ service-worker.js
βββ favicon.png
β
βββ css/
β βββ bootstrap.min.css
β βββ bootstrap-icons.css
β βββ style.css
β β
β βββ fonts/
β βββ bootstrap-icons.woff
β βββ bootstrap-icons.woff2
β
βββ js/
β βββ bootstrap.bundle.min.js
β βββ app.js
β
βββ screenshots/
β βββ my-notes-screenshot.png
β
βββ README.md
βββ LICENSE
βββ .gitignore
The application itself is primarily implemented in index.html, css/style.css, and js/app.js.
Bootstrap and Bootstrap Icons are included locally as vendor dependencies.
MyNotes does not require a remote database.
Notes are stored in the browser using the Web Storage API, specifically localStorage.
The application stores the notes under the following storage key:
const STORAGE_KEY = "notes_app_data";The selected theme is stored separately:
const THEME_KEY = "notes_app_theme";This approach allows the application to preserve notes and preferences between browser sessions.
Because the data is stored locally, the notes are associated with the browser and device where they were created.
To avoid relying entirely on browser-local storage, MyNotes provides a JSON backup and restore mechanism.
The application serializes the current notes array into JSON and creates a backup file.
On supported mobile browsers, MyNotes uses the Web Share API when possible.
On browsers where file sharing is unavailable, the application falls back to a standard browser file download.
A previously created JSON backup can be selected from the device.
The application:
- Reads the selected file.
- Parses the JSON data.
- Validates the imported notes.
- Normalizes the data.
- Requests confirmation from the user.
- Replaces the current notes with the restored data.
This provides a simple way to move notes between devices or preserve them independently of browser storage.
MyNotes includes the basic components required for a Progressive Web App:
manifest.json
service-worker.js
The Web App Manifest provides installation metadata, while the Service Worker enables the application to operate offline after the required resources have been cached.
On supported browsers and devices, users can install MyNotes and launch it as a standalone application.
The application does not require a native Android, iOS, Windows, or macOS installation package.
MyNotes does not require a build step.
However, because the application uses PWA functionality such as a Service Worker, it should be served through a local web server rather than opened directly with the file:// protocol.
For example, after cloning the repository, the project can be served using any simple static web server.
The application can then be opened in a browser through a local HTTP address.
MyNotes demonstrates the use of several standard browser APIs.
Used for persistent local application data.
Used to create and read JSON backup files.
Used to provide native file sharing on supported mobile browsers.
crypto.randomUUID() is used when available to generate unique note identifiers.
Used to support offline application behavior.
Used extensively for rendering notes, handling events, updating the interface, and managing application state.
MyNotes is a client-side application and does not send notes to a remote server.
User-entered content is escaped before being inserted into generated HTML to reduce the risk of HTML injection.
For example, the application uses an escapeHtml() helper before inserting note data into the interface.
Because notes are stored in browser-local storage, users should understand that clearing browser data can remove locally stored notes.
The built-in JSON backup feature can be used to preserve or transfer data.
MyNotes follows a simple principle:
Build a useful application with the platform before adding unnecessary complexity.
The project intentionally avoids a framework and backend so that the underlying browser technologies remain visible and understandable.
This makes the project suitable as both a practical application and a learning example for developers interested in:
- Cross-platform web applications
- Progressive Web Apps
- Offline-first development
- Client-side data storage
- Vanilla JavaScript
- Responsive web design
- Browser APIs
- Static web hosting
Contributions, suggestions, and improvements are welcome.
If you find a bug or have an idea for improving MyNotes, please open an issue or submit a pull request.
Before submitting a pull request, please make sure that the existing functionality continues to work on both desktop and mobile browsers.
MyNotes is released under the MIT License.
See the LICENSE file for the complete license text.
