BudgetPlanner is a dynamic and interactive financial dashboard built with React. It allows users to track their finances, set savings goals, and organize expenses by category. Worth mentioning is the application is not complete and all financing and saving goals is not ready for release The app offers a sleek, responsive UI styled with Tailwind CSS and ShadCN, state management via Redux Toolkit, and routing with React Router.
Categorization:
Organize your expenses by categories such as entertainment, healthcare, and transportation to make better financial decisions.
GenericTable.jsx β Dynamic Data Table Component The GenericTable component is a highly flexible and reusable table implementation that can display data with sorting, pagination, row selection (checkboxes), and actions like editing and deleting. It supports dynamic content, allowing users to manage and manipulate data in a straightforward, user-friendly way.
Modern UI Design:
Tailored for a seamless experience, the UI is fully responsive, designed using Tailwind CSS.
State Management:
Leveraging Redux Toolkit for effective and scalable state management.
React Router Integration:
Enables smooth navigation within the app, including the ability to handle different routes for expenses, goals, and more.
Follow the steps below to get the project up and running locally:
Clone the repo to your local machine:
git clone https://github.com/bugstile/BudgetPlanner.git
After cloning the repository, navigate into the project directory and install the required dependencies:
cd BudgetPlanner
npm install
Launch the app on your local server:
npm run dev
The app will now be accessible at http://localhost:5173.
Hereβs an overview of the project folder structure:
.
βββ public/ # Public files (e.g., index.html)
βββ src/ # Application source code
β βββ components/ # Reusable components (Button, Form, etc.)
β βββ hooks/ # Custom React hooks
β βββ pages/ # Different pages of the app (Home, Expenses, etc.)
β βββ store/ # Redux store and reducers
β βββ styles/ # Tailwind CSS configurations
β βββ App.js # Main app component
βββ README.md # This file
While the app provides a solid foundation for financial management, there are plans to enhance its functionality further:
Expense Tracking:
Keep track of your income and expenses, categorize them, and gain insights into spending habits.
Savings Goals:
Set specific savings goals for different time periods (e.g., monthly, yearly) and track your progress over time.
Authentication:
Introduce user authentication (e.g., login and signup) to enable multiple users with personalized dashboards.
Export Data:
Add the ability to export data as CSV or PDF for offline tracking and reporting.
Mobile App:
Develop a mobile version of the app using React Native or a similar framework.
Here's an example of how you can document your GenericTable.jsx
component for your GitHub project. It will provide a detailed overview of the component's functionality, usage, and key features.
GenericTable.jsx
β Dynamic Data Table Component (built on shadCN implementation)The GenericTable
component is a highly flexible and reusable table implementation that can display data with sorting, pagination, row selection (checkboxes), and actions like editing and deleting. It supports dynamic content, allowing users to manage and manipulate data in a straightforward, user-friendly way.
data
(Array): The data to be displayed in the table. Each object in the array represents a row.columns
(Array): Defines the columns of the table. Each column can define its header and cell rendering logic.onEdit
(Function): A callback function that is called when the user clicks on "Edit" in the row's action dropdown. This function should handle editing logic.onDelete
(Function): A callback function that is called when the user clicks on "Delete" in the row's action dropdown. This function should handle single-row deletion logic.deleteAllSelected
(Function): A callback function that is triggered when the "Delete All Selected" button is clicked. It deletes multiple rows that are selected via checkboxes.showCheckboxes
(Boolean): Whether checkboxes should be displayed for row selection. Defaults to false
.enablePagination
(Boolean): Whether pagination is enabled. Defaults to true
.deleteCategory
(Function): A custom function that handles the deletion of selected rows. It is passed dynamically and should be responsible for deleting the data.deleteMessage
(String): A custom message to display in the delete confirmation dialog when deleting multiple rows.columns
and data
passed as props.enablePagination
is enabled, pagination buttons allow navigation between pages of data.import GenericTable from "./components/GenericTable";
const columns = [
{
header: "Category",
accessor: "category",
},
{
header: "Amount",
accessor: "totalAmount",
},
{
header: "Date",
accessor: "dateSpent",
},
];
const data = [
{
id: 1,
category: "Food",
totalAmount: 50,
dateSpent: "2025-03-28",
},
{
id: 2,
category: "Transport",
totalAmount: 100,
dateSpent: "2025-03-29",
},
// More data here
];
const handleEdit = (row) => {
// Logic to edit the row
};
const handleDelete = (id) => {
// Logic to delete the row
};
const handleDeleteAllSelected = (selectedIds) => {
// Logic to delete selected rows
};
<GenericTable
data={data}
columns={columns}
onEdit={handleEdit}
onDelete={handleDelete}
deleteAllSelected={handleDeleteAllSelected}
showCheckboxes={true}
deleteMessage="categories"
/>
columns
prop.data
prop.MoreHorizontal
icon) with options to Edit and Delete.selectedCategoryIds
: Keeps track of the IDs of selected rows for bulk deletion.showDeleteConfirmation
: Controls the visibility of the confirmation dialog for bulk deletion.Checkbox
, Button
, Table
, DropdownMenu
, and ConfirmationDialog
components to build the table UI.You can easily customize the table's appearance, the actions, and the data handling logic by adjusting the props passed to the GenericTable
component. The component is designed to be flexible and reusable, allowing for easy integration into any React project.