Skip to content

Dev - #79

Open
abbasajorlou1371 wants to merge 28 commits into
mainfrom
dev
Open

Dev#79
abbasajorlou1371 wants to merge 28 commits into
mainfrom
dev

Conversation

@abbasajorlou1371

Copy link
Copy Markdown
Collaborator

No description provided.

abbasajorlou1371@gmail.com added 7 commits July 26, 2026 07:51
…ncements

- Introduced `LocalTokenValidator` for validating Sanctum-style tokens using the local token repository.
- Updated gRPC server initialization to include authentication via the new token validator.
- Refactored various handler methods to utilize authenticated user IDs instead of request parameters, enhancing security and consistency.
- Added authorization checks to ensure users can only access their own data or use valid service tokens.
- Created utility functions for user authentication and authorization, improving code reusability and clarity.
- Added tests for the new authorization logic to ensure proper functionality and security compliance.
- Added `https://dev-reactjs.metarang.com` and `https://dev-nextjs.metarang.com` to the list of allowed origins in the CORS configuration, enhancing support for development workflows.
- Deleted the buy request-related endpoints from the OpenAPI specification, including accept, add grace period, delete, and reject operations.
- Introduced new calendar API endpoints for managing calendar events, including fetching events and interactions.
- Updated the OpenAPI tags to reflect the removal of buy requests and the addition of calendar-related tags.
- Enhanced the response structure for the challenge timings endpoint to include detailed statistics for user answers.
…ructions

- Changed gRPC TLS certificate file paths in docker-compose.yml to point to the new directory structure under ./certs/grpc.
- Updated the instructions in generate-grpc-certs.sh to reflect the new mounting path for certificates, ensuring clarity for users on how to configure their environment.
…nagement

- Added a new service `grpc-certs-init` in docker-compose.yml to handle the generation and management of gRPC TLS certificates.
- Updated the certificate mounting path to use a Docker volume `grpc_certs` for better isolation and management.
- Enhanced the `generate-grpc-certs.sh` script to check for existing certificates and copy them from the host if available, or generate new ones if not.
- Updated instructions in the script to clarify the environment variable setup for enabling gRPC TLS.
…ificates

- Added permission settings for certificate files in the generate-grpc-certs.sh script to ensure proper access levels.
- Introduced a function in the docker version of the script to handle permission adjustments consistently.
- Ensured ownership is set correctly for the generated certificates when the script is run as root, enhancing security and compliance.
…ce configuration

- Added HTTP support to the levels-service, allowing access to levels data via REST endpoints.
- Introduced new environment variables for HTTP configuration, including HTTP_PORT and APP_URL.
- Updated Docker and Kubernetes configurations to expose the new HTTP service and ensure health checks are in place.
- Removed deprecated gRPC routes and integrated HTTP handlers for levels-related operations.
- Enhanced the Makefile with new commands for Kong configuration validation and reloading.
- Added tests for the new HTTP handlers to ensure functionality and reliability.
abbasajorlou1371@gmail.com and others added 21 commits July 29, 2026 14:16
…d enhance service configuration

- Implemented a new HTTP API for the notifications service, allowing access to notifications via REST endpoints.
- Introduced HTTP_PORT and AUTH_SERVICE_ADDR environment variables for configuration.
- Updated Docker and Kubernetes configurations to expose the new HTTP service and ensure proper health checks.
- Removed deprecated gRPC routes and integrated HTTP handlers for notifications-related operations.
- Enhanced the Makefile with new commands for testing notifications service coverage.
- Added tests for the new HTTP handlers to ensure functionality and reliability.
…coverage

Expose follow/challenge HTTP routes directly from social-service, remove the grpc-gateway social proxy, and expand tests to 90%+ internal coverage with Windows-friendly coverage gates.

Co-authored-by: Cursor <cursoragent@cursor.com>
…used kubeconfig verification

- Changed branch references from `develop` to `dev` in the CI/CD workflow files for consistency.
- Removed the obsolete `verify-kubeconfig.yml` workflow file as it is no longer needed.
- Updated documentation in `README.md` to reflect the branch name changes.
- Enhanced OpenAPI specifications to include a new `views` field in challenge-related data structures.
…ling in social service

- Added package documentation for the auth package to clarify its purpose in local token validation.
- Removed the unused `writeFieldValidationError` function from the social service's HTTP response handler to streamline error handling.
- Updated the gRPC test server to ignore serve errors during cleanup, improving test reliability.
…ement API

Expose PrizePerQuestion on AdvertisementResource so /api/challenge/advertisement includes it in the response.

Co-authored-by: Cursor <cursoragent@cursor.com>
Collect and merge unit/integration coverage profiles, and report totals in GitHub Actions so coverage is visible without relying on Codecov alone.

Co-authored-by: Cursor <cursoragent@cursor.com>
…tures preflight.

Align k8s frontend/cors config with the real app domain and route features OPTIONS through api-preflight so rate limits cannot look like CORS failures.

Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve coverpkg from the service module with go list so test helper packages under tests/<service> are not included in coverage collection.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Updated kong-config.yaml to include PATCH in allowed methods for CORS.
- Modified kong.yml to ensure OPTIONS requests are properly handled and include PATCH in the allowed methods.
- Implemented a new test for CORS preflight middleware to verify that PATCH requests are allowed.
- Adjusted max_age for preflight responses to improve browser behavior with stale preflights.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add middleware, HTTP handler, gRPC error-path, repository, and getEnv tests to improve CI coverage from ~49% to ~81%.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ser variable, and wallet services

- Introduced comprehensive unit tests for referral, transaction, user variable, and wallet services to enhance test coverage and ensure functionality.
- Implemented mock repositories to simulate database interactions and validate service logic.
- Added tests for various scenarios including error handling and edge cases to improve reliability and maintainability of the codebase.
…date configurations

- Removed gRPC service references and replaced them with HTTP endpoints for the financial service.
- Updated Docker and Kubernetes configurations to expose the new HTTP port (8065) and adjusted health checks accordingly.
- Enhanced the Makefile to reflect changes in coverage reporting for the financial service.
- Introduced new HTTP handlers and middleware for authentication and request processing.
- Added unit tests for the new HTTP functionality to ensure reliability and maintainability.
- Cleaned up environment variable configurations and removed obsolete references to the gRPC service.
Add unit and integration tests for cmd/server helpers, service channels, and HTTP error paths to meet CI coverage thresholds.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add unit and integration tests across handler, service, repository, and FTP layers, and extract boot helpers from main for testability.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use grpc.NewClient with passthrough bufconn dialing to satisfy staticcheck SA1019.

Co-authored-by: Cursor <cursoragent@cursor.com>
…stry

Replaced default images with images from the custom registry docker.arvancloud.ir for various services including grpc-certs-init, mysql, redis, swagger-ui, kong, prometheus, grafana, and node-exporter. This change ensures consistency and control over the image versions used in the deployment.
Map load_buildings results into the main-compatible HTTP shape so /api/features returns buildings when present.

Co-authored-by: Cursor <cursoragent@cursor.com>
…onment variable

Modified the uploads volume path in docker-compose.yml to utilize an environment variable, allowing for greater flexibility in configuration. This change enables the use of a custom uploads path while maintaining a default fallback.
…-gateway contract

Updated the writeJSON function to wrap bare values in a data structure, ensuring compliance with the grpc-gateway contract. Adjusted related tests to reflect the new response structure, verifying that the data is correctly encapsulated in the response body.
Refactored the Makefile to use a default uploads path variable for symlink creation. Adjusted Windows and Unix commands to ensure the correct path is used, improving clarity and maintainability of the upload link setup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant