• Johnson Manasseh

  • Let's grow together

Phone

0123 456 789

Address

121 King Street, Melbourne Victoria 3000 Australia

Building a Full-Stack Web App in 45 Days – Day 35 (Designing and Building the Frontend)

With just 10 days left to complete the project, it’s time to focus on the frontend, the part users see and interact with. After setting up a secure backend, the goal now is to create a smooth, responsive, and user-friendly interface using Next.js and Tailwind CSS.

In this blog, I’ll share how I designed the UI in Figma, built components in Next.js, and connected it with the backend.

Why I Chose Next.js for the Frontend

I picked Next.js for its simplicity and performance benefits. It makes handling routing, data fetching, and server-side rendering easy, which improves both user experience and SEO. Here’s why it works well for this project:

  • Server-Side Rendering (SSR) – Pages load faster and are better optimized for search engines.

  • Static Site Generation (SSG) – For parts of the app that don’t need frequent updates, SSG helps reduce load times.

  • API Routes – Next.js allows setting up backend endpoints directly within the frontend project.

  • Easy Routing – File-based routing makes it easier to manage pages without extra configuration.

Next.js simplifies the development process and improves the app’s overall speed and efficiency.

Designing the UI with Figma

Before writing any code, I planned out the UI in Figma. Starting with low-fidelity wireframes, I focused on the structure and user flow — making sure navigation is simple and intuitive.

Once the flow was clear, I refined it into a high-fidelity design, adding consistent colors, typography, and spacing. My goal was to keep the interface minimal and clean while ensuring it’s easy to use.

Key design decisions:

  • Simple Navigation – Users should quickly find what they need.

  • Consistent Color Palette – Ensuring a visually cohesive look.

  • Accessible Design – Making sure the app is easy to use for everyone.

Figma made it easy to adjust the design and test different layouts before starting development.

Using Tailwind CSS for Styling

For styling, I went with Tailwind CSS because it allows me to apply consistent styles directly in the JSX code. Its utility-first approach makes it easier to customize and maintain styles across the app.

Why Tailwind works well:

  • Reusable Styles – Used Tailwind’s class-based system to create consistent buttons and forms.

  • Dark Mode Support – Enabled dark mode with Tailwind’s built-in support.

Tailwind reduces the need for writing custom CSS files and keeps the code organized.

Facebook
Twitter
LinkedIn

Structuring the Frontend Components

To keep the project scalable, I followed a component-based structure:

  • Pages – Each route has its own file in the pages/ directory.

  • Components – Reusable UI elements like buttons, inputs, and cards.

  • Layouts – Wrappers for consistent headers, sidebars, and footers.

  • Hooks – Custom hooks for managing state and logic.

  • Utils – Utility functions for formatting, API calls, and state handling.

This structure helps keep the codebase organized and makes it easy to add new features.

Connecting the Frontend with the Backend

To handle data flow between the frontend and backend, I used Axios for API calls.

For security and performance:

  • Used JWT tokens to secure API calls.

  • Set up a global loading state to provide feedback while data is being fetched.

  • Handled errors with clear user messages.

Next.js’s built-in API routes also simplified setting up some backend functionality directly within the frontend.

Challenges and How I Solved Them

Building the frontend wasn’t completely smooth — here are some issues I ran into and how I handled them:

  • Performance Issues – Used useMemo, React.memo and useCallback to improve efficiency and prevent unnecessary re-renders.

  • CORS Errors – Adjusted backend settings to allow secure cross-origin requests.SEO Handling – Used next/head to improve metadata and make pages more SEO-friendly.

Skyrocket your customer base with our digital marketing specialists

Get a free consultation
limited time

Next?

With just 10 days left, the next focus is on improving performance and responsiveness. In the next blog (Day 42), I’ll share how I optimized the app’s load time and made it more responsive. Stay tuned!

 

“Don’t miss out on our latest computer science, technology, lifestyle, and design updates! Keep our notifications on to stay up-to-date.”

Want to get weekly knowledge ?

Get notified whenever we post new stuffs.