feat: directories created
This commit is contained in:
@@ -0,0 +1,126 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
echo "Creating Robot Market Phase 1 backend structure..."
|
||||
|
||||
# Directories
|
||||
directories=(
|
||||
# Applications
|
||||
"cmd/api"
|
||||
"cmd/cli"
|
||||
|
||||
# Application bootstrap
|
||||
"internal/app"
|
||||
|
||||
# CLI commands
|
||||
"internal/command"
|
||||
|
||||
# Domain features
|
||||
"internal/user"
|
||||
"internal/auth"
|
||||
"internal/catalog"
|
||||
|
||||
# HTTP layer
|
||||
"internal/http/handler"
|
||||
"internal/http/route"
|
||||
"internal/http/middleware"
|
||||
|
||||
# Database layer
|
||||
"internal/postgres/query"
|
||||
"internal/postgres/sqlc"
|
||||
|
||||
# Shared packages
|
||||
"pkg/apperr"
|
||||
"pkg/log"
|
||||
|
||||
# Integration tests
|
||||
"integration/auth"
|
||||
"integration/catalog"
|
||||
"integration/testutil"
|
||||
|
||||
# Database migrations
|
||||
"migrations"
|
||||
|
||||
# Scripts
|
||||
"scripts"
|
||||
)
|
||||
|
||||
for dir in "${directories[@]}"; do
|
||||
mkdir -p "$dir"
|
||||
done
|
||||
|
||||
|
||||
# Placeholder files
|
||||
files=(
|
||||
# API
|
||||
"cmd/api/main.go"
|
||||
|
||||
# CLI
|
||||
"cmd/cli/main.go"
|
||||
|
||||
# App
|
||||
"internal/app/app.go"
|
||||
"internal/app/config.go"
|
||||
|
||||
# Commands
|
||||
"internal/command/root.go"
|
||||
"internal/command/admin.go"
|
||||
"internal/command/seed.go"
|
||||
|
||||
# User
|
||||
"internal/user/domain.go"
|
||||
"internal/user/repository.go"
|
||||
"internal/user/errors.go"
|
||||
|
||||
# Auth
|
||||
"internal/auth/dto.go"
|
||||
"internal/auth/service.go"
|
||||
"internal/auth/errors.go"
|
||||
|
||||
# Catalog
|
||||
"internal/catalog/domain.go"
|
||||
"internal/catalog/dto.go"
|
||||
"internal/catalog/service.go"
|
||||
"internal/catalog/repository.go"
|
||||
"internal/catalog/errors.go"
|
||||
|
||||
# HTTP
|
||||
"internal/http/server.go"
|
||||
"internal/http/config.go"
|
||||
|
||||
# PostgreSQL
|
||||
"internal/postgres/db.go"
|
||||
"internal/postgres/user.go"
|
||||
"internal/postgres/auth.go"
|
||||
"internal/postgres/catalog.go"
|
||||
|
||||
# sqlc query placeholders
|
||||
"internal/postgres/query/user.sql"
|
||||
"internal/postgres/query/auth.sql"
|
||||
"internal/postgres/query/catalog.sql"
|
||||
|
||||
# Shared packages
|
||||
"pkg/apperr/error.go"
|
||||
"pkg/log/log.go"
|
||||
|
||||
# Integration tests
|
||||
"integration/auth/service_test.go"
|
||||
"integration/catalog/service_test.go"
|
||||
|
||||
"integration/testutil/postgres.go"
|
||||
"integration/testutil/migrations.go"
|
||||
"integration/testutil/fixtures.go"
|
||||
|
||||
# Root files
|
||||
"sqlc.yaml"
|
||||
"Makefile"
|
||||
"go.mod"
|
||||
)
|
||||
|
||||
for file in "${files[@]}"; do
|
||||
touch "$file"
|
||||
done
|
||||
|
||||
|
||||
echo "Phase 1 structure created successfully."
|
||||
Reference in New Issue
Block a user