Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ dist-ssr
*.njsproj
*.sln
*.sw?

package-lock.json
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,19 @@ A beautiful, responsive, and modern **Expense Tracker App** built with **React**

---

## πŸ“‚ Folder Structure

```
/src
β”œβ”€β”€ /assets # Static assets like images and SVGs
β”œβ”€β”€ /components # Reusable UI components (Modals, Cards, Footer, etc.)
β”œβ”€β”€ /context # React Context providers for global state
β”œβ”€β”€ /pages # Top-level components for each page/route
β”œβ”€β”€ App.jsx # Main application component with routing
β”œβ”€β”€ index.css # Global CSS styles
└── main.jsx # Main entry point of the application
```

## πŸš€ Getting Started

Want to run Smart Tracker on your machine? Just follow the steps below.
Expand Down
356 changes: 130 additions & 226 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
import HomePage from './components/HomePage';
import Dashboard from './components/Dashboard';
import { TransactionProvider } from './components/TransactionContext';
import { Toaster } from 'react-hot-toast';
import { CurrencyProvider } from "./components/CurrencyContext";
import AboutPage from './components/AboutPage';
Expand Down
4 changes: 2 additions & 2 deletions src/components/AddGoalModal.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState, useEffect } from 'react';
import { useCurrency } from "./CurrencyContext";
import { useTransactions } from './TransactionContext';
import { useCurrency } from "../context/CurrencyContext";
import { useTransactions } from '../context/TransactionContext';
import toast from 'react-hot-toast';

export default function AddGoalModal({ showModal = true, setShowModal = () => {}, darkMode = false }) {
Expand Down
4 changes: 2 additions & 2 deletions src/components/AddTransactionModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const formatDate = (date) => {
};

import { useState, useEffect } from 'react';
import { useCurrency } from "./CurrencyContext";
import { useTransactions } from './TransactionContext';
import { useCurrency } from "../context/CurrencyContext";
import { useTransactions } from '../context/TransactionContext';
import toast from 'react-hot-toast';

export default function AddTransactionModal({ showModal = true, setShowModal = () => {}, darkMode = false }) {
Expand Down
4 changes: 2 additions & 2 deletions src/components/ContributeToGoalModal.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState, useEffect } from 'react';
import { useCurrency } from "./CurrencyContext";
import { useTransactions } from './TransactionContext';
import { useCurrency } from "../context/CurrencyContext";
import { useTransactions } from '../context/TransactionContext';
import toast from 'react-hot-toast';

export default function ContributeToGoalModal({ showModal, setShowModal, darkMode, goalId }) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/GoalCard.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { useCurrency } from "./CurrencyContext";
import { useCurrency } from "../context/CurrencyContext";
import { Trash2, PiggyBank } from 'lucide-react';

const GoalCard = ({ goal, darkMode, onDelete, onContribute }) => {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState, useEffect } from 'react';
import { Link } from 'react-router-dom';
import { ArrowLeft, User, Mail } from 'lucide-react';
import Footer from './Footer';
import Footer from '../components/Footer';

const AboutPage = () => {
const [isVisible, setIsVisible] = useState(false);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState, useEffect } from 'react';
import { Link } from 'react-router-dom'; // Placeholder, navigation is handled by props
import { Send, User, Mail } from 'lucide-react';
import Footer from './Footer';
import Footer from '../components/Footer';

const ContactPage = ({ darkMode, navigateTo }) => {
// State to control the animations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import ConfirmationModal from "./ConfirmationModal";
import Footer from "./Footer";
// Download imports
import { PDFDownloadLink } from "@react-pdf/renderer";
import TransactionPDF from "./TransactionPDF";
import TransactionPDF from "../components/TransactionPDF";
import { Link } from "react-router-dom";

export default function Dashboard() {
Expand Down
12 changes: 6 additions & 6 deletions src/components/GoalsPage.jsx β†’ src/pages/GoalsPage.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React, { useState, useEffect } from 'react'; // 1. Import useEffect
import { useTransactions } from "./TransactionContext";
import AddGoalModal from './AddGoalModal';
import Footer from './Footer';
import GoalCard from './GoalCard';
import { useTransactions } from "../context/TransactionContext";
import AddGoalModal from '../components/AddGoalModal';
import Footer from '../components/Footer';
import GoalCard from '../components/GoalCard';
import { Plus } from 'lucide-react';
import ConfirmationModal from './ConfirmationModal';
import ContributeToGoalModal from './ContributeToGoalModal';
import ConfirmationModal from '../components/ConfirmationModal';
import ContributeToGoalModal from '../components/ContributeToGoalModal';

export default function GoalsPage() {
const { goals, setGoals } = useTransactions();
Expand Down
2 changes: 1 addition & 1 deletion src/components/HomePage.jsx β†’ src/pages/HomePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
Moon,
} from 'lucide-react';
import { motion } from 'framer-motion';
import Footer from './Footer';
import Footer from '../components/Footer';

export default function HomePage() {
const [darkMode, setDarkMode] = useState(false);
Expand Down