Next.js projeleri için otomatik PostgreSQL tablo yönetimi ve CRUD arayüzü
npm install easy-adminpanelThis package is an admin panel solution that can be easily integrated into your Next.js projects, creating an automatic CRUD interface for your PostgreSQL database.
- Easy Setup: Integrates into your Next.js project with a single command
- Dynamic Table Management: Automatically detects PostgreSQL tables in your application
- Automatic CRUD Interfaces: Provides listing, adding, editing, and deletion screens for selected tables
- Modern UI: Features a modern interface using Tailwind CSS and ShadCN UI
- Secure: Runs within your own project, giving you full access control
``bashWith NPM
npm install easy-adminpanel
After installation, run the following command to integrate the admin panel into your project:
`bash
npx easy-adminpanel init
`or with custom options:
`bash
npx easy-adminpanel init --route=/admin --envVar=DATABASE_URL --title="Custom Admin Panel"
`Usage
After installation, follow these steps:
1. Add your database connection information to the
.env file:
`
POSTGRES_URL="postgres://user:password@host:port/database"
`2. Start your application:
`bash
npm run dev
`3. Access the admin panel from your browser:
`
http://localhost:3000/easy-adminpanel
`4. On first use, select the tables you want to manage.
Integration with Your Next.js Project
To integrate programmatically, you can use it in your
next.config.js file as follows:`javascript
const { setupEasyAdminPanel } = require('easy-adminpanel');/* @type {import('next').NextConfig} /
const nextConfig = {
// ... your existing configuration
};
module.exports = setupEasyAdminPanel(nextConfig, {
route: '/admin', // Optional: URL where admin panel will be accessible
envVar: 'DATABASE_URL', // Optional: Environment variable for database connection string
title: 'Admin Panel', // Optional: Panel title
});
``MIT