ArtFolio
Social network for artists, NestJS backend with DDD architecture
ArtFolio is a platform for artists to share their work and interact with their community. It was my final project at École O'Clock, and the one I invested the most into. I designed and built the entire backend: DDD architecture, auth, tests, CI/CD pipelines, and deployment.
DDD Architecture
The domain has zero dependencies on NestJS or TypeORM. Contracts are defined through interfaces in the domain layer.
Presentation
Controllers, Swagger, DTOs
Application
Use cases, validators, handlers
Domain
Entities, value objects, interfaces
Infrastructure
TypeORM repositories, Auth0, services
Tech Stack
Redis for caching frequent queries and as Auth0 session store. Fastify chosen over Express for its superior performance, well recognized in the Node.js ecosystem.
Highlights
- DDD architecture with domain, application, infrastructure, and presentation layers
- Unit, integration, and E2E tests with Jest and @nestjs/testing
- Transactions with rollback and filesystem cleanup
- Auth0 with guards and per-route permissions (RBAC)
- Full Swagger/OpenAPI documentation
- Docker Compose: backend + 2 Vue.js frontends + PostgreSQL + SonarQube
- Deployed on AWS EC2 with Nginx
- Versioned and reversible TypeORM migrations
- Global rate limiting via @nestjs/throttler
- Custom logging system with daily rotation and 7 severity levels
- Global exception filter and structured PostgreSQL error handling
- Typed value objects (UserId, PostId, ...) for compile-time and runtime safety
- PL/pgSQL stored procedures for GDPR data export and audit trail
- Hardened security: Helmet, CSRF, HttpOnly sessions, strict input validation
Full NestJS backend with DDD architecture, Auth0, Docker Compose, and AWS EC2 deployment.
View on GitHub