core: `universal-box add storage` command
#111 opened on Oct 2, 2024
Repository metrics
- Stars
- (49 stars)
- PR merge metrics
- (PR metrics pending)
Description
Feature Request for universal-box add <feature>
Is your feature request related to a problem you're trying to solve with Universal-Box? Please describe.
This feature aims to enhance Universal-Box by allowing users to dynamically add components to their applications using the command universal-box add <feature>. This flexibility will enable developers to customize their projects without relying on fixed templates.
Describe the solution you'd like
Implementing a command structure that allows users to add features such as storage and authentication dynamically. For example, when a user runs universal-box add storage, the following workflow should occur:
- Check the Existing Project Structure: Analyze the current project setup to understand its structure.
- Determine the Type of Project: Identify the type of project based on existing files.
- Ask the User Which Storage Solution to Integrate: Prompt the user with options like Firebase, AWS S3, or Local Storage.
- Install Relevant Packages: Based on the user's choice, install necessary packages (e.g.,
npm install firebasefor Firebase). - Create a Configuration File: Generate a configuration file (e.g.,
storageConfig.js) with default settings specific to the chosen storage solution.
// storageConfig.js
const firebaseConfig = {
apiKey: "YOUR_API_KEY",
authDomain: "YOUR_AUTH_DOMAIN",
projectId: "YOUR_PROJECT_ID",
storageBucket: "YOUR_STORAGE_BUCKET",
messagingSenderId: "YOUR_MESSAGING_SENDER_ID",
appId: "YOUR_APP_ID"
};
-
Generate Necessary Directories: Create a directory (e.g.,
/src/storage) to organize all storage-related code. -
Update Documentation: Automatically update
README.mdto include instructions on how to use the newly added functionality.
How would this feature improve Universal-Box?
- Implementing this feature will significantly enhance Universal-Box by allowing developers to tailor their applications according to their specific needs. It promotes best practices by ensuring that all necessary configurations and dependencies are handled automatically, leading to better collaboration and fewer bugs in applications.
Additional context
- I have some doubts about how the codebase will understand and customize itself effectively. One potential solution could be utilizing an in-house Language Model (LLM) tailored to our needs, rather than relying on third-party APIs. This approach would ensure long-term sustainability and cost-effectiveness for developers.
- The same logic applies to implementing commands like
universal-box add auth. We can start with theuniversal-box add storagefeature and then replicate this approach for other commands.
This issue is open to discussions! Feel free to join our Discord for further conversation. I will also be creating similar issues like universal-box add auth if anyone wants to take that up.