Skip to content

ModRed-0/FinanceApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🏦 FinanceIQ — Smart Personal Finance Management System

Complete Setup Guide


📦 What's in This Project

financeapp/
├── backend/     ← Spring Boot (Java) — the server/API
└── frontend/    ← React + Vite — the website you see

🖥️ Step 1: Install Required Software

You need to install these tools once. Follow each link:

1.1 Java 21 (JDK)

  • Go to: https://adoptium.net/
  • Download Eclipse Temurin 21 (LTS)
  • Install it (click Next → Next → Finish)
  • ✅ Verify: Open Terminal/Command Prompt, type:
    java -version
    
    Should say openjdk 21...

1.2 Maven (Build Tool for Java)

  • Go to: https://maven.apache.org/download.cgi
  • Download the Binary zip archive (e.g. apache-maven-3.9.x-bin.zip)
  • Extract it to C:\Program Files\Maven (Windows) or /opt/maven (Mac/Linux)
  • Add to PATH:
    • Windows: Search "Environment Variables" → Edit PATH → Add C:\Program Files\Maven\bin
    • Mac: Add export PATH=/opt/maven/bin:$PATH to ~/.zshrc
  • ✅ Verify: mvn -version

1.3 Node.js (For the Frontend)

  • Go to: https://nodejs.org/
  • Download LTS version (e.g. 20.x)
  • Install it (click Next → Next → Finish)
  • ✅ Verify: node -version and npm -version

1.4 PostgreSQL (Database)

  • Go to: https://www.postgresql.org/download/
  • Download for your OS and install
  • During install, set password for postgres user — remember this password!
  • Default port: 5432 (leave as-is)
  • ✅ Verify: pgAdmin 4 opens (installed automatically)

1.5 IntelliJ IDEA (Optional, makes Java easier)


🗄️ Step 2: Set Up the Database

Option A: Using pgAdmin (GUI — easier for beginners)

  1. Open pgAdmin 4 from your Start menu
  2. Login with your postgres password
  3. Right-click DatabasesCreateDatabase
  4. Name it: financedb
  5. Click Save

Option B: Using Command Line

psql -U postgres
CREATE DATABASE financedb;
\q

⚙️ Step 3: Configure the Backend

Open this file in any text editor (Notepad is fine):

backend/src/main/resources/application.properties

Change these two lines to match your PostgreSQL password:

spring.datasource.password=yourpassword   ← PUT YOUR ACTUAL PASSWORD HERE

Also update the JWT secret — you can use any long random string:

app.jwt.secret=3cfa76ef14937c1c0ea519f8fc057a80fcd04a7420f8e8bcd0a7567c272e007b

That's the only configuration change needed! The app will auto-create all database tables on first run.


🚀 Step 4: Run the Backend

Open Terminal (Mac/Linux) or Command Prompt / PowerShell (Windows).

Navigate to the backend folder:

cd path/to/financeapp/backend

(Example: cd C:\Users\YourName\Downloads\financeapp\backend)

Run the app:

mvn spring-boot:run

First run takes 2–5 minutes (downloads dependencies). You'll see lots of text scrolling.

✅ Success looks like:

Started SmartFinanceApplication in 3.5 seconds

🔴 If you see an error about the database:

  • Make sure PostgreSQL is running
  • Double-check your password in application.properties
  • Make sure the financedb database exists

Leave this terminal open. The backend runs on http://localhost:8080


🎨 Step 5: Run the Frontend

Open a NEW Terminal window (keep the backend one open).

Navigate to the frontend folder:

cd path/to/financeapp/frontend

Install dependencies (first time only):

npm install

Start the development server:

npm run dev

✅ You'll see:

  VITE v5.x  ready in 500 ms
  ➜  Local:   http://localhost:5173/

🌐 Step 6: Open the App

Open your browser and go to: http://localhost:5173

You'll see the FinanceIQ login page. Click "Create one" to register your first account!


📱 Using the App

First Time Setup

  1. Register with your name, email, and password
  2. You'll be taken to the Dashboard automatically
  3. Start by adding your Income (left sidebar → Income)
  4. Add your Expenses
  5. Create Budgets to set spending limits
  6. Set Savings Goals for things you're saving toward
  7. Add Bill Reminders so you never miss a payment
  8. Check Analytics for beautiful charts of your spending

🗂️ Project Architecture (For Reference)

Backend API Endpoints

Method URL What it does
POST /api/auth/register Create account
POST /api/auth/login Login
GET /api/auth/me Get current user
GET /api/dashboard/summary Dashboard data
GET /api/incomes List all income
POST /api/incomes Add income
PUT /api/incomes/{id} Edit income
DELETE /api/incomes/{id} Delete income
GET /api/expenses List all expenses
POST /api/expenses Add expense
PUT /api/expenses/{id} Edit expense
DELETE /api/expenses/{id} Delete expense
GET /api/budgets/monthly Get month budgets
POST /api/budgets Create budget
GET /api/savings-goals List savings goals
POST /api/savings-goals Create goal
POST /api/savings-goals/{id}/contribute Add money to goal
GET /api/bills List bill reminders
POST /api/bills Create bill reminder
PATCH /api/bills/{id}/pay Mark bill as paid

Database Tables

  • users — user accounts
  • incomes — income entries
  • expenses — expense entries
  • budgets — monthly budgets per category
  • savings_goals — savings targets
  • bill_reminders — upcoming bills

🔧 Common Problems & Fixes

"Port 8080 already in use"

Another app is using that port. Either close it, or change the backend port: In application.properties: server.port=8081 Then update vite.config.js: change 8080 to 8081

"Cannot connect to database"

  • Make sure PostgreSQL service is running
  • Windows: Search "Services" → find "postgresql" → Start it
  • Mac: brew services start postgresql

"mvn command not found"

Maven isn't in your PATH. Re-read Step 1.2.

Frontend shows blank page

  • Make sure backend is running on port 8080
  • Check browser console (F12 → Console tab) for errors

"CORS error" in browser console

Backend is not running. Start it first (Step 4).


🏭 Building for Production

Backend (creates a JAR file you can deploy)

cd backend
mvn clean package -DskipTests
java -jar target/smart-finance-backend-1.0.0.jar

Frontend (creates static files for hosting)

cd frontend
npm run build
# Files are in the /dist folder — upload these to any web host

📁 Technology Stack Summary

Layer Technology Purpose
Backend Java 21 Programming language
Backend Spring Boot 3.2 Web framework
Backend Spring Security Authentication & authorization
Backend JWT Stateless token-based auth
Backend Spring Data JPA Database ORM
Backend PostgreSQL Relational database
Backend Maven Build tool & dependency manager
Frontend React 18 UI library
Frontend Vite Fast build tool
Frontend Tailwind CSS Utility-first styling
Frontend React Router v6 Client-side routing
Frontend Axios HTTP client for API calls
Frontend Recharts Charts and graphs
Frontend React Hot Toast Notifications

🎓 Learning Resources (If You Want to Understand More)


Built with ❤️ — FinanceIQ v1.0.0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors