A modern, full-stack portfolio management application built with Next.js 16, designed to help users track stocks, manage their portfolio, and stay updated with live market news.
- Real-time Stock Tracking: Fetch live stock data using the Finnhub API.
- Portfolio Management: Add stocks to your portfolio and track their performance.
- Watchlists: Keep an eye on potential investments with personalized watchlists.
- Live Market Data: View top gainers, losers, and general market news.
- Authentication: Secure login and signup powered by Better-Auth (GitHub, Google, Credentials).
- Automated Background Jobs: Powered by Inngest for reliable event-driven processing.
- Responsive Design: Built with TailwindCSS v4 and Radix UI for a seamless experience across devices.
- Framework: Next.js 16 (App Router)
- Language: TypeScript
- Styling: TailwindCSS v4
- Database: MongoDB with Mongoose
- Authentication: Better-Auth
- External API: Finnhub (Stock Data)
- Background Jobs: Inngest
- UI Components: Radix UI, Lucide React (Icons)
Follow these instructions to get a copy of the project up and running on your local machine.
Ensure you have the following installed:
- Node.js (v18 or later)
- npm, pnpm, or yarn
-
Clone the repository:
git clone https://github.com/your-username/portfolio-manager.git cd portfolio-manager -
Install dependencies:
npm install # or pnpm install # or yarn install
-
Set up Environment Variables:
Create a
.envfile in the root directory and add the following variables:# Database MONGODB_URI=your_mongodb_connection_string # Authentication (Better-Auth) BETTER_AUTH_SECRET=your_generated_secret BETTER_AUTH_URL=http://localhost:3000 # Finnhub API NEXT_PUBLIC_FINNHUB_API_KEY=your_finnhub_api_key FINNHUB_API_KEY=your_finnhub_api_key # Inngest (Optional for local dev, required for prod) # INNGEST_SIGNING_KEY=... # INNGEST_EVENT_KEY=...
-
Run the development server:
npm run dev # or pnpm devOpen http://localhost:3000 with your browser to see the result.
app/: Next.js App Router pages and layouts.components/: Reusable UI components.lib/: Utility functions, types, and server actions.Database/: Mongoose models and database connection logic.public/: Static assets.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.