Amir Daniali

Back

Articasso#

Art is worth enjoying before the robots take over.

Website screenshot

How Articasso Was born#

Articasso was born as a simple necessity. I had recently signed up for a course about python data analysis and they wanted me to show I knew web technologies to jump to the python track. I was told I could choose a topic about comics, weather, music, art or coffee. I decided to build a website to showcase real human art. I used the Chicago art museum API to get the data.

Artic Screenshot

The Chicago Art Museum website - Artic website

The Tech Stack#

I had used SSR (Server Side Rendering) with Django and templating languages like Jinja2 and HTML. I also used CSS and bootstrap to make the websites look good. But I had always stayed away from JavaScript. I wanted to learn it and build something with it. So this project had to stick javascript to the end. Everything had to be done with vanilla javascript. I used the fetch API to get data from the API they wanted me to use.

initial architecture of the site

The Visual Components#

I wrote custom js components multiple layers deep to make the website responsive. Everything had accessible event listeners and was built with the DOM API. I used js to create visuals like loader components, card components, and entire pages after fetching data from the API. I had to replace all the templating logic I had used with Django myself, with custom components written with javascript. I loved the experience of building something with javascript. It was a lot of fun to poke around and get to know the clientside that I had kinda ingored for so long.

The Routing System#

I wanted the website to be fast and entirely clientside so I wouldnt have to setup a server and so the routing system was written in vanilla javascript. I wrote a custom SPA routing system to navigate between pages. I handrolled a custom routing system that could pass parameters around and keep track of the current view along with a history stack and back button. It all worked as a real SPA with using forward slash like most sites use instead of hash (#) based routing which I’m not a fan of. The routing system turned out very simple and easy to understand while very durable and flexible.

The State Management#

Up until this point I had used react that handled the state for me. I had never worked with js state management before so I had to learn it. I didn’t want to import anything from npm because I wanted to keep the website as simple as possible. I had to write my own state management system. I wrote a fancy singleton class system that would assuredly be the only instance of the state management system running at any given time. It had sensible apis to load and save the state to indexedDB. The reason I chose to use indexedDB over localstorage is because I wanted to be able to handle multiple gigabytes of image data and wanted it to persist even after the browser was closed. LocalStorage is what I had used before and I wanted to see if I could do it with indexedDB.

I also wrote a custom sessionState class that would keep track of the user’s previous routes. This allowed the custom routing system to know what page the user was on before if they clicked a back button.

What I Learned#

I learned a lot about javascript and web development. I learned how to write a custom routing system, state management system, and a custom SPA framework. I also learned how to use indexedDB to store data locally. I also learned that a javascript app with 50+ js files being loaded is not a good idea. So I used esbuild to bundle all the js files into one file for distribution. The end result was a much smaller bundle size and a much faster website, loading extremely fast and without any errors.

The Outcome#

Finally the project was done. Articasso.org was a success. I added a small flask app to host it locally and published it via github pages online. I got so many good people reaching out and telling me about how they liked being immersed in the art world. I had a lot of fun building it and I learned a lot about javascript and web development. I really liked being able to build something that showcased real art made by people around the world. I hope to continue working on it and add more features.

Website screenshot

Articasso.org as viewed on an iMac

picture

The front page of Articasso.org

Articasso
https://amirdaniali.com/projects/articasso/
Author Amir Daniali
AI Disclaimer Fully human! No AI was used.
Published at September 9, 2025