A robust microservice for post management, built with NestJS, providing comprehensive content creation, retrieval, and management capabilities.
- CRUD operations for posts
- Advanced filtering and search
- Pagination support
- Content validation
- Event-driven architecture
- Comprehensive error handling
- Scalable design
- NestJS
- Prisma ORM
- PostgreSQL
- KafkaJS
- Sentry for error tracking
- Swagger for API documentation
- Node.js 18+
- Yarn
- PostgreSQL
- Kafka
# Install dependencies
$ yarn install
# Generate Prisma client
$ yarn prisma:generate
# Run database migrations
$ yarn prisma:migrate
# Development mode
$ yarn dev
# Production mode
$ yarn start
# Generate Prisma schema
$ yarn prisma:generate
# Run database migrations (development)
$ yarn prisma:migrate
# Run database migrations (production)
$ yarn prisma:migrate-prod
# Open Prisma Studio
$ yarn prisma:studio
# Run unit tests
$ yarn test
# Run end-to-end tests
$ yarn test:e2e
# Generate test coverage report
$ yarn test:cov
Configuration is managed through environment variables and NestJS ConfigModule.
Key configurations:
- Database connection
- Kafka settings
- Sentry error tracking
- Sentry error tracking
- Swagger API documentation
- Health check endpoints
- Logging
- Fork the repository
- Create a feature branch
- Implement changes
- Write tests
- Run linting and formatting
- Submit a pull request