Categories: UI/UX, Frontend, Backend, DevOps
Tools: Angular, Socket.io, Express, Jest, Cypress, GitHub Actions, MySQL
Project Overview
What: Real-time, full-stack Todo list web application that allows users to create, manage, and share lists with others.
Why: To practice building a full-stack application with real-time capabilities and to learn how to integrate websockets into a project.
Long-term Goal: To create a productivity tool that helps users manage their tasks and collaborate with others in real-time.
Background
Listet was a project I started working on 2020 as went into lockdown. I was experiencing burnout from UI Design and being increasingly drawned into different aspects of web programming. I had just finished Advance Interactive which at the time focused on teaching JavaScript via the JQuery library, my professor however let me use vanilla JavaScript (as a challenge) for most of his assignments since I have proven to be very familar with JQuery. Thanks to that I felt more comfortable attempting to learn a JavaScript framework at the same time I wanted to learn some more backend development.
Early in my journey to learning web development (2014) I stumbled on the MEAN stack (Monogo, Express, AngularJS, and NodeJS) and found some tutorial to make a message board. I had a basic understanding of how things worked on the web application but other aspects were still not registering for until I finally learned javascript. With that in mind I had decided I was probally going to use that tech stack to build listet. I had know Angular was in version 9 what I wasn't aware was that Angular version 2 and later was no longer the AngularJS I used back than so all the resources I was initially looking into were no longer valid. Eventually, after having a look around some other popular js framework (mainly React and Vue), I found an Angular 8 crash course by Gary Simon (Design Course) showed me the basics I needed to start working with angular.
The idea was just to create a simple todo list web app so I could learn how to work with angular and express so I could create a full stack application. Along the way the application evolved to a web app that has user authentication, real-time interactions, and CRUD operations for: users, lists, items, and comments.
Logo
Colors
#EDD135
rgb(237,209,53)
#131313
rgb(19,19,19)
#F8F8F8
rgb(248,248,248)
#707070
rgb(112,112,112)
#EDEDED
rgb(237,237,237)
#2A9D32
rgb(42,157,50)
#E83518
rgb(232,53,24)
UI Design
While designing the app was not the main focus of this project, I wanted to create a clean and intuitive user interface that would make it easy for users to create, manage, and share lists. In the process, I wanted to instill some of the principles of good UI/UX design that I have learned over the years and improve my design skills in general.
Listet was the introduction for me to adopt a component-first approach to design. Since Angular's architecture encourages the creation components within a page layout. During my design phases of different featues I create many components, pages, and user flows. Some of them can be seen below:
Development
I wanted to break out of "tutorial hell", so I challenged myself to not watch any direct tutorial building out full applications or similar components. Instead videos and articles I consumed were more relating to learning more about the fundelmentals of the programming languages I was using.
The codebase is split between two different repos (backend and frontend). The backend consisted of ExpressJS, MySQL, and Socket.io. I had used Express a few times in the past but never to fully create a backend api from scratch. The challenge was creating a RESTful API to handle business logic and data storage.
My initial process consisted of designing the some of the frontend componets and implementing the backend api. I was doing that while it work for some of the basic features, as the complexity of the app grew I found that I need to have a better understanding of the frontend and backend interactions. I started to write the features I wanted to implement so I could have a better understanding of the data flow between the frontend and backend. From that I was able find out the project requirements so I could steamlined the development process. This led to a major refactor of the backend api and the frontend components.
Database Schema
One of pivotal moments in the development of Listet when I started to Learn about database design. Prior to implementing MySQL in the project I was using hardcoded mocked data to create the frontend interactions. As I started creating database tables for the API I learned about creating relationships between tables. While I was doing at first worked, a mentor of mine leaded me in a different direction that would make the database more efficient and easier to manage.
erDiagram USERS { int id text avatar text lastName text email text username text firstName int admin int deactivated text PASSWORD text verification_status varchar(30) reset_token } SESSIONS { int id bigint expires mediumtext data varchar(128) session_id } LISTS { int id varchar(70) slug text name text description datetime creation_date datetime deadline int visibility int allow_comments int is_complete int featured int user_id } LIST_ITEMS { int id text item datetime deadline int completed int list_id } LIST_COMMENTS { int id text comment datetime creation_date datetime date_updated int user_id int list_id } VIEW_LISTS { int id varchar(70) slug text name text description datetime creation_date datetime deadline int visibility int allow_comments int is_complete int featured text firstName text lastName text owner_username int owner_id int deactivated } VIEW_LIST_ITEMS { int id text item datetime deadline int completed varchar(70) slug int owner_id text username int deactivated } VIEW_COMMENTS { int id text comment datetime creation_date datetime date_updated int author_id text username text firstName text lastName int list_id int list_owner_id text slug int deactivated } USERS ||--o{ SESSIONS : "has" USERS ||--o{ LISTS : "creates" LISTS ||--o{ LIST_ITEMS : "contains" LISTS ||--o{ LIST_COMMENTS : "has" VIEW_LISTS ||--o{ VIEW_LIST_ITEMS : "aggregates" VIEW_LISTS ||--o{ VIEW_COMMENTS : "aggregates"
Takeaways
- Websockets: I learned how to use websockets to create real-time applications.
- Full-Stack Development: I gained experience building a full-stack application from scratch.
- User Authentication: I implemented user authentication using server-side sessions and signed cookies.
- Testing: I wrote unit and integration tests for the frontend and backend of the app.
- Deployment: I deployed the app to Heroku and used GitHub Actions for continuous integration and deployment.
- Database Management: I used MySQL to store user data and list information.
- UI/UX Design: I designed the user interface and experience for the app using Angular Material.
- Error Handling: I implemented error handling for various scenarios, such as invalid user input and server errors.
- Security: I implemented security best practices, such as input validation and password hashing.
Next Steps
I've been periodically updating Angular as new versions cameout. When I upgrade to version 18 I had to refactor a lot of the codebase. I found that version 18 has a lot of new feature that I could take advatage off. Including better SSR support. The next step for List is to combine the api and the frontend into a single repo because the current setup leads the codebases to be frequently out of sync. I also want to add more features to the app, such as notifications, reminders, and an improved user profiles.
Conclusion
Listet was a great learning experience for me. I was able to build a full-stack application from scratch and learn about websockets, user authentication, and database management. I also improved my UI/UX design skills and learned how to write tests for the frontend and backend of an app. I'm proud of what I was able to accomplish with it. This project was what pushed me to pursuing software development as a career.