├── public ├── _redirects ├── robots.txt ├── favicon.ico ├── logo192.png ├── logo512.png ├── manifest.json └── index.html ├── .env ├── stock.gif ├── src ├── assets │ └── logo.png ├── index.css ├── pages │ ├── ScroolToTop.jsx │ ├── Dashboard.jsx │ ├── Login.jsx │ ├── Register.jsx │ ├── Products.jsx │ ├── Sales.jsx │ ├── Purchases.jsx │ ├── Brands.jsx │ └── Firms.jsx ├── index.js ├── router │ ├── PrivateRouter.jsx │ └── AppRouter.jsx ├── service │ ├── useAxios.js │ ├── useAuthCalls.js │ └── useStockCalls.js ├── components │ ├── Footer.jsx │ ├── Switch.jsx │ ├── Stats.jsx │ ├── BrandCard.jsx │ ├── BrandForm.jsx │ ├── FirmForm.jsx │ ├── ProductTable.jsx │ ├── RecentReport.jsx │ ├── ProductForm.jsx │ ├── FirmCard.jsx │ ├── SaleTable.jsx │ ├── LoginForm.jsx │ ├── PurchaseTable.jsx │ ├── SaleForm.jsx │ ├── RegisterForm.jsx │ ├── LineChart.jsx │ ├── BarChart.jsx │ ├── PurchaseForm.jsx │ ├── DataMessage.jsx │ └── Navbar.jsx ├── helper │ ├── ToastNotify.js │ └── icons.js ├── App.js ├── app │ └── store.jsx └── features │ ├── authSlice.jsx │ └── stockSlice.jsx ├── tailwind.config.js ├── package.json ├── .gitignore └── README.md /public/_redirects: -------------------------------------------------------------------------------- 1 | /* /index.html 200 -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | REACT_APP_BASE_URL=https://stock-management-system-backend.onrender.com -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /stock.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/esmaaksoy/Stock-Management-System-Frontend/HEAD/stock.gif -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/esmaaksoy/Stock-Management-System-Frontend/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/esmaaksoy/Stock-Management-System-Frontend/HEAD/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/esmaaksoy/Stock-Management-System-Frontend/HEAD/public/logo512.png -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/esmaaksoy/Stock-Management-System-Frontend/HEAD/src/assets/logo.png -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | @layer utilities { 5 | .custom-box-shadow { 6 | box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4); 7 | } 8 | } -------------------------------------------------------------------------------- /src/pages/ScroolToTop.jsx: -------------------------------------------------------------------------------- 1 | import { useEffect } from "react"; 2 | import { useLocation } from "react-router-dom"; 3 | export default function ScrollToTop() { 4 | const { pathname } = useLocation(); 5 | useEffect(() => { 6 | window.scrollTo(0, 0); 7 | }, [pathname]); 8 | 9 | return null; 10 | } -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | const withMT = require("@material-tailwind/react/utils/withMT"); 3 | module.exports =withMT( { 4 | content: [ 5 | "./src/**/*.{js,jsx,ts,tsx}", 6 | ], 7 | theme: { 8 | extend: {}, 9 | }, 10 | plugins: [], 11 | darkMode: "class", 12 | }) -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import ReactDOM from "react-dom/client" 3 | import "./index.css" 4 | import App from "./App" 5 | import { BrowserRouter } from "react-router-dom" 6 | 7 | const root = ReactDOM.createRoot(document.getElementById("root")) 8 | root.render( 9 | 10 | 11 | 12 | 13 | 14 | ) 15 | -------------------------------------------------------------------------------- /src/router/PrivateRouter.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { useSelector } from 'react-redux' 3 | import { Navigate, Outlet } from 'react-router-dom' 4 | import Navbar from '../components/Navbar' 5 | import Footer from '../components/Footer' 6 | 7 | const PrivateRouter = () => { 8 | const {user} = useSelector((state)=>state.auth) 9 | 10 | return ( 11 | user ? <> 12 | 13 | 14 |