Skip to content

vlhsmylv/adminator

Repository files navigation

Adminator

Adminator is an open-source admin panel generation tool that enables developers to effortlessly create admin panels by providing a schema in a specific .adt format. It parses the schema and generates a fully functional admin panel tailored to your needs.

Features

  • Schema Parsing: Define your data schema in .adt format, and Adminator will handle the rest.
  • Admin Panel Generation: Automatically generate a customizable admin panel based on your schema.
  • User-Friendly Interface: A clean and intuitive admin panel for managing your data.
  • Extensibility: Easily adapt or extend the generated admin panel for advanced use cases.

Installation

  1. Clone the repository:

    git clone https://github.com/vlhsmylv/adminator.git
    cd adminator
  2. Install dependencies:

    npm install
  3. Run the development server:

    npm start

Usage

1. Define Your Schema

Create a .adt file in the schema directory with your schema definition. Example schema format:

-- User --
== Creates user ==
id    string  true  true  *  255
name  string  *     *     *  255
email string  *     *     *  255

2. Generate Schema and Models

  1. Run npm run parse-schema to get parsed schema
  2. Run npm run generate-models to generate models and DTO

3. Run the server

Run npm run start:server to start server

Go to http://localhost:20002/api-docs to see Swagger Docs

Flow

1. Parse Schema

npm run parse-schema takes your schema from schema/index.adt and parses into schema/schema.parsed.json meaning you can add your schema via json also.

2. Generate Models and DTO

npm run generate-models takes your parsed schema from schema/schema.parsed.json, generates Mongoose model and DTOs (interface) under dto & models folders respectively.

3. Run the server

npm run start:server runs ts file under web/index.ts on port 20002. You can access Swagger docs on /api-docs.

Schema Format

The .adt format supports the following syntax:

-- {Schema Name} --
== {Optional Description} ==
{name} {type} {isPrimary} {isAutogenerated} {minLength} {maxLength}
  • name: Name of the field (e.g., id, name).
  • type: Data type (e.g., string, int).
  • isPrimary: true if this is a primary key; otherwise, false or *.
  • isAutogenerated: true if this field is autogenerated; otherwise, false or *.
  • minLength: Minimum character length (use * if not applicable).
  • maxLength: Maximum character length.

Contributing

We welcome contributions from the community! Here's how you can help:

  1. Fork the repository.
  2. Create a feature branch.
  3. Commit your changes.
  4. Submit a pull request.

Please follow our contribution guidelines when submitting a PR.

Roadmap

  • Support for multiple .adt files.
  • Enhanced UI customization for generated admin panels.
  • Export generated panels as standalone projects.
  • Integration with SQL databases (e.g. PostgreSQL).
  • API flow creation

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments

Special thanks to the open-source community for their inspiration and support in building this tool.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors