neon-scaffolder v1.0.3
๐ 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.
โจ 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
Initialize a New Project
Start by running the following command to create a new project:
neon-scaffolder
Input API key
The CLI will prompt you to input the Neon API key.
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.
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! ๐