Day 7
✅ 24 test suites, 153 tests passing.

Solid coverage across service and controller layers in my modular monorepo. Strict typing (TypeScript), full DTO validation, and realistic mocks across complex relations (TypeORM).

Next: fine-tuning error handling & exploring e2e strategies.

https://write.as/bmariusz/24-test-suites-153-tests-passing-scaling-confidence-with-every-assertion

#TypeScript #NestJS #Nextjs #InsuranceTech #Microservices #monorepo #rbac #codingdays #swagger #jwt #jwt_auth #programming

Day#7: 24 Test Suites, 153 Tests Passing — Scaling Confidence with Every Assertion

After several days of shaping a growing service architecture, I've finally reached a point where 24 test suites and 153 individual tests ...

Mariusz Balewski

Day 6
TL;DR: Groups, memberships, hierarchy — all dynamic now.

Released backend v0.3.0 🎉

✅ Users can belong to multiple groups with typed roles
✅ Groups can form hierarchical or overlapping structures
✅ Roles are normalized via reference types

Built with NestJS + TypeORM. Documented via Swagger.

https://write.as/bmariusz/building-a-flexible-group-structure-with-nestjs-and-typeorm

#TypeScript #NestJS #Nextjs #InsuranceTech #Microservices #monorepo #rbac #codingdays #swagger #jwt #jwt_auth #programming

Building a Flexible Group Structure with NestJS and TypeORM

TL;DR: I introduced a generic group model into the backend to handle dynamic user-to-organization assignments and relationships. Users ca...

Mariusz Balewski

Day 5
TL;DR: Continued work on backend security — role-based access is now fully wired up.

✅ Got fine-grained role-based access control fully working today.

• Roles loaded from PostgreSQL
• Injected into JWT during login
• Validated via custom `@Roles()` + `RolesGuard`
• Authenticated via `@UseGuards(JwtAuthGuard)` globally
• Introduced `@Public()` decorator to bypass guards for public endpoints
• Swagger supports Bearer token for testing

Took a while to get the role propagation into the token right — the key was enriching the `validateUser()` result, not just fetching data from DB.

Modular, clean, and no magic. Feels good. 👌

more on: https://write.as/bmariusz/continuation-securing-routes-with-jwt-and-role-based-access-control
#CloudNative #TypeScript #NestJS #Nextjs #InsuranceTech #Microservices #monorepo
#codingdays #swagger #jwt #jwt_auth #programming

Continuation: Securing Routes with JWT and Role-Based Access Control

TL;DR: Continuing development on the backend platform — this time focusing on securing routes with JWT, implementing @Roles decorators, h...

Mariusz Balewski

Day 4

TL;DR: Full Swagger docs + JWT auth with registration and login are live.

Today’s work focused on two key improvements.

1. Swagger documentation was extended across all API layers. DTOs, entities, and controllers were enriched with `@ApiTags`, `@ApiOperation`, `@ApiResponse`, and detailed `@ApiBody` annotations — including real-life examples for request bodies.

2. JWT-based authentication was implemented. A secure registration flow was added, with password hashing via bcrypt. A login endpoint now issues access tokens containing user ID, email, and roles. All logic is encapsulated using Passport strategies (local and JWT). The next step will be protecting routes with guards and role-based access.

#CloudNative #TypeScript #NestJS #Nextjs #InsuranceTech #Microservices #monorepo
#codingdays #swagger #jwt #jwt_auth #programming

Почему JWT — не панацея: разбор проблем сессий и безопасности

JWT для сессий: удобство или головная боль? JSON Web Token (JWT) приобрёл популярность как удобный способ аутентификации и передачи данных между клиентом и сервером. Его ценят за простоту , stateless-подход и гибкость . Однако большинство гайдов рассказывают только о плюсах, забывая о недостатках . В этой статье мы разберём основные проблемы использования JWT для хранения пользовательских сессий и обсудим более надёжные альтернативы.

https://habr.com/ru/articles/884912/

#jwt #jwt_auth #json_web_token #сессии #refreshтокены #redis #api

Почему JWT — не панацея: разбор проблем сессий и безопасности

Введение JSON Web Token (JWT) приобрёл популярность как удобный способ аутентификации и передачи данных между клиентом и сервером. Разработчики ценят его за простоту, независимость от состояния...

Хабр

Мой вариант аутентификации с помощью JWT в FastAPI + React

Друзья, приветствую! В создании своих pet проектов часто возникает задача аутентификации пользователя. Это может быть связано с персональным отображением страниц, настройки доступа и т.д. В этой статье я хочу показать свое решение с помощью Python,FastApI и React.

https://habr.com/ru/articles/846826/

#python #fastapi #react #jwt #jwt_auth

Мой вариант аутентификации с помощью JWT в FastAPI + React

В создании своих pet проектов у многих возникает вопрос аутентификации пользователя. Это может быть связано с персональным отображением страниц, настройки доступа и т.д. В этой статье я хочу показать...

Хабр

JWT-аутентификация при помощи Spring Boot 3 и Spring Security 6

Переход от базовых приложений к более сложным требует использования Spring Security для обеспечения безопасности. Новая версия, Spring Security 6, изменяет некоторые базовые реализации, а русскоязычных материалов на эту тему очень мало. В этой статье мы рассмотрим JWT-аутентификацию и авторизацию с помощью Spring Boot 3 и Spring Security 6, чтобы помочь начинающем разработчикам разобраться и начать пользоваться базовым функционалом этой библиотеки. Цель данной статьи - показать, как использовать JWT-аутентификацию с API-интерфейсами.

https://habr.com/ru/articles/784508/

#spring #spring_boot #spring_security #jwt #jwt_auth #bearer_tokens

JWT-аутентификация при помощи Spring Boot 3 и Spring Security 6

Введение Если не любите теорию, переходите сразу сюда . Переход от базовых приложений к более сложным требует использования Spring Security для обеспечения безопасности. Новая версия, Spring Security...

Хабр