diff --git a/README.md b/README.md
index 66bb426..e69de29 100644
--- a/README.md
+++ b/README.md
@@ -1,36 +0,0 @@
-This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
-
-## Getting Started
-
-First, run the development server:
-
-```bash
-npm run dev
-# or
-yarn dev
-# or
-pnpm dev
-# or
-bun dev
-```
-
-Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
-
-You can start editing the page by modifying `app/page.js`. The page auto-updates as you edit the file.
-
-This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
-
-## Learn More
-
-To learn more about Next.js, take a look at the following resources:
-
-- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
-- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
-
-You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
-
-## Deploy on Vercel
-
-The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
-
-Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
diff --git a/dd.txt b/dd.txt
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/component/BrokerManagement.jsx b/src/app/component/BrokerManagement.jsx
index 26e176a..b68f4dd 100644
--- a/src/app/component/BrokerManagement.jsx
+++ b/src/app/component/BrokerManagement.jsx
@@ -1,7 +1,614 @@
+// "use client";
+// import Image from "next/image";
+// import logo from "../assets/images.png"
+// import React, { useState, useEffect } from 'react';
+// const getStatusIcon = (status) => {
+// switch (status) {
+// case 'active':
+// return ● ;
+// case 'inactive':
+// return ● ;
+// case 'expired':
+// return ● ;
+// default:
+// return ● ;
+// }
+// };
+// const ToggleSwitch = ({ checked, onChange }) => (
+//
+//
+//
+//
+//
+//
+// );
+// const SlidePanel = ({ isOpen, onClose, title, children, width = "w-96" }) => (
+// <>
+
+// {isOpen && (
+//
-
{title}
(
>
);
+
const BrokerManagement = () => {
const [activeMainTab, setActiveMainTab] = useState('Brokers');
const [activeSubTab, setActiveSubTab] = useState('API Management');
@@ -88,6 +696,7 @@ const BrokerManagement = () => {
onOff: true,
secretKey: ''
});
+
const [brokers, setBrokers] = useState([
{ id: 1, name: 'MarketAxess', apiId: '88234', broker: 'Meta5', dateAdded: 'Feb 14, 2025', status: 'active', balance: '$150.25', onOff: true, secretKey: 'sk-41ZBkLjY...' },
{ id: 2, name: 'Tradeweb Markets', apiId: '89245', broker: 'Angel One', dateAdded: 'Mar 01, 2025', status: 'inactive', balance: '$175.50', onOff: true, secretKey: 'sk-98AbcDeF...' },
@@ -100,6 +709,7 @@ const BrokerManagement = () => {
{ id: 9, name: 'MarketAxess', apiId: '88234', broker: 'Meta5', dateAdded: 'Feb 14, 2025', status: 'active', balance: '$150.25', onOff: true, secretKey: 'sk-78PqrStu...' },
{ id: 10, name: 'Tradeweb Markets', apiId: '89245', broker: 'Dhan', dateAdded: 'Mar 01, 2025', status: 'inactive', balance: '$175.50', onOff: true, secretKey: 'sk-98VwxYza...' },
]);
+
const handleAddBroker = () => {
setEditingBroker(null);
setFormData({
@@ -116,6 +726,7 @@ const BrokerManagement = () => {
setShowAddPanel(true);
setShowEditPanel(false);
};
+
const handleEditBroker = (broker) => {
setEditingBroker(broker);
setFormData({ ...broker });
@@ -123,11 +734,13 @@ const BrokerManagement = () => {
setShowAddPanel(false);
setShowEditPanel(true);
};
+
const handleDeleteBroker = (id) => {
if (window.confirm('Are you sure you want to delete this broker?')) {
setBrokers(brokers.filter(b => b.id !== id));
}
};
+
const handleSaveBroker = () => {
if (!formData.name || !formData.apiId || !formData.broker) {
alert('Please fill in all required fields');
@@ -149,9 +762,9 @@ const BrokerManagement = () => {
};
const handleToggle = (id) => {
- const updated=brokers.map(b =>
+ const updated = brokers.map(b =>
b.id === id ? { ...b, onOff: !b.onOff } : b
- )
+ );
setBrokers(updated);
};
@@ -177,19 +790,59 @@ const BrokerManagement = () => {
const statusFilters = ['All', 'Active', 'Inactive', 'Expired'];
return (
-
-
-
-
-
+ <>
+
+
+
+
+
+
+ LOGO
+
+
+ {mainTabs.map(tab => (
+ setActiveMainTab(tab)}
+ className={`pb-2 transition-all ${
+ activeMainTab === tab
+ ? 'text-blue-600 font-semibold border-b-2 border-blue-600'
+ : 'text-gray-600 hover:text-gray-900'
+ }`}
+ >
+ {tab}
+
+ ))}
+
+
+
📞
+
🔔
+
+ NSE
+
+ ✓
+
+
+
👤
+
+
+
+
+
Brokers / API Management
- {mainTabs.map(tab => (
+ {subTabs.map(tab => (
setActiveMainTab(tab)}
+ onClick={() => setActiveSubTab(tab)}
className={`pb-2 transition-all ${
- activeMainTab === tab
+ activeSubTab === tab
? 'text-blue-600 font-semibold border-b-2 border-blue-600'
: 'text-gray-600 hover:text-gray-900'
}`}
@@ -199,403 +852,373 @@ const BrokerManagement = () => {
))}
-
-
📞
-
🔔
-
-
NSE
-
- ✓
-
+
+
+
+ setSearchTerm(e.target.value)}
+ className="px-4 py-2 rounded border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500"
+ />
+
+ Filters ▼
+
-
👤
-
-
-
-
-
Brokers / API Management
-
- {subTabs.map(tab => (
- setActiveSubTab(tab)}
- className={`pb-2 transition-all ${
- activeSubTab === tab
- ? 'text-blue-600 font-semibold border-b-2 border-blue-600'
- : 'text-gray-600 hover:text-gray-900'
- }`}
- >
- {tab}
-
- ))}
-
-
-
-
-
- setSearchTerm(e.target.value)}
- className="px-4 py-2 rounded border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500"
- />
-
- Filters ▼
-
-
-
- {statusFilters.map(status => (
- setFilterStatus(status)}
- className={`px-4 py-2 rounded border transition-colors ${
- filterStatus === status
- ? 'bg-blue-100 border-blue-500 text-blue-700'
- : 'bg-white border-gray-300 hover:bg-gray-50'
- }`}
- >
- {status}
-
- ))}
-
- Export CSV
-
-
- Add Broker +
-
-
-
-
-
-
-
-
- Name
- API ID
- Broker
- Date Added
- Status
- Balance
- Action
- On/Off
-
-
-
- {Object.entries(groupedBrokers).map(([groupKey, groupBrokers]) => (
-
- {filterStatus !== 'All' && (
-
-
- {groupKey.split('-')[0].charAt(0).toUpperCase() + groupKey.split('-')[0].slice(1)} - {groupKey.split('-')[1].toUpperCase()}
-
-
- )}
- {groupBrokers
- .sort((a,b)=> a.id - b.id )
- .map(broker => (
-
- {broker.name}
- {broker.apiId}
- {broker.broker}
- {broker.dateAdded}
- {getStatusIcon(broker.status)}
- {broker.balance}
-
-
- 📋
- handleEditBroker(broker)}
- className="hover:scale-110 transition-transform"
- >
- ✏️
-
- handleDeleteBroker(broker.id)}
- className="hover:scale-110 transition-transform"
- >
- 🗑️
-
-
-
-
- handleToggle(broker.id)}
- />
-
-
- ))}
-
+
+ {statusFilters.map(status => (
+ setFilterStatus(status)}
+ className={`px-4 py-2 rounded border transition-colors ${
+ filterStatus === status
+ ? 'bg-blue-100 border-blue-500 text-blue-700'
+ : 'bg-white border-gray-300 hover:bg-gray-50'
+ }`}
+ >
+ {status}
+
))}
-
-
-
-
-
-
Last Synced: May 26, 2025 12:30
-
- 1
- 2
- ▶
-
-
-
-
{
- setIsPanelOpen(false);
- setShowAddPanel(false);
- }}
- title="Add Broker"
- width="w-96"
- >
-
-
-
- Name *
-
- setFormData({ ...formData, name: e.target.value })}
- placeholder="Enter a Name"
- className="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
- />
-
-
-
-
- Select Broker *
-
- setFormData({ ...formData, broker: e.target.value })}
- className="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
+
+ Export CSV
+
+
- Select Broker
- Meta5
- Angel One
- Zerodha
- Dhan
-
+ Add Broker +
+
+
-
-
-
API Details
-
- Help me connect to the API
+
+
+
+
+ Name
+ API ID
+ Broker
+ Date Added
+ Status
+ Balance
+ Action
+ On/Off
+
+
+
+ {Object.entries(groupedBrokers).map(([groupKey, groupBrokers]) => (
+
+ {filterStatus !== 'All' && (
+
+
+ {groupKey.split('-')[0].charAt(0).toUpperCase() + groupKey.split('-')[0].slice(1)} - {groupKey.split('-')[1].toUpperCase()}
+
+
+ )}
+ {groupBrokers
+ .sort((a,b)=> a.id - b.id )
+ .map(broker => (
+
+ {broker.name}
+ {broker.apiId}
+ {broker.broker}
+ {broker.dateAdded}
+ {getStatusIcon(broker.status)}
+ {broker.balance}
+
+
+ 📋
+ handleEditBroker(broker)}
+ className="hover:scale-110 transition-transform"
+ >
+ ✏️
+
+ handleDeleteBroker(broker.id)}
+ className="hover:scale-110 transition-transform"
+ >
+ 🗑️
+
+
+
+
+ handleToggle(broker.id)}
+ />
+
+
+ ))}
+
+ ))}
+
+
+
+
+
+
Last Synced: May 26, 2025 12:30
+
+ 1
+ 2
+ ▶
+
+
+
+ {
+ setIsPanelOpen(false);
+ setShowAddPanel(false);
+ }}
+ title="Add Broker"
+ width="w-96"
+ >
+
+
+
+ Name *
+
+ setFormData({ ...formData, name: e.target.value })}
+ placeholder="Enter a Name"
+ className="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
+ />
+
+
+
+
+ Select Broker *
+
+ setFormData({ ...formData, broker: e.target.value })}
+ className="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
+ >
+ Select Broker
+ Meta5
+ Angel One
+ Zerodha
+ Dhan
+
+
+
+
+
+
API Details
+
+ Help me connect to the API
+
+
+
+
+
+
+ API Key *
+
+
setFormData({ ...formData, apiId: e.target.value })}
+ placeholder="api_key_1234567890abcdefABCDE"
+ className="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
+ />
+
Date Created: {formData.dateAdded}
+
+
+
+
+ Secret API Key
+
+ setFormData({ ...formData, secretKey: e.target.value })}
+ placeholder="sk-41ZBkLjY..."
+ className="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
+ />
+
+
+
+
+ Balance
+
+ setFormData({ ...formData, balance: e.target.value })}
+ placeholder="$0.00"
+ className="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
+ />
+
+
+
+
+ Status
+
+ setFormData({ ...formData, status: e.target.value })}
+ className="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
+ >
+ Active
+ Inactive
+ Expired
+
+
+
+
+
+
+ {
+ setIsPanelOpen(false);
+ setShowAddPanel(false);
+ }}
+ className="flex-1 px-4 py-2 border border-gray-300 rounded hover:bg-gray-50 transition-colors"
+ >
+ Cancel
+
+
+ Add
+
+
-
-
-
- API Key *
-
-
setFormData({ ...formData, apiId: e.target.value })}
- placeholder="api_key_1234567890abcdefABCDE"
- className="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
- />
-
Date Created: {formData.dateAdded}
+
{
+ setIsPanelOpen(false);
+ setShowEditPanel(false);
+ }}
+ title="Edit Broker"
+ width="w-96"
+ >
+
+
+
+ Name *
+
+ setFormData({ ...formData, name: e.target.value })}
+ placeholder="Enter a Name"
+ className="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
+ />
+
+
+
+
+ Select Broker *
+
+ setFormData({ ...formData, broker: e.target.value })}
+ className="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
+ >
+ Select Broker
+ Meta5
+ Angel One
+ Zerodha
+ Dhan
+
+
+
+
+
+
API Details
+
+ Help me connect to the API
+
-
-
- Secret API Key
-
- setFormData({ ...formData, secretKey: e.target.value })}
- placeholder="sk-41ZBkLjY..."
- className="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
- />
-
+
+
+
+ API Key *
+
+
setFormData({ ...formData, apiId: e.target.value })}
+ placeholder="api_key_1234567890abcdefABCDE"
+ className="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
+ />
+
Date Modified: {formData.dateAdded}
+
-
-
- Balance
-
- setFormData({ ...formData, balance: e.target.value })}
- placeholder="$0.00"
- className="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
- />
-
+
+
+ Secret API Key
+
+ setFormData({ ...formData, secretKey: e.target.value })}
+ placeholder="sk-41ZBkLjY..."
+ className="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
+ />
+
-
-
- Status
-
-
setFormData({ ...formData, status: e.target.value })}
- className="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
- >
- Active
- Inactive
- Expired
-
+
+
+ Balance
+
+ setFormData({ ...formData, balance: e.target.value })}
+ placeholder="$0.00"
+ className="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
+ />
+
+
+
+
+ Status
+
+ setFormData({ ...formData, status: e.target.value })}
+ className="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
+ >
+ Active
+ Inactive
+ Expired
+
+
-
-
- {
- setIsPanelOpen(false);
- setShowAddPanel(false);
- }}
- className="flex-1 px-4 py-2 border border-gray-300 rounded hover:bg-gray-50 transition-colors"
- >
- Cancel
-
-
- Add
-
-
-
-
-
-
{
- setIsPanelOpen(false);
- setShowEditPanel(false);
- }}
- title="Edit Broker"
- width="w-96"
- >
-
-
-
- Name *
-
- setFormData({ ...formData, name: e.target.value })}
- placeholder="Enter a Name"
- className="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
- />
-
-
-
-
- Select Broker *
-
- setFormData({ ...formData, broker: e.target.value })}
- className="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
- >
- Select Broker
- Meta5
- Angel One
- Zerodha
- Dhan
-
-
-
-
-
-
API Details
-
- Help me connect to the API
+
+ {
+ setIsPanelOpen(false);
+ setShowEditPanel(false);
+ }}
+ className="flex-1 px-4 py-2 border border-gray-300 rounded hover:bg-gray-50 transition-colors"
+ >
+ Cancel
+
+
+ Save
-
-
-
-
- API Key *
-
-
setFormData({ ...formData, apiId: e.target.value })}
- placeholder="api_key_1234567890abcdefABCDE"
- className="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
- />
-
Date Modified: {formData.dateAdded}
-
-
-
-
- Secret API Key
-
- setFormData({ ...formData, secretKey: e.target.value })}
- placeholder="sk-41ZBkLjY..."
- className="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
- />
-
-
-
-
- Balance
-
- setFormData({ ...formData, balance: e.target.value })}
- placeholder="$0.00"
- className="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
- />
-
-
-
-
- Status
-
- setFormData({ ...formData, status: e.target.value })}
- className="w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"
- >
- Active
- Inactive
- Expired
-
-
-
-
-
- {
- setIsPanelOpen(false);
- setShowEditPanel(false);
- }}
- className="flex-1 px-4 py-2 border border-gray-300 rounded hover:bg-gray-50 transition-colors"
- >
- Cancel
-
-
- Save
-
-
-
-
-
+
+
+ >
);
};
diff --git a/src/app/layout.js b/src/app/layout.js
index 7bf337d..20b3ef9 100644
--- a/src/app/layout.js
+++ b/src/app/layout.js
@@ -1,15 +1,12 @@
-import { Geist, Geist_Mono } from "next/font/google";
+import { Be_Vietnam_Pro } from "next/font/google";
import "./globals.css";
-const geistSans = Geist({
- variable: "--font-geist-sans",
+const BeVietnamPro = Be_Vietnam_Pro({
+ variable: "--font-be-vietnam-pro",
subsets: ["latin"],
+ weight:['100','200','300','400','500','600','700','800','900']
});
-const geistMono = Geist_Mono({
- variable: "--font-geist-mono",
- subsets: ["latin"],
-});
export const metadata = {
title: "Create Next App",
@@ -18,10 +15,8 @@ export const metadata = {
export default function RootLayout({ children }) {
return (
-
-
+
+
{children}
diff --git a/src/app/page.js b/src/app/page.js
index af1b7e3..971d9ca 100644
--- a/src/app/page.js
+++ b/src/app/page.js
@@ -1,9 +1,10 @@
// app/page.jsx
import BrokerManagement from "./component/BrokerManagement";
-export default function Home() {
+export default function Home()
+{
return (
-
+ {/* */}
);