From 56ecf089c9ac4d3cbb88d0324788816b79aa9576 Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 17 Sep 2026 10:40:01 +0330 Subject: [PATCH] feat: directories created --- Makefile | 0 cmd/api/main.go | 0 cmd/cli/main.go | 0 create-dir-structure.sh | 126 ++++++++++++++++++++++++++++ integration/auth/service_test.go | 0 integration/catalog/service_test.go | 0 integration/testutil/fixtures.go | 0 integration/testutil/migrations.go | 0 integration/testutil/postgres.go | 0 internal/app/app.go | 0 internal/app/config.go | 0 internal/auth/dto.go | 0 internal/auth/errors.go | 0 internal/auth/service.go | 0 internal/catalog/domain.go | 0 internal/catalog/dto.go | 0 internal/catalog/errors.go | 0 internal/catalog/repository.go | 0 internal/catalog/service.go | 0 internal/command/admin.go | 0 internal/command/root.go | 0 internal/command/seed.go | 0 internal/http/config.go | 0 internal/http/server.go | 0 internal/postgres/auth.go | 0 internal/postgres/catalog.go | 0 internal/postgres/db.go | 0 internal/postgres/query/auth.sql | 0 internal/postgres/query/catalog.sql | 0 internal/postgres/query/user.sql | 0 internal/postgres/user.go | 0 internal/user/domain.go | 0 internal/user/errors.go | 0 internal/user/repository.go | 0 pkg/apperr/error.go | 0 pkg/log/log.go | 0 sqlc.yaml | 0 37 files changed, 126 insertions(+) create mode 100644 Makefile create mode 100644 cmd/api/main.go create mode 100644 cmd/cli/main.go create mode 100644 create-dir-structure.sh create mode 100644 integration/auth/service_test.go create mode 100644 integration/catalog/service_test.go create mode 100644 integration/testutil/fixtures.go create mode 100644 integration/testutil/migrations.go create mode 100644 integration/testutil/postgres.go create mode 100644 internal/app/app.go create mode 100644 internal/app/config.go create mode 100644 internal/auth/dto.go create mode 100644 internal/auth/errors.go create mode 100644 internal/auth/service.go create mode 100644 internal/catalog/domain.go create mode 100644 internal/catalog/dto.go create mode 100644 internal/catalog/errors.go create mode 100644 internal/catalog/repository.go create mode 100644 internal/catalog/service.go create mode 100644 internal/command/admin.go create mode 100644 internal/command/root.go create mode 100644 internal/command/seed.go create mode 100644 internal/http/config.go create mode 100644 internal/http/server.go create mode 100644 internal/postgres/auth.go create mode 100644 internal/postgres/catalog.go create mode 100644 internal/postgres/db.go create mode 100644 internal/postgres/query/auth.sql create mode 100644 internal/postgres/query/catalog.sql create mode 100644 internal/postgres/query/user.sql create mode 100644 internal/postgres/user.go create mode 100644 internal/user/domain.go create mode 100644 internal/user/errors.go create mode 100644 internal/user/repository.go create mode 100644 pkg/apperr/error.go create mode 100644 pkg/log/log.go create mode 100644 sqlc.yaml diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e69de29 diff --git a/cmd/api/main.go b/cmd/api/main.go new file mode 100644 index 0000000..e69de29 diff --git a/cmd/cli/main.go b/cmd/cli/main.go new file mode 100644 index 0000000..e69de29 diff --git a/create-dir-structure.sh b/create-dir-structure.sh new file mode 100644 index 0000000..1723a15 --- /dev/null +++ b/create-dir-structure.sh @@ -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." diff --git a/integration/auth/service_test.go b/integration/auth/service_test.go new file mode 100644 index 0000000..e69de29 diff --git a/integration/catalog/service_test.go b/integration/catalog/service_test.go new file mode 100644 index 0000000..e69de29 diff --git a/integration/testutil/fixtures.go b/integration/testutil/fixtures.go new file mode 100644 index 0000000..e69de29 diff --git a/integration/testutil/migrations.go b/integration/testutil/migrations.go new file mode 100644 index 0000000..e69de29 diff --git a/integration/testutil/postgres.go b/integration/testutil/postgres.go new file mode 100644 index 0000000..e69de29 diff --git a/internal/app/app.go b/internal/app/app.go new file mode 100644 index 0000000..e69de29 diff --git a/internal/app/config.go b/internal/app/config.go new file mode 100644 index 0000000..e69de29 diff --git a/internal/auth/dto.go b/internal/auth/dto.go new file mode 100644 index 0000000..e69de29 diff --git a/internal/auth/errors.go b/internal/auth/errors.go new file mode 100644 index 0000000..e69de29 diff --git a/internal/auth/service.go b/internal/auth/service.go new file mode 100644 index 0000000..e69de29 diff --git a/internal/catalog/domain.go b/internal/catalog/domain.go new file mode 100644 index 0000000..e69de29 diff --git a/internal/catalog/dto.go b/internal/catalog/dto.go new file mode 100644 index 0000000..e69de29 diff --git a/internal/catalog/errors.go b/internal/catalog/errors.go new file mode 100644 index 0000000..e69de29 diff --git a/internal/catalog/repository.go b/internal/catalog/repository.go new file mode 100644 index 0000000..e69de29 diff --git a/internal/catalog/service.go b/internal/catalog/service.go new file mode 100644 index 0000000..e69de29 diff --git a/internal/command/admin.go b/internal/command/admin.go new file mode 100644 index 0000000..e69de29 diff --git a/internal/command/root.go b/internal/command/root.go new file mode 100644 index 0000000..e69de29 diff --git a/internal/command/seed.go b/internal/command/seed.go new file mode 100644 index 0000000..e69de29 diff --git a/internal/http/config.go b/internal/http/config.go new file mode 100644 index 0000000..e69de29 diff --git a/internal/http/server.go b/internal/http/server.go new file mode 100644 index 0000000..e69de29 diff --git a/internal/postgres/auth.go b/internal/postgres/auth.go new file mode 100644 index 0000000..e69de29 diff --git a/internal/postgres/catalog.go b/internal/postgres/catalog.go new file mode 100644 index 0000000..e69de29 diff --git a/internal/postgres/db.go b/internal/postgres/db.go new file mode 100644 index 0000000..e69de29 diff --git a/internal/postgres/query/auth.sql b/internal/postgres/query/auth.sql new file mode 100644 index 0000000..e69de29 diff --git a/internal/postgres/query/catalog.sql b/internal/postgres/query/catalog.sql new file mode 100644 index 0000000..e69de29 diff --git a/internal/postgres/query/user.sql b/internal/postgres/query/user.sql new file mode 100644 index 0000000..e69de29 diff --git a/internal/postgres/user.go b/internal/postgres/user.go new file mode 100644 index 0000000..e69de29 diff --git a/internal/user/domain.go b/internal/user/domain.go new file mode 100644 index 0000000..e69de29 diff --git a/internal/user/errors.go b/internal/user/errors.go new file mode 100644 index 0000000..e69de29 diff --git a/internal/user/repository.go b/internal/user/repository.go new file mode 100644 index 0000000..e69de29 diff --git a/pkg/apperr/error.go b/pkg/apperr/error.go new file mode 100644 index 0000000..e69de29 diff --git a/pkg/log/log.go b/pkg/log/log.go new file mode 100644 index 0000000..e69de29 diff --git a/sqlc.yaml b/sqlc.yaml new file mode 100644 index 0000000..e69de29