https://github.com/ucangun/stock_app
QuickStock is a dynamic stock management app that allows users to efficiently manage and track purchases, sales, firms, brands, and products. Featuring a modern UI built with React, Vite, and Material UI, the app performs seamless CRUD operations while offering real-time data insights and user authentication.
https://github.com/ucangun/stock_app
axios css custom-hooks-in-react html i18next javascript material-ui promise-all react react-toastify redux redux-persist redux-toolkit tailwindcss
Last synced: 2 months ago
JSON representation
QuickStock is a dynamic stock management app that allows users to efficiently manage and track purchases, sales, firms, brands, and products. Featuring a modern UI built with React, Vite, and Material UI, the app performs seamless CRUD operations while offering real-time data insights and user authentication.
- Host: GitHub
- URL: https://github.com/ucangun/stock_app
- Owner: ucangun
- Created: 2024-09-02T12:14:06.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-12-06T19:07:27.000Z (6 months ago)
- Last Synced: 2025-02-10T08:15:16.096Z (4 months ago)
- Topics: axios, css, custom-hooks-in-react, html, i18next, javascript, material-ui, promise-all, react, react-toastify, redux, redux-persist, redux-toolkit, tailwindcss
- Language: JavaScript
- Homepage: https://quickstock.vercel.app
- Size: 3.8 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π¦ QuickStock - Stock Management App
https://quickstock.vercel.app/
**QuickStock** is a comprehensive stock management application designed to efficiently manage and track purchases, sales, firms, brands, and products. With a user-friendly dashboard, it allows users to perform CRUD operations on various resources such as firms, brands, and products. The app ensures smooth backend communication with custom hooks and leverages multiple libraries and technologies to deliver a seamless user experience.
## π Project Purpose
QuickStock aims to streamline stock management by offering a dashboard that features sales, purchases, firms, brands, and products, each with dedicated pages. Users can perform the following actions:
- Add, update, and delete items (CRUD operations) for brands, firms, products, and more.
- List, view, and interact with data efficiently through the UI.
- Perform bulk operations such as importing and exporting stock data.## π¬ Outcome

