ScripDraft is a widget for typing text, such as an email, with an undo/redo system inspired by Git commits, though much simpler. The idea is just that you can choose the snapshots at which you want to be able to browse backward and then forward again. My imagined use of this app is for someone who is agonizing over writing exactly the right email to his boss or something like that.
ScripDraft is a one-man Angular 2+ project I wrote mainly circa 2021 in TypeScript. I used the Angular CLI to bootstrap the app. It does not have a backend service for storage. At the time I wrote this, I was still primarily if not exclusively a frontend developer. Therefore, it uses the browser's local storage, which means you cannot access your texts from other devices. On the plus side, there is no registering or signing in.
I used the technology stack suggested/imposed by the Angular CLI since this was one of my first Angular 2+ projects.
Compare this app with my other app https://github.com/xerocross/draft-react. Draft-react is simpler and older, and it is built on React/Redux.
It's June 2023 and I'm reviewing this code I wrote in 2021. I see imperfections, but I will probably leave this code as-is as a museum piece. It works, and nothing about it is particularly embarrassing given the time it was written.
I don't really remember my motivations for the choices I made in this app. If you examine the code, you will find that I did not use a global state engine like Redux. Instead, each component individually manages state at its own level of granularity.
This project was generated with Angular CLI version 11.2.10.
Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.
Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.
Run ng test to execute the unit tests via Karma.
Run ng e2e to execute the end-to-end tests via Protractor.
To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.