Update project documentation and scripts for improved setup and bilingual support

- Enhanced `README.md` with a quick start guide and detailed project structure.
- Updated `SETUP_GUIDE.md` by removing it as it was redundant.
- Improved `local-development.md` and `development.md` with clearer instructions for database migrations.
- Added bilingual comments in various scripts for better understanding and usability.
- Updated `.gitignore` to include specific build scripts while ignoring others.
- Enhanced `scripts` for database management, including backup and seeding functionalities with bilingual support.
This commit is contained in:
Ho Ngoc Hai
2025-12-27 10:12:46 +07:00
parent 79866e22cf
commit 29c40ea681
23 changed files with 528 additions and 392 deletions

View File

@@ -13,20 +13,22 @@ GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
# Check if we're in the project root
# EN: Check if we're in the project root
# VI: Kiểm tra xem có đang ở root project không
if [ ! -f "package.json" ]; then
echo -e "${RED}❌ Error: Must run from project root${NC}"
echo -e "${RED}❌ Error: Must run from project root / Lỗi: Phải chạy từ root project${NC}"
exit 1
fi
# Setup shared environment
# EN: Setup shared environment
# VI: Thiết lập môi trường chia sẻ
echo ""
echo "📦 Step 1: Setup shared environment (deployments/local/.env.local)"
if [ -f "deployments/local/.env.local" ]; then
echo -e "${YELLOW}⚠️ deployments/local/.env.local already exists${NC}"
read -p "Overwrite? (y/n): " overwrite
echo -e "${YELLOW}⚠️ deployments/local/.env.local already exists / đã tồn tại${NC}"
read -p "Overwrite? (y/n): / Ghi đè? (y/n): " overwrite
if [ "$overwrite" != "y" ]; then
echo "Skipping shared environment setup"
echo "Skipping shared environment setup / Bỏ qua thiết lập môi trường chia sẻ"
else
cp deployments/local/env.local.example deployments/local/.env.local
echo -e "${GREEN}✅ Created deployments/local/.env.local${NC}"
@@ -36,11 +38,13 @@ else
echo -e "${GREEN}✅ Created deployments/local/.env.local${NC}"
fi
# Setup service-specific environments
# EN: Setup service-specific environments
# VI: Thiết lập môi trường cụ thể cho từng service
echo ""
echo "📦 Step 2: Setup service-specific environments"
# Function to setup service env
# EN: Function to setup service env
# VI: Hàm để setup env cho service
setup_service_env() {
local service=$1
local service_path="services/$service"