Skip to content

feat: improve first app launch experience#204

Merged
kamilbaczek merged 3 commits intomainfrom
feature/improve_first_launch_of_application_experience
May 2, 2025
Merged

feat: improve first app launch experience#204
kamilbaczek merged 3 commits intomainfrom
feature/improve_first_launch_of_application_experience

Conversation

@kamilbaczek
Copy link
Copy Markdown
Collaborator

@kamilbaczek kamilbaczek commented Apr 30, 2025

📋 Description

This PR improves the first-run experience for developers and simplifies testing and launching the solution.

🛠️ Database Connectivity:
Previously, when running the solution locally, the database connection failed due to an alias that only worked in Docker. This is now resolved—both local and Docker environments work without any additional configuration.

🌐 Swagger Availability:
Before, Swagger had to be manually located. Now, it opens automatically when navigating to the application’s root URL.

📦 PR Includes
• Improved local + Docker setup for DB connection 🔧
• Automatic Swagger UI launch 🌐

Manual Tests

local run from IDE

image
image

run on docker
image
image

@kamilbaczek kamilbaczek linked an issue Apr 30, 2025 that may be closed by this pull request
@kamilbaczek kamilbaczek changed the title feature/improve_first_launch_of_application_experience feat: improve first app launch experience Apr 30, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the first-run experience by improving local and Docker database connectivity and automating the launch of the Swagger UI. Key changes include:

  • Updating the docker-compose file to support local and Docker environments with consistent connection strings.
  • Modifying Program.cs to integrate an API documentation endpoint that automatically redirects to Swagger.
  • Changing the automatic migrations process to use EnsureCreated and adding a new ApiDocumentationExtensions class.

Reviewed Changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.

File Description
Chapter-1-initial-architecture/Src/docker-compose.yml Updated service name and environment variables to ensure proper DB connectivity.
Chapter-1-initial-architecture/Src/Fitnet/Program.cs Integrated API documentation middleware for automatic Swagger redirection.
Chapter-1-initial-architecture/Src/Fitnet/Passes/Data/Database/AutomaticMigrationsExtensions.cs Changed from Migrate() to EnsureCreated() for database initialization.
Chapter-1-initial-architecture/Src/Fitnet/Common/Documentation/SwaggerDocumentationExtensions.cs Added a new extension to support the automated API documentation endpoint.
Files not reviewed (2)
  • Chapter-1-initial-architecture/Src/Fitnet/Fitnet.csproj: Language not supported
  • Chapter-1-initial-architecture/Src/Fitnet/appsettings.Development.json: Language not supported

@kamilbaczek kamilbaczek merged commit 85259c0 into main May 2, 2025
2 checks passed
@kamilbaczek kamilbaczek deleted the feature/improve_first_launch_of_application_experience branch May 2, 2025 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Swagger UI unreachable on docker

3 participants