Initial commit - Church Music Database

This commit is contained in:
2026-01-27 18:04:50 -06:00
commit d367261867
336 changed files with 103545 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
@echo off
REM Configure Windows Firewall for No-IP External Access
REM Run this script as Administrator
echo ========================================
echo CHURCH APP FIREWALL CONFIGURATION
echo ========================================
echo.
echo Creating firewall rule for Frontend (Port 3000)...
netsh advfirewall firewall add rule name="Church App Frontend" dir=in action=allow protocol=TCP localport=3000 profile=any
if %errorlevel% equ 0 (
echo [OK] Frontend rule created
) else (
echo [ERROR] Failed to create frontend rule
)
echo.
echo Creating firewall rule for Backend (Port 5000)...
netsh advfirewall firewall add rule name="Church App Backend" dir=in action=allow protocol=TCP localport=5000 profile=any
if %errorlevel% equ 0 (
echo [OK] Backend rule created
) else (
echo [ERROR] Failed to create backend rule
)
echo.
echo ========================================
echo FIREWALL RULES CONFIGURED
echo ========================================
echo.
echo To verify, run: netsh advfirewall firewall show rule name=all
echo.
pause

View File

@@ -0,0 +1,22 @@
@echo off
REM ========================================
REM Church SongLyric - Quick Restart
REM ========================================
title Restart All Services
color 0E
echo.
echo ========================================
echo RESTARTING ALL SERVICES
echo ========================================
echo.
echo Stopping services...
call stop-all-services.bat
timeout /t 3 /nobreak >nul
echo.
echo Starting services...
call start-all-services.bat

View File

@@ -0,0 +1,81 @@
@echo off
REM ========================================
REM Church SongLyric - All Services Launcher
REM ========================================
REM This script starts MongoDB, Backend, and Frontend in hidden windows
title Church SongLyric - Service Launcher
color 0A
echo.
echo ========================================
echo CHURCH SONGLYRIC SERVICE LAUNCHER
echo ========================================
echo.
REM Check if MongoDB is running
echo [1/4] Checking MongoDB...
tasklist /FI "IMAGENAME eq mongod.exe" 2>NUL | find /I /N "mongod.exe">NUL
if "%ERRORLEVEL%"=="0" (
echo MongoDB is already running
) else (
echo Starting MongoDB...
start "" "C:\Program Files\MongoDB\Server\8.0\bin\mongod.exe" --dbpath "C:\data\db"
timeout /t 3 /nobreak >nul
echo MongoDB started
)
echo.
echo [2/4] Starting Backend Server (Flask)...
cd /d "%~dp0backend"
start "Church Backend" /MIN cmd /c "venv\Scripts\python.exe app.py"
timeout /t 3 /nobreak >nul
echo Backend starting on port 5000...
echo.
echo [3/4] Starting Frontend Server (React)...
cd /d "%~dp0frontend"
start "Church Frontend" /MIN cmd /c "npm start"
timeout /t 5 /nobreak >nul
echo Frontend starting on port 3000...
echo.
echo [4/4] Verifying services...
timeout /t 5 /nobreak >nul
REM Test backend
powershell -Command "try { $r = Invoke-RestMethod -Uri 'http://localhost:5000/api/health' -TimeoutSec 5; Write-Host ' Backend: ONLINE - Status:' $r.status -ForegroundColor Green } catch { Write-Host ' Backend: Starting... (wait 10 seconds)' -ForegroundColor Yellow }"
REM Test frontend
powershell -Command "try { $r = Invoke-WebRequest -Uri 'http://localhost:3000' -TimeoutSec 5 -UseBasicParsing; Write-Host ' Frontend: ONLINE' -ForegroundColor Green } catch { Write-Host ' Frontend: Starting... (wait 10 seconds)' -ForegroundColor Yellow }"
echo.
echo ========================================
echo ALL SERVICES STARTED!
echo ========================================
echo.
echo Access URLs:
echo Local: http://localhost:3000
echo LAN: http://192.168.10.178:3000
echo External: http://houseofprayer.ddns.net:3000
echo.
echo Backend API:
echo Local: http://localhost:5000
echo External: http://houseofprayer.ddns.net:8080
echo.
echo Services running in background (minimized windows)
echo Close those windows to stop the servers
echo.
echo Press any key to open the app in browser...
pause >nul
start http://localhost:3000
echo.
echo ========================================
echo App opened in browser!
echo ========================================
echo.
echo To stop all services, run: stop-all-services.bat
echo.
pause

View File

@@ -0,0 +1,33 @@
@echo off
REM Start Both Backend and Frontend Servers
REM This script launches both servers in separate windows
echo ========================================
echo CHURCH APP - STARTING ALL SERVERS
echo ========================================
echo.
echo [1/2] Starting Backend Server (Flask API)...
start "Church App - Backend" cmd /k "cd /d "%~dp0" && start-backend.bat"
timeout /t 3 /nobreak > nul
echo [2/2] Starting Frontend Server (React)...
start "Church App - Frontend" cmd /k "cd /d "%~dp0" && start-frontend.bat"
echo.
echo ========================================
echo BOTH SERVERS STARTED
echo ========================================
echo.
echo Two new windows have opened:
echo 1. Backend Server (Flask API on port 5000)
echo 2. Frontend Server (React on port 3000)
echo.
echo Access the app at:
echo Local: http://localhost:3000
echo LAN: http://192.168.74.1:3000
echo External: http://houseofprayer.ddns.net:3000
echo.
echo To stop servers, close both windows or press Ctrl+C
echo.
pause

View File

