Enhance setup script with robust credentials, environment, and dynamic database configuration#23
Draft
Enhance setup script with robust credentials, environment, and dynamic database configuration#23
Conversation
Co-authored-by: danielpaul <333233+danielpaul@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Setup script make more robust
Enhance setup script with robust credentials and environment file handling
Aug 14, 2025
danielpaul
reviewed
Aug 14, 2025
Owner
danielpaul
left a comment
There was a problem hiding this comment.
@copilot ask for the project name and replace the database name in database.yml for the prefix with the project name
Co-authored-by: danielpaul <333233+danielpaul@users.noreply.github.com>
Contributor
Author
Added dynamic project name configuration to the setup script. The script now prompts users for a project name and automatically replaces the database prefix in Key features:
Commit: ed49a7e Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Copilot
AI
changed the title
Enhance setup script with robust credentials and environment file handling
Enhance setup script with robust credentials, environment, and dynamic database configuration
Aug 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The setup script has been enhanced to handle common configuration issues that developers encounter when setting up the application, particularly around Rails credentials, environment variables, and database naming customization.
Key Improvements
1. Robust Credentials Management
The setup script now intelligently handles the scenario where
config/credentials.yml.encexists butconfig/master.keyis missing. When this situation is detected, users are presented with three clear options:2. Dynamic Database Configuration
The setup script now prompts users for a custom project name and automatically updates the database configuration to use that name as the prefix instead of the hardcoded "rapid_rails_inertia_js". This allows developers to customize their database names during setup:
== Database Configuration == Current database prefix: rapid_rails_inertia_js Enter your project name (or press Enter to keep 'rapid_rails_inertia_js'): my_awesome_app Updating database configuration with project name: my_awesome_app ✓ Database configuration updated with prefix: my_awesome_appFeatures include:
3. Automatic Environment File Setup
The script automatically creates a
.envfile from.env.exampleif it doesn't already exist, ensuring developers have the necessary environment configuration template.4. Enhanced User Guidance
Added comprehensive messaging throughout the setup process with clear status indicators (✓, ⚠, ℹ) for better visual feedback, step-by-step instructions, and references to example files.
5. Improved Documentation
Updated the README with detailed quick start guide, manual setup instructions as fallback, credentials troubleshooting section, and clear environment variable documentation.
Testing
All existing tests pass (32 examples, 0 failures), RuboCop style checks pass, Brakeman security scan shows no warnings, and frontend linting passes. The database name replacement logic has been thoroughly tested.
The enhanced setup script maintains full backward compatibility while providing a much more robust and user-friendly experience for new developers setting up the application.
Fixes #22.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.