Inspiration

I was inspired by my daughter who loves to create and share her work online. She frequently brings home artwork from school, takes photos on her iPad, and makes digital artwork in apps and games. I created a WordPress site for her but it is difficult for her to use and I have become a bottleneck for posting her work. Popular photo-sharing apps and social media sites make it easy for creators to share but they can be harmful when monetization or user-engagement trump what's best for the user's mental health: https://www.wsj.com/articles/facebook-knows-instagram-is-toxic-for-teen-girls-company-documents-show-11631620739

What it does

NightlightCMS allows creators to easily share their work online in a positive environment they control. Creators can easily open the web page and upload photos from their camera or photo roll. There are only two things the creator needs to enter: title and description (description is optional). The app resizes uploaded photos into three different sizes for responsive viewing.

Visitors that want to see the creator's work can visit their NightlightCMS home page where they are greeted with images of the creator's work arranged in a Pinterest-like Masonry layout. Visitors can see the creator's work without logging in and without ads. Clicking an image on the home screen will show the visitor a larger image along with the title and description of the work.

How I built it

I started by provisioning an AWS T4g instance running Ubuntu 20 LTS. I did a smoke test of the binary dependencies I needed to make sure they would run OK on the AWS Graviton instance. These include Node.js, MongoDB, and Sharp. Sharp is a Node.js image manipulation library that uses libvips under the hood. All the dependencies worked great on my Graviton instance.

I built the application on Node.js with Express and it is mostly server-side. The client-side JavaScript is minimal and mainly consists of the Masonry layout library. I used Pico.css to provide minimalist styling of the native HTML elements.

For the database, I chose to install MongoDB on the same instance with the app. If the app ever needs to be scaled, the database could be easily moved to Amazon DocumentDB or some other MongoDB service.

Challenges I ran into

I had a tough time setting up authentication with Express. It is not a differentiating feature of the app but it's necessary and tough to implement because some of the tutorials I was using were out of date. I logged into my app successfully for the first time shortly after 2 AM at night and had to stifle a cheer.

Accomplishments that I'm proud of

I built a Node.js app from soup to nuts with image upload, image resizing, authentication, etc. I was able to deploy it to an AWS T4g Graviton instance and everything just worked.

What I learned

  • AWS Graviton is ready to deliver Node.js applications!
  • I have used Node.js for a variety of utilities and Lambda functions but this was the first time I built a full application with it and had to implement authentication.

What's next for NightlightCMS

  • TLS/HTTPS - shouldn't be hard but I ran out of time.
  • E-commerce options so creators can sell their work. I am thinking of QR codes at clothesline art festivals so when consumers see art they like in person, they can easily find and order it online (or NFTs).
  • Develop a positive environment for creators to grow: Badges for milestones (number of works, etc.), positive feedback mechanisms, etc.
  • Provide a service so creators can fill out a form to provision their own NightlightCMS instance on the host of their choice with limited technical knowledge. I.e., Cloudformation script.
  • A better app UX design and experience
  • A mobile app so creators can publish content from mobile devices even easier than using the web interface.

Built With

Share this project:

Updates