business-dashboard
このビジネスダッシュボードは、データの視覚化と分析を目的としたJavaScriptベースのツールです。ユーザーはリアルタイムでデータを確認し、ビジネスのパフォーマンスを評価できます。機能はシンプルですが、カスタマイズ性が高く、さまざまなデータソースに接続可能です。
GitHubスター
0
ユーザー評価
未評価
お気に入り
0
閲覧数
14
フォーク
0
イシュー
0
Business Dashboard
Interactive business dashboard connecting to PostgreSQL via MCP tool. This application provides real-time visualization of key business metrics including revenue, profits, product performance, and customer acquisition.
Features
- Interactive Dashboard: Real-time display of business performance metrics
- Revenue Tracking: Monitor monthly revenue trends with visual charts
- Product Analysis: Identify top-performing products and categories
- Profit Margin Analysis: Track profitability across product categories
- Customer Acquisition: Monitor new customer sign-ups over time
- PostgreSQL Integration: Direct connection to your database via MCP tool
Technical Stack
- Backend: Node.js with Express
- Frontend: React with Recharts for data visualization
- Database: PostgreSQL via MCP tool
- Styling: Tailwind CSS
Prerequisites
- Node.js (v14 or higher)
- npm (v6 or higher)
- Access to a PostgreSQL database via the MCP tool
- The required database schema (see docs/database-setup.md)
Installation
Clone the repository:
git clone https://github.com/pankajmisr/business-dashboard.git cd business-dashboard
Install server dependencies:
npm install
Install client dependencies:
cd client npm install cd ..
Configure the database connection:
- Create a
.env
file in the root directory (or edit the existing one) - Add your PostgreSQL connection details:
PORT=5000 DB_HOST=example-servers/postgres DB_PORT=5432 DB_NAME=mcp_demo DB_USER=postgres DB_PASSWORD=
- Create a
Running the Application
Start the development server (both frontend and backend):
npm run dev-all
The application will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
API Endpoints
GET /api/summary
: Overall business performance metricsGET /api/top-products
: Best-selling productsGET /api/category-performance
: Category-wise performanceGET /api/monthly-sales
: Monthly revenue trendsGET /api/customer-acquisition
: New customer sign-ups by month
Database Schema
This application expects specific tables and schemas in your PostgreSQL database. See Database Setup for details on the required schema.
Deployment
For production deployment:
Build the React frontend:
cd client npm run build cd ..
Set the environment variable:
NODE_ENV=production
Start the server:
npm start
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature-name
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin feature-name
- Submit a pull request
License
This project is licensed under the MIT License - see the LICENSE file for details.