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,5 Tsd.
aktive Profile

#nestjs

2 Beiträge1 Beteiligte*r0 Beiträge heute

pivoting from #ZenStack towards just using #NestJS/#prisma “manual” solutions to build a #REST #API.

would still like to have some way to quickly serialize our prisma models into a format like JSON:API (or HAL). but when I look at jsonapi.org/implementations/#s (and with some additional searching):
there are numerous full frameworks and a few serializers but most of them have not been touched in years. is the Javascript world still stuck in #graphQL land? or am I just not looking in the right places?

jsonapi.orgJSON:API — Implementations

looking for an #OSS #APIgateway

* API keys (API users) + Oauth (website) for auth
* rate limiting + protection against content crawling
* queuing requests to prevent overloading our self-hosted AI models
* ability to track usage so that we can charge expensive API calls to users/orgs
* basic monitoring

API will most likely be written in #NestJS, another likely using #FastAPI (or something else in #Python). I like #GitOps. Doesn’t need to handle insane traffic just make the above things easier.

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

Immich is primarily written in TypeScript and JavaScript, with a significant amount of code also in Dart and Svelte. The Immich Server itself is built using TypeScript and Node.js, and leverages the Nest.js framework, Express server, and Kysely. The GitHub repository indicates that TypeScript accounts for 48.8% of the code, Dart for 28.7%, Svelte for 17.8%, and other languages contribute the remaining percentage.

#Immich#NodeJS#dart

Exploring LLM-powered code migration! 🚀 Check out linkedin.com/pulse/code-migrat which dives into my experience migrating a Java Spring Boot microservice to TypeScript Nest.js using Llama 3.3 and GitHub Copilot. I share valuable insights on the benefits and challenges of LLM-assisted development, highlighting the productivity gains and the need for manual refinement. #LLM #CodeMigration #TypeScript #NestJS #DeveloperProductivity #GitHubCopilot

www.linkedin.comCode Migration Using LLMsLast year, I evaluated how effective Large Language Models were in writing unit tests. This year, I decided to evaluate how effective LLMs were in migrating code from one programing language and tech stack to another.