Skip to content

vtyagi26/FinTrack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

35 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’Ή FinTrack

FinTrack is a full-stack stock trading and portfolio management dashboard. It lets users sign up, log in, view real-time stock prices, place trades, and track their portfolios. The app is built using the MERN stack (MongoDB, Express, React, Node.js) and integrates with the Finnhub API for market data.


πŸš€ Tech Stack

Layer Technology
Frontend React (Vite), Tailwind CSS, Bootstrap
Backend Node.js, Express
Database MongoDB + Mongoose
Auth JWT + HTTP-only cookies + bcrypt
API AlphaVantage API

πŸ“ Project Structure


fin\_track/
β”œβ”€β”€ backend/         # Express API server
β”‚   β”œβ”€β”€ controllers/
β”‚   β”œβ”€β”€ middleware/
β”‚   β”œβ”€β”€ routes/
β”‚   β”œβ”€β”€ models/
β”‚   └── index.js
β”œβ”€β”€ frontend/        # Public-facing React app (signup/login)
β”‚   └── ...
β”œβ”€β”€ dashboard/       # Private user dashboard (portfolio etc.)
β”‚   └── ...
β”œβ”€β”€ screenshots/     # UI screenshots
└── README.md


πŸ” Environment Variables

βœ… backend/.env.sample

PORT=3002
MONGODB_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/fintrack-db
JWT_SECRET=your_jwt_secret
CLIENT_URL=http://localhost:5173

βœ… frontend/.env.sample

REACT_APP_BACKEND_URL=http://localhost:3002
REACT_APP_API_KEY=your_alphavantage_api_key

βœ… dashboard/.env.sample

REACT_APP_BACKEND_URL=http://localhost:3002
REACT_APP_DASHBOARD_URL=http://localhost:5174
REACT_APP_API_KEY=your_alphavantage_api_key

πŸ” Rename .env.sample to .env and update all placeholder values before running.


πŸ› οΈ Setup Guide

1️⃣ Clone the Repo

git clone https://github.com/<your-username>/fin_track.git
cd fin_track

2️⃣ Backend Setup

cd backend
npm install
cp .env.sample .env    # and update it
npm run dev

Server runs at http://localhost:3002


3️⃣ Frontend Setup

cd ../frontend
npm install
cp .env.sample .env
npm run dev

Runs on http://localhost:5173


4️⃣ Dashboard Setup

cd ../dashboard
npm install
cp .env.sample .env
npm run dev

Dashboard available at http://localhost:5174


🌐 API Endpoints

Route Method Description
/signup POST Register new user
/login POST Login and set secure cookie
/logout POST Log out user
/verify GET Check if user is authenticated
/holdings GET Get user's current stock holdings
/positions GET Fetch all trade positions
/orders POST Place a buy/sell order

πŸ™Œ Acknowledgements

  • πŸ’° Market data from ALPHA_VANTAGE
  • 🎨 UI powered by Bootstrap + TailwindCSS

πŸ‘€ Maintainer

Vaibhav Tyagi

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages