This is a solution to the Time tracking dashboard challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- Switch between viewing Daily, Weekly, and Monthly stats
- View the optimal layout for the site depending on their device's screen size
- See hover states for all interactive elements on the page
- Solution URL: https://www.frontendmentor.io/solutions/time-tracking-dashboard-with-nextjs-tailwind-storybook-vitest-eq_u9Q3ztw
- Live Site URL: https://time-tracking-dashboard-gamma-puce.vercel.app
To get a local copy up and running follow these simple steps:
Make sure you have the following software installed on your machine:
-
Clone the repository:
git clone https://github.com/jaceleedev/time-tracking-dashboard.git
-
Navigate to the project directory:
cd time-tracking-dashboard
-
Install dependencies using pnpm:
pnpm install
-
Start the development server:
pnpm dev
-
Open your browser and visit http://localhost:3000 to view the project.
-
To start Storybook, run the following command and access it at http://localhost:6006
pnpm run storybook
-
To run tests, use the following command:
pnpm run test
- Next.js (v14.2.5)
- React.js (v18)
- TypeScript (v5)
- Tailwind CSS (v3.4.1)
- Storybook (v8.2.8)
- Vitest (v2.0.5)
- Semantic HTML5 markup
- CSS Grid, Flexbox
- SEO & web accessibility
-
Having learned a lot from my previous project, the newsletter form, this time I took the opportunity to consolidate what I had learned. As I was finishing the project, I discovered that fonts need to be applied separately in Storybook. I learned that if the fonts are different, it can cause confusion as the appearance in Storybook might differ from the actual project.
-
I tried using useSWR. Instead of importing the data.json provided by the challenge as a static file, I used the API functionality provided by Next.js to fetch it. This allowed me to retrieve data easily and conveniently without using useEffect. Also, I found its simple usage to be very efficient in progressing with the project. A similar library is tanstack-query, which seems to have more features than useSWR and could be useful for managing complex server states.
- As the difficulty of the challenges increases in the future, I want to build up my skills by handling more complex logic and state management.
By focusing on these areas, I hope to continually improve my front-end development skills and create more efficient and sophisticated web applications.
- Next.js Documentation - Comprehensive guide to Next.js features and API.
- Tailwind CSS Documentation - Detailed documentation for Tailwind CSS.
- Storybook Documentation - Official guide for building and testing UI components with Storybook.
- Vitest Guide - Complete documentation for the Vitest testing framework.
- GitHub - @jaceleedev
- Frontend Mentor - @jaceleedev