3.0.1 • Published 4 months ago

easy-adminpanel v3.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Easy Admin Panel

This 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.

Features

  • 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

Installation

# With NPM
npm install easy-adminpanel

# or with Yarn
yarn add easy-adminpanel

# or with PNPM
pnpm add easy-adminpanel

After installation, run the following command to integrate the admin panel into your project:

npx easy-adminpanel init

or with custom options:

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:

    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:

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
});

Features

Table Management

  • Select which database tables to include in the admin panel
  • Automatic schema detection for all tables
  • Dynamic form generation based on column types

CRUD Operations

  • List: View all records with pagination
  • Create: Add new records with auto-generated forms
  • Update: Edit existing records with pre-filled forms
  • Delete: Remove records with confirmation dialog

User Interface

  • Clean, responsive design using Tailwind CSS
  • Modern components from ShadCN UI
  • Intuitive navigation between tables and operations

License

MIT

3.0.1

4 months ago

3.0.0

4 months ago

2.0.0

4 months ago

1.0.16

4 months ago

1.0.15

4 months ago

1.0.14

4 months ago

1.0.13

4 months ago

1.0.12

4 months ago

1.0.11

5 months ago

1.0.10

5 months ago

1.0.9

5 months ago

1.0.8

5 months ago

1.0.7

5 months ago

1.0.6

5 months ago

1.0.5

5 months ago

1.0.4

5 months ago

1.0.3

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago