Skip to content

Feature user register rebase#8

Merged
Vasilijez merged 17 commits into
developfrom
feature-user-register-rebase
Jul 27, 2025
Merged

Feature user register rebase#8
Vasilijez merged 17 commits into
developfrom
feature-user-register-rebase

Conversation

@Vasilijez

Copy link
Copy Markdown
Member

Closes #3.

This PR resolves the rebase problem that occurred in #7.

For more details, see #7.

Vasilijez added 17 commits July 27, 2025 11:54
Exported variables should be named using PascalCase.

Since I used `GORM` for modeling, I need a database connection. It uses `sql.DB` under the hood, so when I close `sql.DB`, I automatically close the `GORM` connection as well.
This is quite a large commit—sorry about that! That said, most of the changes are related to restructuring the folder layout, which I believe is a crucial improvement.

I’ve decided to stop overthinking the project structure and went with something scalable, even if it's a bit overkill for now. I’ll explain more in the PR description.

Also, I’ve introduced error handling via middleware.
- I also tried to improve error handling.
- Typo: `ErrUserExists` → `ErrUsernameExists`
We could add a backoff, but I think it's smarter to keep retrying indefinitely without delay, since we want all services to start as soon as possible.
I made this change based on our specification, as we likely won’t need more than one service or repository.
I was unsure about the `Register` handler and decided to make it lowercase, as I currently don’t see a reason to export it. Integration tests will likely be performed via API calls.
@Vasilijez
Vasilijez requested a review from magley July 27, 2025 10:07
@Vasilijez Vasilijez self-assigned this Jul 27, 2025

@magley magley left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good job. I don't get why we have to keep a linear history, though...

@magley magley added the feature New functional or non-functional requirement implementation. label Jul 27, 2025
@Vasilijez
Vasilijez merged commit 6bb5dd9 into develop Jul 27, 2025
2 checks passed
@Vasilijez

Copy link
Copy Markdown
Member Author

Good job. I don't get why we have to keep a linear history, though...

For simplicity, I guess.

As you can see, all commits from this PR changed their hashes after merging into the develop branch. This is a bad property for tracking because we often mention commits (especially fix commits) during PR reviews. Also, a linear commit history can change hashes for commits that happened in parallel (different branches) during the same time period.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New functional or non-functional requirement implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants