📜 ⬆️ ⬇️

Online Notepad note-pad.net



I present to your attention the web service note-pad.net , designed to replace a simple paper notebook. I wanted to make it so that you could just open the site, write something down and close it. My notebook consists of a large text field on the entire screen and columns of buttons on the right, intended for turning the pages.

There are 36 pages in total in the notebook, they cannot be added or deleted. If you need more pages, you can get a few notebooks. Just like in life.
')
Initially, the site had a minimum of options, but in two years it has acquired good functionality: autosave, encryption in the browser, downloading the notebook as a file, shortcuts, clicking on links from the notebook, sorting pages by dragging, searching, flexible customization of the appearance. However, this does not complicate the use of notebook.



In this article I will try to talk about the development of the service and its technical features.

Editor

The heart of the service is the text editor. It would seem that there is difficult? By pressing the button we send the text to the server, that's all.



In fact, everything is more complicated. After the user has clicked "Save", he can continue typing the text. As a result, when a response comes from the server, the text in the field will already be unsaved. Autosave, page navigation, user attempts to leave the site or close a tab are imposed on this complexity. Great effort is to ensure that the unsaved text is not going anywhere, and the wrong text will not wipe the correct one.

Indication of the status "saved / not saved", as well as the process of exchanging data with the server also has nuances. On the one hand, the display should always be visible, so that the user knows whether the text is saved or not. On the other hand, when autosave is enabled, this display often blinks and distracts from text editing. In the current implementation, when autosave is on, no display is shown by default. To view the current status, you can hover the mouse over the save button or press the key combination corresponding to the save. In case of any problems with the connection, the site notifies the user that autosave is impossible and he needs to take care of the integrity of the text on his own.

Authorization and registration



Initially, there was no authorization on the site. Each notebook had a unique link with a secret code. To access the notebook was enough to open this link. Such an opportunity is now. When a user first enters the site clicks the button “Create notepad”, a notepad is created with access by reference. Due to this, there is no need for authorization to use the service.

Then the Loginza widget appeared on the site, allowing you to log in using an account on one of the popular sites or using OpenID. When I implemented this method, it seemed to me that this was quite enough. However, after some time, complaints from users fell down: the proposed method turned out to be unusual and inconvenient. There were both psychological and constructive problems. For example, Yandex, by default, will offer to remember access permission, so that after the first entry, Yandex no longer has any questions. Logging in is really easy, but getting out is not very. When you exit the account on the site, the user remains logged in to Yandex and can re-enter the site with two clicks, which reduces the data security. And authorization using another Yandex account becomes a non-trivial task: you need to go directly to Yandex and re-login. Users are accustomed to the fact that authorization on one site does not affect authorization on another, and this behavior seems to them unobvious.

For me personally, OpenID is very convenient, but at some point I was tired of torturing users and I still realized a warm tube registration with a login and password. Oddly enough, this is the most convenient option for users.

Each authorized user can create several notebooks and specify a name for each of them. Notebooks that have become unnecessary can be deleted. Each notebook can be customized:



Encryption

I added encryption quite recently. I know that paranoids read me (I hope they were not very frightened by this phrase), and this feature is designed specifically for them. Encryption works using the AES algorithm, using the Crypto-JS library. The user's password is not transmitted to the server at all, and the text is transmitted only in encrypted form.

Other features

You can customize the hot keys, corresponding to saving, page turning, clicking on the link under the cursor. In addition, you can click on the link by clicking on the link with Ctrl pressed. This allows you to use notepad as a bookmark storage.

You can adjust the colors of all interface elements, disable the display of icons and page numbers.

The user can search for text on their notebooks.

The server makes a daily backup of data on Amazon S3, which significantly reduces the likelihood of accidental data loss. You can also take care of the safety of your notebook: there is an easy way to download the entire notebook as a text file.

API

The browser communicates with the server using a simple JSON-based API. In the reference section of the site there is a description of API methods. So enthusiasts can integrate the site with anything. True, some methods for full functionality are not enough there, but if there are enthusiasts, we will fix this.

Development

I did the site alone. The first working version appeared in March 2010 and was a simple PHP script added to the page of my main site.

The main driving force for development was that I used the site myself. There were few users (and now there are few). A year later, I braced myself and rewrote the client part, bringing some order to the chaos that settled there. Then I created a project in Reformal for user feedback. They told me a few things that the service lacked.

And last month, I braced myself and rewrote the server part using Ruby on Rails. Still, adding new features to the PHP code two years ago, which you look into once a month, is very difficult. By the way, the server side is very simple, its complete rewriting took me only one day.

And finally, my notebook has grown to the level at which it is not a shame to show it to the habrasoobschestvu. I hope that the discussion in the comments will be fruitful, the ranks of users of the site will be replenished, and my works will gain meaning.

I have no plans for monetization. I do not want to add advertising. Do not really want to do some of the functionality of the paid. But if attendance increases and hosting costs increase, you will have to think of something.

In the future we plan to implement the following functions:I have it all. Enjoy using the online notepad.

Source: https://habr.com/ru/post/138575/


All Articles