├── .gitignore ├── README.md ├── index.html ├── package-lock.json ├── package.json ├── postcss.config.js ├── public ├── firstPage.webp ├── innerPage.webp └── vite.svg ├── src ├── App.jsx ├── assets │ ├── data │ │ └── data.json │ ├── favicon-32x32.png │ ├── icon-arrow-down.svg │ ├── icon-arrow-left.svg │ ├── icon-arrow-right.svg │ ├── icon-arrow-up.png │ ├── icon-calendar.svg │ ├── icon-check.svg │ ├── icon-delete-hover.png │ ├── icon-delete.svg │ ├── icon-moon.svg │ ├── icon-plus.svg │ ├── icon-sun.svg │ ├── illustration-empty.svg │ ├── image-avatar.jpg │ ├── logo.png │ ├── logo.svg │ ├── plus.png │ └── react.svg ├── components │ ├── AddItem.jsx │ ├── Center.jsx │ ├── CreateInvoice.jsx │ ├── DeleteModal.jsx │ ├── Header.jsx │ ├── InvoiceCard.jsx │ ├── InvoiceInfo.jsx │ └── PaidStatus.jsx ├── functions │ ├── createInvoiceValidator.js │ ├── formatDate.js │ ├── forwardDate.js │ └── generateId.js ├── hooks │ └── useDarkMode.jsx ├── index.css ├── main.jsx └── redux │ ├── invoiceSlice.js │ └── store.js ├── tailwind.config.js └── vite.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Frontend Mentor - Invoice web app solution 2 | 3 | This is a solution to the [Invoice web app challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/invoice-app-i7KaLTQjl). Frontend Mentor challenges help you improve your coding skills by building realistic projects. 4 | 5 | ## Table of contents 6 | 7 | - [Overview](#overview) 8 | - [The challenge](#the-challenge) 9 | - [Screenshot](#screenshot) 10 | - [Links](#links) 11 | - [Built with](#built-with) 12 | - [Useful resources](#useful-resources) 13 | -[Whar I Learned](#what-i-learned) 14 | - [Author](#author) 15 | 16 | 17 | ## Overview 18 | 19 | ### The challenge 20 | 21 | Users should be able to: 22 | 23 | - View the optimal layout for the app depending on their device's screen size 24 | - See hover states for all interactive elements on the page 25 | - Create, read, update, and delete invoices 26 | - Receive form validations when trying to create/edit an invoice 27 | - Save draft invoices, and mark pending invoices as paid 28 | - Filter invoices by status (draft/pending/paid) 29 | - Toggle light and dark mode 30 | - **Bonus**: Keep track of any changes, even after refreshing the browser (`localStorage` could be used for this if you're not building out a full-stack app) 31 | 32 | 33 | ### Screenshot 34 | 35 |  36 |  37 | 38 | 39 | ### Links 40 | 41 | 42 | - Live Site URL: [link](https://invoice-web-app-react.vercel.app/) 43 | 44 | 45 | ### Built with 46 | 47 | - [TailwindCSS](https://tailwindcss.com/) - CSS Framework 48 | - [React](https://reactjs.org/) - JS library 49 | - [React Router](https://reactrouter.com/) - Routing 50 | - [Framer Motion](https://www.framer.com/motion/) - React Animation Library 51 | 52 | 53 | 54 | ### What I learned 55 | 56 | In this project, I learned how to work with libraries like React, Redux Toolkit, Framer Motion, and Moment.js. I also gained experience in building web applications, implementing features like data fetching, form submission, routing, and animations. Additionally, I learned about best practices for structuring and organizing code, as well as working with json files and managing state using Redux Toolkit. 57 | 58 | I learned how to work with the Framer Motion library. Prior to this project, I had no experience working with Framer Motion, but through this project, I gained experience in this area. 59 | 60 | ### Useful resources 61 | - [Framer Motion Documents](https://www.framer.com/motion/introduction/) 62 | 63 | 64 | ## Author 65 | 66 | - LinkedIn - [Hesam DearBoy](https://www.linkedin.com/in/hesam-azizpour-23259b265/) 67 | 68 | 69 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 11 | 12 | 13 |There are {invoices.length} total invoices.
68 |73 | Filter by status 74 |
75 |76 | Filter 77 |
78 |92 | {item} 93 |
94 |21 | Are you sure you want to delete invoice {invoiceId}? This action cannot be undone. 22 |
23 | 24 |{invoice.clientName}
90 |{invoice.senderAddress.street}
93 |{invoice.senderAddress.city}
94 |{invoice.senderAddress.postCode}
95 |{invoice.senderAddress.country}
96 |Bill to
114 |{invoice.clientAddress.street}
118 |{invoice.clientAddress.city}
119 |{invoice.clientAddress.postCode}
120 |{invoice.clientAddress.country}
121 |Sent to
125 |Item name
151 | 152 |Qty.
158 | 159 |Item price
165 | 166 |Total
172 | 173 |13 | {type} 14 |
15 |