A modern web application for tracking your stock portfolio and watchlist. Built with React, Node.js, and PostgreSQL.
- Frontend: https://portfolio-tracker-hackstyx.vercel.app
- Backend API: https://portfolio-tracker-backend-y7ne.onrender.com/api
- 📊 Real-time stock portfolio tracking
- 👀 Watchlist management
- 📈 Stock price history visualization
- 🌓 Dark/Light theme support
- 📱 Responsive design
- 🔄 Automatic price updates
- Node.js (v14 or higher)
- npm or yarn
- PostgreSQL database
- Clone the repository:
git clone https://github.com/HackStyx/portfolio-tracker.git
cd portfolio-tracker
- Install dependencies:
npm install
# or
yarn install
- Create a
.env
file in the root directory:
VITE_API_BASE_URL=http://localhost:5000/api
- Start the development server:
npm run dev
# or
yarn dev
The frontend will be available at http://localhost:5173
- Navigate to the backend directory:
cd backend
- Install dependencies:
npm install
# or
yarn install
- Create a
.env
file in the backend directory:
DATABASE_URL=your_postgresql_connection_string
PORT=5000
NODE_ENV=development
- Run database migrations:
npm run migrate
# or
yarn migrate
- Start the backend server:
npm start
# or
yarn start
The API will be available at http://localhost:5000/api
VITE_API_BASE_URL
: Backend API URL
DATABASE_URL
: PostgreSQL connection stringPORT
: Server port (default: 5000)NODE_ENV
: Environment (development/production)
GET /api/stocks
- Get all stocks in portfolioPOST /api/stocks
- Add a new stockPUT /api/stocks/:id
- Update a stockDELETE /api/stocks/:id
- Delete a stockGET /api/stocks/:ticker/historical
- Get historical data
GET /api/watchlist
- Get watchlistPOST /api/watchlist
- Add to watchlistPUT /api/watchlist/:id
- Update watchlist itemDELETE /api/watchlist/:id
- Remove from watchlistPOST /api/watchlist/sync-portfolio
- Sync with portfolio
-
Stock Data
- Uses simulated stock data for demonstration
- Real-time price updates are simulated
- Historical data is generated for demonstration
-
Authentication
- Currently uses a simple reset-based logout
- No user authentication system
- Single user environment
-
Performance
- Limited to managing reasonable portfolio sizes
- Price updates every minute
- Historical data limited to recent periods
-
Browser Support
- Requires modern browsers
- Best experienced on Chrome, Firefox, Safari
- Requires JavaScript enabled
-
Frontend
- React
- Vite
- TailwindCSS
- Framer Motion
- Tremor
- Axios
-
Backend
- Node.js
- Express
- PostgreSQL
- Knex.js
- Node-Postgres
- Fully responsive layout
- Mobile-first approach
- Adaptive UI components
- Touch-friendly interactions
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.