I'm Amirhossein Aghayari. I build reliable, maintainable systems from complex business requirements: the API, the data model and the interface on top. Backend is where I go deepest.
Six projects, each with my role and the engineering behind it. The first one gets the full write-up.
01 / 06Backend service·Personal project·2025
RsvAPI
An event-ticketing backend where the last ticket can only be sold once.
A scalable ticketing backend built with Node.js and TypeScript. It covers the whole reservation lifecycle: events and tickets, reservations, and payment processing.
Two requests arrive for the last ticket. Exactly one may win.
The problem
When many people go for the same limited tickets at once, naive code sells a seat twice. A ticketing backend has to stay correct under concurrent requests, not only on the happy path.
My role
Designed and built the service end to end.
Decisions that mattered
01
Reservations run as transactions
Creating a reservation and updating availability succeed or fail together, so the database never ends up half-updated.
02
Explicit concurrency control
Competing requests for the same ticket are handled deliberately, so a race condition can't push sales past what is available.
03
Redis caching
Frequently read data is cached in Redis to take pressure off PostgreSQL.
04
Clean layers, checked edges
Routes, business logic and data access stay separate. Input is validated with Zod, auth uses JWT, the API is documented in Swagger, and integration tests plus Docker keep it reproducible.
The hard part
Making overbooking impossible rather than unlikely. The interesting work was in the concurrent paths, not the CRUD.
fig. 2Lawyer AI
02 / 06Full-stack SaaS·SaaS project·2025
Lawyer AI
An AI assistant for constitutional-law questions.
An AI platform that answers legal questions grounded in constitutional law.
My role
Full-stack: the Next.js client and the Nest.js API.
Engineering notes
Next.js client with React Query, Tailwind CSS and shadcn/ui, localised with i18next.
Nest.js API on TypeORM and PostgreSQL, with JWT authentication.
Answers are generated through the OpenAI API.
Next.js
Nest.js
TypeORM
PostgreSQL
JWT
React Query
Tailwind CSS
i18next
shadcn/ui
OpenAI API
How it fits together
01
Learner picks a scenario
Frontend (teammate)
02
API authenticates and routes
Nest.js · JWT · Passport.js
03
Scenario is generated
OpenAI API
04
Progress is stored
PostgreSQL · TypeORM
03 / 06Backend, SaaS·Team project·2025
AI Language Learning
Scenario-based language practice, powered by AI.
A language-learning platform built around scenario conversations: ordering food, job interviews, travel.
My role
Built the entire backend. A teammate built the frontend separately.
Engineering notes
API design in Nest.js, with PostgreSQL and TypeORM.
JWT and Passport.js authentication.
OpenAI integration for dynamic scenario generation, plus learner progress tracking.