Admin Panel Feature
A standalone admin panel feature for React applications.
Features
- System status monitoring
- Bug and feature request tracking
- Screenshot capture and upload
- Real-time metrics display
Installation
npm install admin-panel-feature
Usage
- Import the AdminPanel component:
import { AdminPanel } from 'admin-panel-feature';
- Use the component in your React application:
function App() {
return (
<div>
<h1>My App</h1>
<AdminPanel />
</div>
);
}
- Ensure you have the required API routes set up in your Next.js application:
/api/status
: Get system status/api/status/metrics
: Get real-time metrics/api/sync/bugs
: Sync bug reports/api/screenshots
: Upload screenshots
Configuration
Make sure to set up your MongoDB connection string in your application's environment variables:
MONGODB_URI=your_mongodb_connection_string
Dependencies
This package has the following peer dependencies:
- react: ^17.0.0 || ^18.0.0
- react-dom: ^17.0.0 || ^18.0.0
- next: ^12.0.0 || ^13.0.0
- mongodb: ^5.0.0
Ensure these are installed in your project.
Development
- Clone the repository
- Install dependencies:
npm install
- Start the development server:
npm run start
Testing
Run the tests with:
npm test
Linting
Lint the code with:
npm run lint
Building
Build the package with:
npm run build
License
MIT