## π οΈ Technologies Used
- **ReactJS**: Main framework for building the user interface and component structure.
- **Vite**: Used for lightning-fast development and bundling in the React environment.
- **Material UI (MUI)**: For a consistent, responsive, and polished UI design.
- **Tailwind CSS**: Used for custom styling in some pages, allowing flexibility alongside Material UI.
- **Redux Toolkit**: For state management and simplifying the app's state logic with slices for both authentication and stock management.
- **Redux Persist**: Ensures that the application state is retained across browser sessions, even after refresh.
- **Axios**: For making HTTP requests and handling CRUD operations with the backend.
- **Custom Hooks**:
- `useStockCall`: Custom hook to handle stock-related API calls and data fetching.
- `useAuthCall`: Custom hook to manage authentication-related API calls and token management.
- **Promise.all**: Used to make concurrent API requests for fetching product, category, and brand data simultaneously, improving performance.
- **React Router**: For handling navigation and managing routes between different pages (e.g., dashboard, purchases, sales, firms, brands, products).
- **Toastify**: Provides user feedback through success and error notifications for actions like login, logout, and CRUD operations.
- **Formik & Yup**: Used for handling form validation and submission in the login, register, and other forms, ensuring robust form control.
- **React Icons & MUI Icons**: For incorporating icons throughout the app to enhance the user experience.
- **Dark Mode**: Implemented with `Redux Toolkit` and Material UIβs theme system, allowing users to toggle between light and dark modes.
- **Postman**: Used for testing and verifying backend API endpoints during development. -**i18n**: Implemented internationalization with language options for German (de) and English (en), allowing users to seamlessly switch between these languages.## βοΈ Features
- **π οΈ CRUD Operations**: Users can create, read, update, and delete entries for products, brands, firms, purchases, and sales, with full backend integration.
- **π Dashboard**: Features real-time data on stock levels, purchases, and sales, represented with charts and tables.
- **π Backend Integration**: Axios is used for seamless communication with the backend, ensuring quick and reliable data fetching and submission.
- **π Global State Management**: Utilized `Redux Toolkit` for managing authentication state and stock data across the application.
- **π Fast Development with Vite**: The project uses Vite for fast compilation, hot module reloading, and a smoother development experience.
- **π Dynamic Theming**: Users can toggle between light and dark mode using a custom theme managed by Redux slices.
- **π Notifications**: Success and error messages are displayed using `Toastify` for important actions like login/logout, data updates, and error handling.
- **π Reusable Components**: Extensive use of reusable components and DRY principles throughout the project, making the codebase maintainable and scalable.## π Project Structure
```
|--QuickStock(folder)
|
βββ public
β βββ π assets
β β βββ π sidebar
β β βββ [icons(svg)]
βββ src
β β
β βββ π app
β β βββ store.js
β βββ π assets
β β βββ π images
β β βββ [images]
β βββ π components
β β βββ π Brands
β β β βββ BrandCard.jsx
β β β βββ BrandModal.jsx
β β βββ π Dashboard
β β β βββ Charts.jsx
β β β βββ KpiCards.jsx
β β βββ π Firms
β β β βββ FirmCard.jsx
β β β βββ FirmModal.jsx
β β βββ π Forms
β β β βββ LoginForm.jsx
β β β βββ RegisterForm.jsx
β β βββ π Home
β β β βββ Navbar.jsx
β β βββ π Products
β β β βββ ProductModal.jsx
β β β βββ ProductTable.jsx
β β βββ π Purchases
β β β βββ PurchaseModal.jsx
β β β βββ PurchaseTable.jsx
β β βββ π Sales
β β β βββ SaleModal.jsx
β β β βββ SaleTable.jsx
β β βββ π SideBar
β β β βββ IconBar.jsx
β β β βββ SideBar.jsx
β β β βββ SidebarListItems.jsx
β β βββ AppLayout.jsx
β β βββ Button.jsx
β β βββ LanguageSwitcher.jsx
β β βββ Logo.jsx
β β
β β
β βββπ features
β β βββ authSlice.jsx
β β βββ stockSlice.jsx
β β βββ themeSlice.jsx
β β
β βββ πhelpers
β β βββ ToastNotify.js
β β
β βββπ hooks
β β βββ useAuthCall.jsx
β β βββ useAxios.jsx
β β βββ useStockCall.jsx
β β
β βββπ pages
β β βββ Brands.jsx
β β βββ Dashboard.jsx
β β βββ Firms.jsx
β β βββ Home.jsx
β β βββ Login.jsx
β β βββ Products.jsx
β β βββ Purchases.jsx
β β βββ Register.jsx
β β βββ Sales.jsx
β β
β βββ π router
β β βββ AppRouter.jsx
β β βββ PrivateRouter.jsx
β β
β βββ π utils
β β βββ i18n.js
β β
β βββ App.jsx
β βββ index.css
β βββ main.jsx
β βββ theme.js
β
βββ .gitignore
βββ eslint.config.js
βββ frontend.env
βββ index.html
βββ package-lock.json
βββ package.json
βββ postcss.config.js
βββ tailwind.config.js
βββ vite.config.js
βββ README.md
```## π Authentication Flow
- **User Registration & Login**: Authentication is handled through custom hooks and Redux slices. The registration, login, and logout functionalities are integrated with API calls to the backend.
- **Token Management**: The app uses tokens to handle authenticated sessions, storing them using Redux Persist for session persistence across browser refreshes.## π¦ Stock Management
- **Product, Brand, Firm Management**: Users can add, update, or delete products, brands, and firms through CRUD operations, which are managed using Axios and Redux.
- **Sales & Purchases**: The app offers a detailed view of all sales and purchases, allowing users to manage stock levels and track transactions efficiently.## π¦ Dark Mode
- Dark mode is implemented using the `themeSlice` in Redux Toolkit. It allows users to switch between dark and light themes using a button in the navbar.
- The theme is persisted across sessions using Redux Persist, so the user's preferred theme is maintained even after a page refresh.## π Redux Persist
- `Redux Persist` is used to maintain the user session and theme preferences, so even after a page refresh, the state is preserved.
- The persisted reducer ensures that authentication tokens and user-specific data remain intact during browser sessions.## π At the End of This Project, will be able to:
- How to efficiently manage global state with **Redux Toolkit** and **Redux Persist**.
- Best practices for performing **CRUD operations** using **Axios** and handling backend communication.
- How to implement user authentication with **custom hooks** and token management.
- Building **reusable components** and adhering to **DRY principles**.
- Handling form validation and submission with **Formik** and **Yup**.
- Utilizing **Material UI** and **Tailwind CSS** together for a flexible design system.
- Implementing **dark mode** toggle and dynamic theming in a React app.
- Fast and efficient development using **Vite** for React applications.π Happy Coding with QuickStock! π