mastodontech.de ist einer von vielen unabhängigen Mastodon-Servern, mit dem du dich im Fediverse beteiligen kannst.
Offen für alle (über 16) und bereitgestellt von Markus'Blog

Serverstatistik:

1,4 Tsd.
aktive Profile

#codingdays

0 Beiträge0 Beteiligte0 Beiträge heute

Day 14

Registration Form Implementation
I've just finished implementing a registration form with validation and language switching using Next.js and React Hook Form. Now users can register with dynamic language support (English/Polish) and data validation (email, password, phone).

Unfortunately, my account on Write.as has been temporarily blocked, so details about the implementation will be available once the account is unlocked. Stay tuned! 😊

write.tyolabs.com/?p=1

write.tyolabs.comDay#14 Register Form with Validation in Next.js and React Hook Form – Ideas. Engineered.

Day 12

Implemented password reset functionality using JWT:
/auth/remind-password generates a short-lived token and sends it via email
/auth/reset-password verifies the token and updates the password using bcrypt

Validation handled with class-validator.
Endpoints documented with Swagger.
Token secret and base URL configured via environment variables.

write.tyolabs.com/?p=33

write.tyolabs.comDay#12 Password Reset Flow with JWT in a NestJS Backend – Ideas. Engineered.

Day 8
TL;DR: Yesterday I took a break. Today I’m back – and permissions are under control :)
Spent the day designing a fine-grained permission model.
I now support 96 distinct permissions across 8 modules, 4 CRUD operations, and 3 scopes: self, group, global.
Three system roles bind these into meaningful sets:
admin: full global access (32 permissions)
supervisor: read self + full group scope (32)
employee: read/update self only (16)

That's 80 role-permission bindings total. Uff.

write.as/bmariusz/designing-a-

Mariusz Balewski · Day#8 📊 Designing a Scalable Permission ModelYesterday I took a break. Today I’m back – and permissions are under control, I hope. I’ve implemented a structured permission model tha...
#sql#Microservices#monorepo

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.

write.as/bmariusz/24-test-suit

Mariusz Balewski · 24 Test Suites, 153 Tests Passing — Scaling Confidence with Every AssertionAfter several days of shaping a growing service architecture, I've finally reached a point where 24 test suites and 153 individual tests ...
#TypeScript#NestJS#Nextjs

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.

write.as/bmariusz/building-a-f

Mariusz Balewski · Building a Flexible Group Structure with NestJS and TypeORMTL;DR: I introduced a generic group model into the backend to handle dynamic user-to-organization assignments and relationships. Users ca...
#TypeScript#NestJS#Nextjs

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: write.as/bmariusz/continuation
#CloudNative #TypeScript #NestJS #Nextjs #InsuranceTech #Microservices #monorepo
#codingdays #swagger #jwt #jwt_auth #programming

Mariusz Balewski · Continuation: Securing Routes with JWT and Role-Based Access ControlTL;DR: Continuing development on the backend platform — this time focusing on securing routes with JWT, implementing @Roles decorators, h...

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

Day 0:

TL;DR: Set up the basic foundations for a new system: database schema finalized, core backend modules scaffolded, and initial API contracts defined. The real work begins now.
No hype. Just building.

Today I worked on building the core backend infrastructure for a cloud-native insurance platform. Key points:
Modular microservices architecture based on NestJS
PostgreSQL schemas designed for flexibility — no hardcoded values, all dynamic
Using TypeScript with ESM modules for better code organization
Setting up communication patterns between backend and Next.js frontend
Focus on scalability and simplicity in cloud deployment
This lays a solid foundation for a system built from scratch to replace legacy solutions and support future growth.

#CloudNative #TypeScript #NestJS #Nextjs #InsuranceTech #Microservices
#codingdays #programming