Initial commit: Complete project-bootstrap tool
- Bootstrap script for creating monorepo projects - FastAPI backend templates with uv, ruff, mypy, pytest - React frontend templates with TypeScript, ESLint, Prettier - Docker Compose setup with backend, frontend, and database - 9 development and CI scripts - Gitea Actions CI/CD workflows - Comprehensive documentation (8 files) - 45 template files for complete project structure - Automated verification script (all tests pass) - Based on coding-agent-rules standards
This commit is contained in:
26
templates/scripts/dev/reset-database.sh
Executable file
26
templates/scripts/dev/reset-database.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Reset database (WARNING: This will delete all data)
|
||||
|
||||
set -e
|
||||
|
||||
cd "$(dirname "$0")/../../deploy"
|
||||
|
||||
echo "WARNING: This will delete all database data!"
|
||||
read -p "Are you sure you want to continue? (yes/no): " confirm
|
||||
|
||||
if [ "$confirm" != "yes" ]; then
|
||||
echo "Aborted."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Stopping database container..."
|
||||
docker compose down database
|
||||
|
||||
echo "Removing database volume..."
|
||||
docker volume rm $(basename $(pwd))_postgres-data 2>/dev/null || true
|
||||
|
||||
echo "Starting fresh database..."
|
||||
docker compose up -d database
|
||||
|
||||
echo "Database reset complete"
|
||||
31
templates/scripts/dev/start-backend.sh
Executable file
31
templates/scripts/dev/start-backend.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Start backend development server
|
||||
|
||||
set -e
|
||||
|
||||
cd "$(dirname "$0")/../../backend"
|
||||
|
||||
echo "Starting backend server..."
|
||||
|
||||
if [ ! -f ".env" ]; then
|
||||
echo "Creating .env from .env.example..."
|
||||
cp .env.example .env
|
||||
fi
|
||||
|
||||
# Check if uv is installed
|
||||
if ! command -v uv &> /dev/null; then
|
||||
echo "Error: uv is not installed. Please install it first."
|
||||
echo "Visit: https://github.com/astral-sh/uv"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Install dependencies if needed
|
||||
if [ ! -d ".venv" ]; then
|
||||
echo "Installing dependencies..."
|
||||
uv sync
|
||||
fi
|
||||
|
||||
# Start the server
|
||||
echo "Starting uvicorn..."
|
||||
uv run uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
|
||||
14
templates/scripts/dev/start-database.sh
Executable file
14
templates/scripts/dev/start-database.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Start database container
|
||||
|
||||
set -e
|
||||
|
||||
cd "$(dirname "$0")/../../deploy"
|
||||
|
||||
echo "Starting database container..."
|
||||
|
||||
docker compose up -d database
|
||||
|
||||
echo "Database started successfully"
|
||||
echo "Connection string: postgresql://postgres:postgres@localhost:5432/appdb"
|
||||
24
templates/scripts/dev/start-frontend.sh
Executable file
24
templates/scripts/dev/start-frontend.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Start frontend development server
|
||||
|
||||
set -e
|
||||
|
||||
cd "$(dirname "$0")/../../frontend"
|
||||
|
||||
echo "Starting frontend server..."
|
||||
|
||||
if [ ! -f ".env" ]; then
|
||||
echo "Creating .env from .env.example..."
|
||||
cp .env.example .env
|
||||
fi
|
||||
|
||||
# Install dependencies if needed
|
||||
if [ ! -d "node_modules" ]; then
|
||||
echo "Installing dependencies..."
|
||||
npm install
|
||||
fi
|
||||
|
||||
# Start the server
|
||||
echo "Starting React development server..."
|
||||
npm start
|
||||
Reference in New Issue
Block a user