Skip to content

fchchen/portfolio-dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Portfolio Dashboard

A full-stack web application for tracking and managing portfolio companies. Built to demonstrate end-to-end development capabilities with modern technologies.

Tech Stack

Frontend

  • Next.js 14 (App Router)
  • React 18 with TypeScript
  • Tailwind CSS for styling
  • Recharts for data visualization
  • Axios for API communication

Backend

  • ASP.NET Core 10 Web API
  • Entity Framework Core with PostgreSQL
  • JWT Authentication
  • BCrypt for password hashing

Database

  • PostgreSQL

Features

  • Authentication: Secure user registration and login with JWT tokens
  • Dashboard: Portfolio overview with key metrics and interactive charts
  • Company Management: CRUD operations for portfolio companies
  • Metrics Tracking: Track revenue, employees, customers, and churn over time
  • Role-Based Access: Admin and Viewer roles with appropriate permissions
  • Responsive Design: Works on desktop and mobile devices

Project Structure

portfolio-dashboard/
├── backend/                 # ASP.NET Core API
│   ├── Controllers/         # API endpoints
│   ├── Data/               # DbContext and migrations
│   ├── DTOs/               # Data transfer objects
│   ├── Models/             # Entity models
│   ├── Services/           # Business logic
│   └── Program.cs          # Application entry point
│
├── frontend/               # Next.js application
│   └── src/
│       ├── app/           # Pages (App Router)
│       ├── components/    # Reusable UI components
│       ├── contexts/      # React contexts (Auth)
│       ├── lib/           # API client
│       └── types/         # TypeScript types
│
└── README.md

Getting Started

Prerequisites

Database Setup

  1. Install PostgreSQL and create a database:
CREATE DATABASE portfolio_dashboard;
  1. Update the connection string in backend/appsettings.json:
{
  "ConnectionStrings": {
    "DefaultConnection": "Host=localhost;Database=portfolio_dashboard;Username=your_user;Password=your_password"
  }
}

Backend Setup

cd backend

# Restore packages
dotnet restore

# Apply migrations
dotnet ef database update

# Run the API
dotnet run

The API will be available at http://localhost:5000

Frontend Setup

cd frontend

# Install dependencies
npm install

# Create environment file
cp .env.example .env.local

# Run the development server
npm run dev

The frontend will be available at http://localhost:3000

API Endpoints

Method Endpoint Description Auth
POST /api/auth/register Register new user No
POST /api/auth/login Login No
GET /api/companies List all companies Yes
POST /api/companies Create company Admin
GET /api/companies/{id} Get company details Yes
PUT /api/companies/{id} Update company Admin
DELETE /api/companies/{id} Delete company Admin
GET /api/companies/{id}/metrics Get company metrics Yes
POST /api/companies/{id}/metrics Add metric Admin
GET /api/dashboard/summary Get dashboard summary Yes

Deployment

Frontend (Vercel)

  1. Push code to GitHub
  2. Connect repository to Vercel
  3. Set environment variable: NEXT_PUBLIC_API_URL
  4. Deploy

Backend (Railway)

  1. Push code to GitHub
  2. Create new project on Railway
  3. Add PostgreSQL plugin
  4. Set environment variables from Railway's PostgreSQL
  5. Deploy

Screenshots

Dashboard

Portfolio overview with key metrics and interactive charts showing revenue trends and industry breakdown.

Dashboard

Companies List

View all portfolio companies with latest revenue and employee counts.

Companies

Company Detail

Individual company view with performance metrics over time.

Company Detail

Login

Secure authentication with JWT tokens.

Login

License

MIT

About

Full-stack portfolio company dashboard for tracking business metrics and KPIs. Built with Next.js, ASP.NET Core, and PostgreSQL. Features JWT authentication, interactive charts, and role-based access control.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages