Week 2 Building Treazurex — Lessons from the Backend and Beyond



This content originally appeared on DEV Community and was authored by Raimi Dikamona Lassissi

Hey devs! 👋

Welcome to my second weekly update on building Treazurex, a web application I’m building with React + Vite on the front-end and Node.js + PostgreSQL on the back-end. If you missed the first week’s post, this project is all about learning through doing, building out a full-stack shopping experience while picking up best practices along the way.

Original Plan vs. Reality

At the start of the week, my plan was simple:
Build the homepage and the shop page.

But like many development journeys, I quickly realized that I had overlooked an important foundation, my back-end and database setup were still incomplete. Without a solid schema and working back-end logic, there was no way I could reliably fetch and display real product data on the front-end.

So I shifted gears. Instead of pushing forward on the UI, I decided to focus on getting the data layer right first.

Thinking Through the Data

I started by creating the missing tables in my PostgreSQL database. I took time to think carefully about:

  • What each table represents
  • What columns are necessary
  • What valid data should look like
  • How the tables should relate to each other

This exercise really helped me sharpen my understanding of relational database design. I found myself constantly thinking in terms of primary keys, foreign keys, data types, and referential integrity.

Once the tables were in place, I moved on to creating model files for each table — functions that allow common operations like inserting, updating, deleting, or querying records. This part was a bit repetitive, but it also reinforced some important patterns in working with raw SQL in Node.js.

As tedious as it felt at times, I believe that repetition builds mastery and I definitely came away with more confidence in writing data access logic.

Looking Ahead: Exploring ORMs

While writing models manually helped me understand the underlying logic of data access, it also made me curious about how to work more efficiently in the future.

I came across a concept called Object-Relational Mapping (ORM), a technique that allows you to interact with your database using object-oriented code instead of raw SQL. Tools like Sequelize, Prisma, and TypeORM promise to reduce boilerplate and make database queries easier to manage.

Though I haven’t used an ORM on Treazurex yet, it’s definitely something I want to explore in future projects. It seems like a smart way to stay productive while keeping code clean and readable.

Back to the Front-end


Once I had a more stable back-end and database schema in place, I returned to the front-end to design the look and feel of the home page.
I wanted the page to be:

  • Clean and visually appealing
  • Easy to navigate
  • Fully responsive across devices

Using Tailwind CSS, I styled the components with flexibility in mind. Tailwind’s utility-first approach really helped me iterate quickly, experiment with layouts, and make small visual adjustments without writing custom CSS classes.

Although the front-end part was less complex than the back-end this week, it reminded me that presentation matters just as much as functionality, especially for user-facing features like a homepage.

What I Learned This Week

Week two was a mix of challenges, insights, and progress. I gained a deeper appreciation for:

  • Database design: carefully planning tables, columns, and relationships can save a lot of headaches later.

  • Repetition as a teacher: writing similar model logic manually might be repetitive, but it solidified my understanding of CRUD operations.

  • Tailwind CSS: how utility-first styling can make responsive design faster and more intuitive.

  • The importance of flexibility: it’s okay to shift plans if your foundation isn’t ready yet.

What’s Next?
In the coming week, I’ll be focusing on:

  • Completing the shop page
  • Building out the product details page

Both of these will involve tying the front-end to real data and ensuring that the design remains consistent and responsive.

I’m excited to see how Treazurex evolves from here. One week, one decision, and one improvement at a time.

Thanks for following along! Feel free to share your own experience building apps or any tips on working with databases or styling with Tailwind. 😊

GitHub Repo


This content originally appeared on DEV Community and was authored by Raimi Dikamona Lassissi