commit 95d68e9481ef4bebf18f5093123c9bef7c20b113 Author: ulflow_phattt2901 Date: Thu Jun 5 21:21:28 2025 +0700 Initial commit diff --git a/.air.toml b/.air.toml new file mode 100644 index 0000000..820a766 --- /dev/null +++ b/.air.toml @@ -0,0 +1,58 @@ +# Air Tomb Configuration for ULFlow Starter Kit +root = "." +tmp_dir = "tmp" + +[build] +# Just plain old shell command. You could use `make` as well. +cmd = "go build -o ./tmp/main.exe ./cmd/app" +# Binary file yields from `cmd`. +bin = "tmp/main.exe" +# Customize binary. +full_bin = "./tmp/main.exe" +# Watch these filename extensions. +include_ext = ["go", "tpl", "tmpl", "html"] +# Ignore these filename extensions or directories. +exclude_dir = ["assets", "tmp", "vendor", ".git", "node_modules"] +# Watch these directories if you specified. +include_dir = [] +# Exclude files. +exclude_file = [] +# This log file places in your tmp_dir. +log = "air.log" +# It's not necessary to trigger build each time file changes if it's too frequent. +delay = 1000 # ms +# Stop running old binary when build errors occur. +stop_on_error = true +# Send Interrupt signal before killing process (windows does not support this feature) +send_interrupt = true +# Delay after sending Interrupt signal +kill_delay = 500 # ms + +[log] +# Show log time +time = true + +[color] +# Customize each part's color. +main = "magenta" +watcher = "cyan" +build = "yellow" +runner = "green" + +[misc] +# Delete tmp directory on exit +clean_on_exit = true + +[screen] +clear_on_rebuild = true +keep_scroll = true + +[tomb] +# Enable Tomb for graceful shutdown +enabled = true +# Kill signal to use for graceful shutdown +signal = "SIGTERM" +# Timeout for graceful shutdown +timeout = "5s" +# Path to the tomb config file +config = "./tomb.yaml" diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..da3acec --- /dev/null +++ b/.dockerignore @@ -0,0 +1,62 @@ +# Version control +.git +.gitignore +.gitattributes + +# Build artifacts +/bin/ +/dist/ + +# IDE specific files +.vscode/ +.idea/ +*.swp +*.swo + +# Environment files (except .env.example) +.env +!.env.example + +# Log files +*.log +logs/ + +# OS generated files +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# Test files +*_test.go +/test/ +/coverage.txt + +# Dependency directories +/vendor/ +/node_modules/ + +# Local development files +docker-compose.override.yml + +# Build cache +.cache/ +.air.toml + +# Temporary files +*.tmp +*.temp + +# Local configuration overrides +configs/local.* + +# Documentation +/docs/ +*.md + +# Ignore Dockerfile and docker-compose files (if you're building from source) +# !Dockerfile +# !docker-compose*.yml diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..b7266f9 --- /dev/null +++ b/.env.example @@ -0,0 +1,32 @@ +# App Configuration +APP_NAME="ULFlow Starter Kit" +APP_VERSION="0.1.0" +APP_ENVIRONMENT="development" +APP_TIMEZONE="Asia/Ho_Chi_Minh" + +# Logger Configuration +LOG_LEVEL="info" # debug, info, warn, error + +# Server Configuration +SERVER_HOST="0.0.0.0" +SERVER_PORT=3000 +SERVER_READ_TIMEOUT=15 +SERVER_WRITE_TIMEOUT=15 +SERVER_SHUTDOWN_TIMEOUT=30 + +# Database Configuration +DB_DRIVER="postgres" +DB_HOST="localhost" +DB_PORT=5432 +DB_USERNAME="postgres" +DB_PASSWORD="your_password_here" +DB_NAME="ulflow" +DB_SSLMODE="disable" + +# JWT Configuration +JWT_SECRET="your-32-byte-base64-encoded-secret-key-here" +JWT_ACCESS_TOKEN_EXPIRE=15 # in minutes +JWT_REFRESH_TOKEN_EXPIRE=10080 # in minutes (7 days) +JWT_ALGORITHM="HS256" +JWT_ISSUER="ulflow-starter-kit" +JWT_AUDIENCE="ulflow-web" diff --git a/.feature-flags.json b/.feature-flags.json new file mode 100644 index 0000000..49be960 --- /dev/null +++ b/.feature-flags.json @@ -0,0 +1,5 @@ +{ + "enable_database": { + "enabled": true + } + } \ No newline at end of file diff --git a/.gitea/commit-template.txt b/.gitea/commit-template.txt new file mode 100644 index 0000000..c1b5a6b --- /dev/null +++ b/.gitea/commit-template.txt @@ -0,0 +1,14 @@ +# : + +# + +#