Skip to content

Repository files navigation

Pulse — Financial & Stock Dashboard

Live Demo Backend Spring Boot React PostgreSQL

Live Application: https://pulse-peach-delta.vercel.app/
Backend API: https://pulse-015c.onrender.com

Pulse is a modern, full-stack real-time financial tracking dashboard featuring a high-density "Terminal-Chic" user interface, interactive portfolio management, auto-updating Chart.js sparklines, stateless JWT authentication, password recovery via 6-digit OTP codes, and an automated background cron scheduler for price alert notifications.

Pulse Dashboard Screenshot

🚀 Key Features

  • Terminal-Chic UI: A heavily optimized, grid-based interface enforcing high data density, true #000 canvas backdrops, 1px #222 slate borders, and dynamic SVG vectors. Built natively in React + Vite without bloated component libraries.
  • Interactive Portfolio & Watchlist: Live market data integration with Yahoo Finance. Supports US Equities (NASDAQ/NYSE), Indian stocks (NSE/BSE), ETFs, and more. Tracked portfolios are securely persisted in PostgreSQL.
  • Auto-Updating Chart.js Sparklines: Minimalist time-series trendlines on HTML5 canvas with dynamic color-coding (Emerald Green for gains, Crimson Red for dips) and in-place dataset updates.
  • Automated Price Alerts: Set dynamic ABOVE or BELOW target thresholds. A background cron scheduler silently evaluates alerts during active market hours and automatically dispatches styled HTML emails via Gmail SMTP.
  • Forgot Password & 6-Digit OTP Reset: Secure password recovery flow issuing time-limited (15-minute) 6-digit cryptographic verification codes delivered directly to user inboxes.
  • Cloud-Optimized Backend: The Spring Boot backend is tuned for low-memory container environments using -Xmx256m caps, SerialGC, Hikari connection pooling, and non-blocking security random generators.
  • Secure Authentication: Stateless JSON Web Token (JWT) architecture backed by Spring Security and BCrypt password hashing.

🛠 Tech Stack

Layer Technology
Frontend React 19, Vite 8, Chart.js, Vanilla CSS Design System
Backend Java 17, Spring Boot 3.2.4 (Security, Data JPA, Mail, Scheduling)
Database Serverless PostgreSQL (Neon DB) with Flyway Migrations (V1V4)
Deployment Vercel (Frontend SPA) + Render (Docker / Spring Boot Container)
External APIs Yahoo Finance (Market Data) + Gmail SMTP (STARTTLS on port 587)

⚙️ Local Setup

1. Prerequisites

  • Java 17+ and Maven (mvn)
  • Node.js 18+ and npm
  • A PostgreSQL instance (e.g., Neon DB)
  • A Google App Password for SMTP email delivery

2. Backend Configuration

Navigate to the backend directory and create .env:

# SMTP Alerting Configuration
GMAIL_USER=your_email@gmail.com
GMAIL_APP_PASSWORD=your_16_digit_app_password

# Database Configuration
NEON_HOST=ep-rough-breeze-aoyyhe9m.c-2.ap-southeast-1.aws.neon.tech
NEON_USER=neondb_owner
NEON_PASSWORD=your_db_password
NEON_DB=neondb

# Security (Base64 256-bit secret key)
JWT_SECRET=VnJ1blNlY3JldEtleU11c3RCZUF0TGVhc3QyNTZCaXRMb25nMTIzNDU2==

3. Run the Backend

Flyway will automatically execute SQL migrations (V1 to V4) during startup:

cd backend
mvn spring-boot:run

The backend will launch on http://localhost:8080.

4. Run the React Frontend

In a new terminal window:

cd frontend
npm install
npm run dev

The frontend will launch on http://localhost:5173.


📡 API Reference

All protected endpoints require a standard Bearer token in the Authorization request header: Bearer <jwt_token>.

🔐 Authentication & Account (/api/auth)

Method Endpoint Description Auth Required
POST /api/auth/register Register a new user account No
POST /api/auth/login Authenticate user and receive JWT access token No
POST /api/auth/forgot-password Request a 15-minute 6-digit OTP verification email No
POST /api/auth/reset-password Validate OTP code and update account password No
GET /api/auth/me Retrieve profile information for authenticated user Yes
GET /api/auth/health Health check endpoint for uptime and container monitoring No

📈 Market & Stock Data (/api/stocks)

Method Endpoint Description Auth Required
GET /api/stocks/quote?symbol={symbol} Fetch real-time market quote, change %, and volume No
GET /api/stocks/search?q={query} Autocomplete search for equities and ticker symbols No
GET /api/stocks/chart?symbol={symbol}&range={range} Fetch historical time-series data for sparkline charts No

💼 Portfolio & Watchlist (/api/stocks/tracked)

Method Endpoint Description Auth Required
GET /api/stocks/tracked Fetch all tracked portfolio symbols for the current user Yes
POST /api/stocks/tracked Add a stock symbol to the user's tracked portfolio Yes
DELETE /api/stocks/tracked/{symbol} Remove a stock symbol from the tracked portfolio Yes

🔔 Price Alerts (/api/alerts)

Method Endpoint Description Auth Required
GET /api/alerts List all active price threshold alerts for the user Yes
POST /api/alerts Create a new target price alert (ABOVE / BELOW threshold) Yes
DELETE /api/alerts/{id} Delete a configured price alert by ID Yes

📄 License

This project is open-source and available under the MIT License.

About

A full-stack real-time stock market dashboard built with Spring Boot, JavaScript, and Neon PostgreSQL. Track live stock prices, set custom price alerts, receive email notifications, and monitor your favorite stocks using the Alpha Vantage API.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages