1.0.3 โ€ข Published 11 months ago

neon-scaffolder v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

๐Ÿš€ Neon Scaffolder

Neon Scaffolder is a Node.js CLI tool designed to streamline the process of creating and setting up a new project connected to a Neon database. With Neon Scaffolder, you can select from a variety of predefined templates (e.g., Laravel, Astro) and generate a fully-configured project ready for development out of the box.

Demo

โœจ Features

  • ๐ŸŽฏ Create Neon Projects: Automatically create a new Neon project using the Neon API.
  • ๐Ÿ“ฆ Predefined Templates: Choose from multiple project templates such as Laravel, Astro, and more.
  • ๐Ÿ”ง Dynamic Configuration: The CLI uses Mustache templating to inject necessary configuration into the scaffolded project.
  • ๐ŸŒ GitHub Integration: Templates are stored in the Neon Scaffolder GitHub organization, making it easy to add new templates.
  • โšก๏ธ Out-of-the-box Setup: Generated projects come pre-configured and connected to the Neon database, allowing you to start coding right away.

๐Ÿ“ฅ Installation

To install Neon Scaffolder, ensure you have Node.js installed, then run:

npm install -g neon-scaffolder

๐Ÿš€ Usage

  1. Initialize a New Project

    Start by running the following command to create a new project:

    neon-scaffolder
  2. Input API key

    The CLI will prompt you to input the Neon API key.

  1. Project Setup

    Neon Scaffolder will ask you to select template, and automatically download the selected template, scaffold the project, and configure it using Mustache templating to connect with your Neon database.

  2. Start Development

    Once the setup is complete, navigate to your project directory:

    cd my-new-project

    Begin your development process with all configurations in place. Each template also comes with README file, which includes documentation for each framework.

๐Ÿ“š Available Templates

The following templates are currently supported:

  • ๐Ÿ”จ Laravel: A PHP framework for web artisans.
  • โœจ Astro: A modern static site generator.
  • ๐Ÿš€ More to come: You can easily add more templates by opening pull request.

Current templates are stored in seperate Github organization.

๐Ÿ”„ Adding New Templates

To add a new template, follow these steps:

1. Create public Github repository, containing new project scaffold template.

Scaffold templating is done using Mustache syntax. You can use templating in any of the template files, but include all of the files that you want to be templated in templated_files array in templates.js.

You can use any variables that are returned when calling Create Project request.

2. Fork this repository, update the templates.json file to include your new template.

3. Submit a pull request to have your template included.

You can see the templates examples on Neon Scaffolder GitHub organization.

๐Ÿ—บ๏ธ Roadmap

Hereโ€™s what Iโ€™ve got planned for the future of Neon Scaffolder. I'm always open to new ideas and contributions, so feel free to jump in if something catches your eye!

1. ๐ŸŒ Central API Server for Templates

Right now, adding a new template requires updating the templates.json file through a merge request. To make this easier, Iโ€™m planning to build a central API server that can handle and serve templates dynamically. This means you could add new templates without needing to mess with the CLI codebaseโ€”just plug them into the API, and theyโ€™ll be ready to go.

2. โš™๏ธ Enhanced Neon Project Creation Options

I want to give you more control over the Neon project creation process. Some ideas Iโ€™m working on include:

  • Custom Database Configurations: Letting you set up custom database settings during project creation.
  • Environment Management: Supporting multiple environments (e.g., development, staging, production) with easy switching between them.
  • Flexible Project Naming: Implementing customizable naming conventions for better project organization.

3. ๐Ÿ“ฆ Expanded Template Library

The goal is to have a wide range of templates available. Along with Laravel and Astro, Iโ€™m planning to add:

  • React/Next.js: For building modern web apps with React.
  • Django: A solid option for Python developers.
  • Express.js: A minimalist and flexible web framework for Node.js.

4. ๐Ÿงฉ Modular Architecture for the CLI

As this project was created for hackathon, currently it is written in MVP approach, and might not follow the best architecture practices. To keep things flexible and easy to maintain, Iโ€™m planning to refactor the CLI into a more modular system. Each feature (like project creation or template management) would be its own module, making it simpler to develop, test, and add new features.

๐Ÿค Contributing

Contributions are welcome! Feel free to submit issues or pull requests on GitHub.

๐Ÿ“œ License

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


๐ŸŽ‰ Acknowledgments

This project is a part of the Neon Open Source Starter Kit Challenge.


Happy coding! ๐Ÿš€