@@ -0,0 +1,26 @@
@echo off
REM Start Church Song Lyric Backend Server
REM This script starts the Flask backend API
echo ========================================
echo CHURCH APP - BACKEND SERVER
echo ========================================
echo.
echo Starting Flask API server on port 5000...
echo Local Access: http://localhost:5000
echo LAN Access: http://192.168.10.178:5000
echo External Access: http://houseofprayer.ddns.net:5000
echo.
echo Press Ctrl+C to stop the server
echo ========================================
echo.
cd /d "%~dp0backend"
REM Activate virtual environment
call venv\Scripts\activate.bat
REM Start Flask server
python app.py
pause

View File

@@ -0,0 +1,24 @@
@echo off
REM Start Church Song Lyric Frontend
REM This script starts the React development server
echo ========================================
echo CHURCH APP - FRONTEND SERVER
echo ========================================
echo.
echo Starting React development server on port 3000...
echo Local Access: http://localhost:3000
echo LAN Access: http://192.168.10.178:3000
echo External Access: http://houseofprayer.ddns.net:3000
echo.
echo The browser will open automatically in a few seconds...
echo Press Ctrl+C to stop the server
echo ========================================
echo.
cd /d "%~dp0frontend"
REM Start React development server
npm start
pause

View File

@@ -0,0 +1,44 @@
@echo off
REM ========================================
REM Church SongLyric - Stop All Services
REM ========================================
title Stop All Services
color 0C
echo.
echo ========================================
echo STOPPING ALL CHURCH SONGLYRIC SERVICES
echo ========================================
echo.
echo [1/3] Stopping Frontend (Node.js)...
taskkill /FI "WindowTitle eq Church Frontend*" /T /F >nul 2>&1
tasklist /FI "IMAGENAME eq node.exe" 2>NUL | find /I /N "node.exe">NUL
if "%ERRORLEVEL%"=="0" (
echo Stopping all Node.js processes...
taskkill /IM node.exe /F >nul 2>&1
echo Frontend stopped
) else (
echo Frontend not running
)
echo.
echo [2/3] Stopping Backend (Python)...
taskkill /FI "WindowTitle eq Church Backend*" /T /F >nul 2>&1
wmic process where "commandline like '%%app.py%%'" delete >nul 2>&1
echo Backend stopped
echo.
echo [3/3] Stopping MongoDB (optional)...
echo Note: MongoDB will keep running (recommended for quick restarts)
echo To stop MongoDB manually, run: net stop MongoDB
echo.
echo ========================================
echo ALL SERVICES STOPPED!
echo ========================================
echo.
echo To restart, run: start-all-services.bat
echo.
pause

View File

@@ -0,0 +1,107 @@
@echo off
REM Test No-IP Configuration
REM This script tests if your No-IP setup is working
echo ========================================
echo NO-IP CONFIGURATION TEST
echo ========================================
echo.
echo Domain: houseofprayer.ddns.net
echo.
echo [1/5] Testing DNS Resolution...
echo.
nslookup houseofprayer.ddns.net
if %errorlevel% equ 0 (
echo [OK] DNS resolves correctly
) else (
echo [ERROR] DNS resolution failed
echo Make sure No-IP DUC is running and up to date
)
echo.
echo ========================================
echo.
echo [2/5] Checking if backend is running locally...
echo.
curl -s http://localhost:5000/api/health > nul 2>&1
if %errorlevel% equ 0 (
echo [OK] Backend running on localhost:5000
curl http://localhost:5000/api/health
) else (
echo [ERROR] Backend not running
echo Start the backend server first: start-backend.bat
)
echo.
echo ========================================
echo.
echo [3/5] Checking if frontend is running locally...
echo.
curl -s http://localhost:3000 > nul 2>&1
if %errorlevel% equ 0 (
echo [OK] Frontend running on localhost:3000
) else (
echo [WARNING] Frontend not detected
echo Start the frontend server: start-frontend.bat
)
echo.
echo ========================================
echo.
echo [4/5] Checking listening ports...
echo.
netstat -an | findstr ":5000"
netstat -an | findstr ":3000"
if %errorlevel% equ 0 (
echo [OK] Servers are listening on required ports
) else (
echo [WARNING] Servers may not be listening
)
echo.
echo ========================================
echo.
echo [5/5] Testing external backend access...
echo.
echo Attempting to connect to: http://houseofprayer.ddns.net:5000/api/health
echo.
curl -s --connect-timeout 5 http://houseofprayer.ddns.net:5000/api/health
if %errorlevel% equ 0 (
echo.
echo [OK] External access working!
echo Your No-IP setup is complete and working
) else (
echo.
echo [ERROR] Cannot connect externally
echo.
echo Possible issues:
echo 1. Router port forwarding not configured
echo 2. Windows Firewall blocking connections
echo 3. No-IP DUC not running or not updated
echo 4. ISP blocking the port
echo.
echo To test from outside your network:
echo - Use phone with mobile data (WiFi off)
echo - Visit: http://houseofprayer.ddns.net:5000/api/health
)
echo.
echo ========================================
echo.
echo Test Summary:
echo - DNS Resolution: Check above
echo - Local Backend: Check above
echo - Local Frontend: Check above
echo - Port Listening: Check above
echo - External Access: Check above
echo.
echo Next Steps:
echo 1. If DNS fails: Check No-IP DUC is running
echo 2. If local fails: Start the servers
echo 3. If external fails: Configure router port forwarding
echo 4. If still fails: Run configure-firewall.bat as admin
echo.
echo For detailed troubleshooting, see: NOIP_SETUP_GUIDE.md
echo.
pause