Coder Social home page Coder Social logo

alexamster / node-penguin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from etabits/node-penguin

0.0 1.0 0.0 1.25 MB

Automatically generates administration pages based on your Mongoose models.

License: GNU General Public License v2.0

Makefile 0.18% CoffeeScript 4.72% JavaScript 56.75% CSS 36.81% Shell 0.06% HTML 1.49%

node-penguin's Introduction

node-penguin

Automatically generates administration pages based on your Mongoose models.

For basic use, you don't have to alter anything in your mongoose models definition, Penguin will read the definition and automagically create edit/add forms, in addition to a basic listing.

Live example

Check penguin.etabits.com/admin/.

Usage

In your app:

app = express()
// ...

require('coffee-script/register') // <-- This dependency is to be removed very soon.
penguin = require('penguin')
admin = new penguin.Admin()
admin.setupApp(app)

This assumes that you have ./models directory at the top level of your app.

The administration panel will mount at /admin/ by default.

Check the ./example directory for a complete example (Every feature is covered in the example).

Features

  • Custom actions: per row (rowActions), selected rows (pageActions), and current set (setActions).
  • Automatic pagination of content
  • Search inside text fields (quick filtering box)
  • Support for referenced mongoose models ({type: ObjectId, ref: RemoteModel}, automatic .populate()...).
  • Sorting by columns
  • Add new documents, and edit existing ones
  • Basic file upload manager
  • Currently support basic field types (String, Date, ObjectId, Boolean).

Minor Features

  • Can set row class for table listing using the $pTableRowClass schema virtual.
  • Can override default menu, use menu key to set your own links.
  • Default sort, use Model.$p.sort.

Roadmap

  • Convert everything to plain javascript before publishing
  • Deleting documents support
  • Support for more fields
  • More configurable parts
  • Tests & Documentation!

node-penguin's People

Contributors

aularon avatar sogko avatar panozzaj avatar alexamster avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.