From e3550fedac305ebb02d10ecdc3d18a1bc59dcf3b Mon Sep 17 00:00:00 2001 From: fish Date: Mon, 13 Apr 2026 20:15:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=A1=B9=E7=9B=AE=E7=BB=93?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 548 ------------------ LICENSE | 18 - README.md | 2 - app/README.md | 0 backend/README.md | 0 .../services/user-service/docker-compose.yml | 102 ---- {backend/deploy => deploy}/local/redis.conf | 0 frontend/README.md | 0 {backend/gateway => gateway}/.dockerignore | 0 {backend/gateway => gateway}/Dockerfile | 0 .../nginx/conf.d/default.conf | 0 .../nginx/conf.d/services/order-service.conf | 0 .../conf.d/services/payment-service.conf | 0 .../nginx/conf.d/services/user-service.conf | 0 {backend/gateway => gateway}/nginx/nginx.conf | 0 {backend/scripts => scripts}/gateway.sh | 0 .../init-multiple-databases.sh | 0 .../user-service/Dockerfile | 0 .../user-service/migrations/001_init.sql | 0 .../user-service/user-login/Cargo.toml | 0 .../user-service/user-login/Dockerfile | 0 .../user-service/user-login/src/main.rs | 0 .../user-service/user-register/Cargo.toml | 0 .../user-service/user-register/Dockerfile | 0 .../user-service/user-register/src/main.rs | 0 25 files changed, 670 deletions(-) delete mode 100644 .gitignore delete mode 100644 LICENSE delete mode 100644 app/README.md delete mode 100644 backend/README.md delete mode 100644 backend/services/user-service/docker-compose.yml rename {backend/deploy => deploy}/local/redis.conf (100%) delete mode 100644 frontend/README.md rename {backend/gateway => gateway}/.dockerignore (100%) rename {backend/gateway => gateway}/Dockerfile (100%) rename {backend/gateway => gateway}/nginx/conf.d/default.conf (100%) rename {backend/gateway => gateway}/nginx/conf.d/services/order-service.conf (100%) rename {backend/gateway => gateway}/nginx/conf.d/services/payment-service.conf (100%) rename {backend/gateway => gateway}/nginx/conf.d/services/user-service.conf (100%) rename {backend/gateway => gateway}/nginx/nginx.conf (100%) rename {backend/scripts => scripts}/gateway.sh (100%) rename {backend/scripts => scripts}/init-multiple-databases.sh (100%) rename {backend/services => services}/user-service/Dockerfile (100%) rename {backend/services => services}/user-service/migrations/001_init.sql (100%) rename {backend/services => services}/user-service/user-login/Cargo.toml (100%) rename {backend/services => services}/user-service/user-login/Dockerfile (100%) rename {backend/services => services}/user-service/user-login/src/main.rs (100%) rename {backend/services => services}/user-service/user-register/Cargo.toml (100%) rename {backend/services => services}/user-service/user-register/Dockerfile (100%) rename {backend/services => services}/user-service/user-register/src/main.rs (100%) diff --git a/.gitignore b/.gitignore deleted file mode 100644 index fc44fc4..0000000 --- a/.gitignore +++ /dev/null @@ -1,548 +0,0 @@ -# ---> Go -# If you prefer the allow list template instead of the deny list, see community template: -# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore -# -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib - -# Test binary, built with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Dependency directories (remove the comment below to include it) -# vendor/ - -# Go workspace file -go.work -go.work.sum - -# env file -.env - -# ---> Python -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ -cover/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# UV -# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -#uv.lock - -# poetry -# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control -#poetry.lock - -# pdm -# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. -#pdm.lock -# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it -# in version control. -# https://pdm.fming.dev/latest/usage/project/#working-with-version-control -.pdm.toml -.pdm-python -.pdm-build/ - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -# PyCharm -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ - -# Ruff stuff: -.ruff_cache/ - -# PyPI configuration file -.pypirc - -# ---> Rust -# Generated by Cargo -# will have compiled files and executables -debug/ -target/ - -# These are backup files generated by rustfmt -**/*.rs.bk - -# MSVC Windows builds of rustc generate these, which store debugging information -*.pdb - -# RustRover -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ -# ---> Node -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* -.pnpm-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# Snowpack dependency directory (https://snowpack.dev/) -web_modules/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional stylelint cache -.stylelintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variable files -.env -.env.development.local -.env.test.local -.env.production.local -.env.local - -# parcel-bundler cache (https://parceljs.org/) -.cache -.parcel-cache - -# Next.js build output -.next -out - -# Nuxt.js build / generate output -.nuxt -dist - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and not Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# vuepress v2.x temp and cache directory -.temp -.cache - -# vitepress build output -**/.vitepress/dist - -# vitepress cache directory -**/.vitepress/cache - -# Docusaurus cache and generated files -.docusaurus - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port - -# Stores VSCode versions used for testing VSCode extensions -.vscode-test - -# yarn v2 -.yarn/cache -.yarn/unplugged -.yarn/build-state.yml -.yarn/install-state.gz -.pnp.* - -# ---> Xcode -## User settings -xcuserdata/ - -# ---> macOS -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# ---> Flutter -# Miscellaneous -*.class -*.lock -*.log -*.pyc -*.swp -.buildlog/ -.history - - - -# Flutter repo-specific -/bin/cache/ -/bin/internal/bootstrap.bat -/bin/internal/bootstrap.sh -/bin/mingit/ -/dev/benchmarks/mega_gallery/ -/dev/bots/.recipe_deps -/dev/bots/android_tools/ -/dev/devicelab/ABresults*.json -/dev/docs/doc/ -/dev/docs/flutter.docs.zip -/dev/docs/lib/ -/dev/docs/pubspec.yaml -/dev/integration_tests/**/xcuserdata -/dev/integration_tests/**/Pods -/packages/flutter/coverage/ -version -analysis_benchmark.json - -# packages file containing multi-root paths -.packages.generated - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -**/generated_plugin_registrant.dart -.packages -.pub-preload-cache/ -.pub/ -build/ -flutter_*.png -linked_*.ds -unlinked.ds -unlinked_spec.ds - -# Android related -**/android/**/gradle-wrapper.jar -.gradle/ -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java -**/android/key.properties -*.jks - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/.last_build_id -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Flutter.podspec -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/ephemeral -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/Flutter/flutter_export_environment.sh -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* - -# macOS -**/Flutter/ephemeral/ -**/Pods/ -**/macos/Flutter/GeneratedPluginRegistrant.swift -**/macos/Flutter/ephemeral -**/xcuserdata/ - -# Windows -**/windows/flutter/generated_plugin_registrant.cc -**/windows/flutter/generated_plugin_registrant.h -**/windows/flutter/generated_plugins.cmake - -# Linux -**/linux/flutter/generated_plugin_registrant.cc -**/linux/flutter/generated_plugin_registrant.h -**/linux/flutter/generated_plugins.cmake - -# Coverage -coverage/ - -# Symbols -app.*.symbols - -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages -!/dev/ci/**/Gemfile.lock -# ---> Android -# Gradle files -.gradle/ -build/ - -# Local configuration file (sdk path, etc) -local.properties - -# Log/OS Files -*.log - -# Android Studio generated files and folders -captures/ -.externalNativeBuild/ -.cxx/ -*.apk -output.json - -# IntelliJ -*.iml -.idea/ -misc.xml -deploymentTargetDropDown.xml -render.experimental.xml - -# Keystore files -*.jks -*.keystore - -# Google Services (e.g. APIs or Firebase) -google-services.json - -# Android Profiling -*.hprof - -backend/desc.md diff --git a/LICENSE b/LICENSE deleted file mode 100644 index d6be502..0000000 --- a/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -MIT License - -Copyright (c) 2026 fish - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and -associated documentation files (the "Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO -EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index be22c99..e69de29 100644 --- a/README.md +++ b/README.md @@ -1,2 +0,0 @@ -# asset_helper - diff --git a/app/README.md b/app/README.md deleted file mode 100644 index e69de29..0000000 diff --git a/backend/README.md b/backend/README.md deleted file mode 100644 index e69de29..0000000 diff --git a/backend/services/user-service/docker-compose.yml b/backend/services/user-service/docker-compose.yml deleted file mode 100644 index 03dd965..0000000 --- a/backend/services/user-service/docker-compose.yml +++ /dev/null @@ -1,102 +0,0 @@ -version: "3.8" - -services: - user-login: - build: - context: ../.. - dockerfile: services/user-service/user-login/Dockerfile - container_name: user-login - environment: - - RUST_LOG=info - - DATABASE_URL=postgres://postgres:postgres@user-db:5432/user_db - - REDIS_URL=redis://user-redis:6379/0 - - SERVICE_NAME=user-login - - SERVICE_PORT=8080 - - JWT_SECRET=${JWT_SECRET:-dev-secret-key} - ports: - - "8001:8080" - depends_on: - user-db: - condition: service_healthy - user-redis: - condition: service_healthy - networks: - - user-network - restart: unless-stopped - healthcheck: - test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8080/health"] - interval: 30s - timeout: 10s - retries: 3 - - user-register: - build: - context: ../.. - dockerfile: services/user-service/user-register/Dockerfile - container_name: user-register - environment: - - RUST_LOG=info - - DATABASE_URL=postgres://postgres:postgres@user-db:5432/user_db - - REDIS_URL=redis://user-redis:6379/0 - - SERVICE_NAME=user-register - - SERVICE_PORT=8080 - ports: - - "8002:8080" - depends_on: - user-db: - condition: service_healthy - user-redis: - condition: service_healthy - networks: - - user-network - restart: unless-stopped - healthcheck: - test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8080/health"] - interval: 30s - timeout: 10s - retries: 3 - - user-db: - image: postgres:18.3-alpine3.23 - container_name: user-db - environment: - - POSTGRES_USER=postgres - - POSTGRES_PASSWORD=postgres - - POSTGRES_DB=user_db - volumes: - - user_postgres_data:/var/lib/postgresql/data - - ./migrations:/docker-entrypoint-initdb.d:ro - ports: - - "5432:5432" - networks: - - user-network - restart: unless-stopped - healthcheck: - test: ["CMD-SHELL", "pg_isready -U postgres -d user_db"] - interval: 10s - timeout: 5s - retries: 5 - - user-redis: - image: redis:8.6.2-alpine - container_name: user-redis - volumes: - - user_redis_data:/data - ports: - - "6379:6379" - networks: - - user-network - restart: unless-stopped - healthcheck: - test: ["CMD", "redis-cli", "ping"] - interval: 10s - timeout: 5s - retries: 5 - -networks: - user-network: - driver: bridge - -volumes: - user_postgres_data: - user_redis_data: diff --git a/backend/deploy/local/redis.conf b/deploy/local/redis.conf similarity index 100% rename from backend/deploy/local/redis.conf rename to deploy/local/redis.conf diff --git a/frontend/README.md b/frontend/README.md deleted file mode 100644 index e69de29..0000000 diff --git a/backend/gateway/.dockerignore b/gateway/.dockerignore similarity index 100% rename from backend/gateway/.dockerignore rename to gateway/.dockerignore diff --git a/backend/gateway/Dockerfile b/gateway/Dockerfile similarity index 100% rename from backend/gateway/Dockerfile rename to gateway/Dockerfile diff --git a/backend/gateway/nginx/conf.d/default.conf b/gateway/nginx/conf.d/default.conf similarity index 100% rename from backend/gateway/nginx/conf.d/default.conf rename to gateway/nginx/conf.d/default.conf diff --git a/backend/gateway/nginx/conf.d/services/order-service.conf b/gateway/nginx/conf.d/services/order-service.conf similarity index 100% rename from backend/gateway/nginx/conf.d/services/order-service.conf rename to gateway/nginx/conf.d/services/order-service.conf diff --git a/backend/gateway/nginx/conf.d/services/payment-service.conf b/gateway/nginx/conf.d/services/payment-service.conf similarity index 100% rename from backend/gateway/nginx/conf.d/services/payment-service.conf rename to gateway/nginx/conf.d/services/payment-service.conf diff --git a/backend/gateway/nginx/conf.d/services/user-service.conf b/gateway/nginx/conf.d/services/user-service.conf similarity index 100% rename from backend/gateway/nginx/conf.d/services/user-service.conf rename to gateway/nginx/conf.d/services/user-service.conf diff --git a/backend/gateway/nginx/nginx.conf b/gateway/nginx/nginx.conf similarity index 100% rename from backend/gateway/nginx/nginx.conf rename to gateway/nginx/nginx.conf diff --git a/backend/scripts/gateway.sh b/scripts/gateway.sh similarity index 100% rename from backend/scripts/gateway.sh rename to scripts/gateway.sh diff --git a/backend/scripts/init-multiple-databases.sh b/scripts/init-multiple-databases.sh similarity index 100% rename from backend/scripts/init-multiple-databases.sh rename to scripts/init-multiple-databases.sh diff --git a/backend/services/user-service/Dockerfile b/services/user-service/Dockerfile similarity index 100% rename from backend/services/user-service/Dockerfile rename to services/user-service/Dockerfile diff --git a/backend/services/user-service/migrations/001_init.sql b/services/user-service/migrations/001_init.sql similarity index 100% rename from backend/services/user-service/migrations/001_init.sql rename to services/user-service/migrations/001_init.sql diff --git a/backend/services/user-service/user-login/Cargo.toml b/services/user-service/user-login/Cargo.toml similarity index 100% rename from backend/services/user-service/user-login/Cargo.toml rename to services/user-service/user-login/Cargo.toml diff --git a/backend/services/user-service/user-login/Dockerfile b/services/user-service/user-login/Dockerfile similarity index 100% rename from backend/services/user-service/user-login/Dockerfile rename to services/user-service/user-login/Dockerfile diff --git a/backend/services/user-service/user-login/src/main.rs b/services/user-service/user-login/src/main.rs similarity index 100% rename from backend/services/user-service/user-login/src/main.rs rename to services/user-service/user-login/src/main.rs diff --git a/backend/services/user-service/user-register/Cargo.toml b/services/user-service/user-register/Cargo.toml similarity index 100% rename from backend/services/user-service/user-register/Cargo.toml rename to services/user-service/user-register/Cargo.toml diff --git a/backend/services/user-service/user-register/Dockerfile b/services/user-service/user-register/Dockerfile similarity index 100% rename from backend/services/user-service/user-register/Dockerfile rename to services/user-service/user-register/Dockerfile diff --git a/backend/services/user-service/user-register/src/main.rs b/services/user-service/user-register/src/main.rs similarity index 100% rename from backend/services/user-service/user-register/src/main.rs rename to services/user-service/user-register/src/main.rs