A NestJS-based REST API for resume management built by Devtalks Group.
- Prerequisites
- Quick Start
- Development Setup
- Environment Configuration
- Available Scripts
- API Documentation
- Production Deployment
- Docker (v20.10+)
- Docker Compose (v2.0+)
- Node.js (v22.13.1+)
- pnpm (v10.5.0+)
- PostgreSQL (v17.5+)
-
Clone the repository
git clone <repository-url> cd resume-api
-
Set up environment variables
cp .env.example .env # Edit .env with your configuration -
Start with Docker (Recommended for development)
# For development (database only) docker-compose -f docker-compose.local.yml up -d # Install dependencies and start the app locally pnpm install pnpm run start:dev
This approach runs PostgreSQL and pgAdmin in Docker while running the NestJS app locally for better development experience.
-
Start the database services
docker-compose -f docker-compose.local.yml up -d
-
Install dependencies
pnpm install
-
Start the development server
pnpm run start:dev
-
Access the services
- API: http://localhost:3000
- API Documentation: http://localhost:3000/api-docs
- pgAdmin: http://localhost:5050
-
Install PostgreSQL
# Ubuntu/Debian sudo apt update sudo apt install postgresql postgresql-contrib # macOS (with Homebrew) brew install postgresql@17 brew services start postgresql@17 # Arch Linux sudo pacman -S postgresql sudo systemctl enable postgresql sudo systemctl start postgresql
-
Create database and user
sudo -u postgres psql
In PostgreSQL shell:
CREATE DATABASE resume_api; CREATE USER postgres WITH PASSWORD 'postgres123'; GRANT ALL PRIVILEGES ON DATABASE resume_api TO postgres; \q
-
Install dependencies
pnpm install
-
Configure environment variables Create a
.envfile with local database settings:# Application NODE_ENV=development APP_PORT=3000 # Database DATABASE_HOST=localhost DATABASE_PORT=5432 DATABASE_USER=postgres DATABASE_PASSWORD=postgres123 DATABASE_NAME=resume_api
-
Start the development server
pnpm run start:dev
Create a .env file in the root directory with the following variables:
# Application Configuration
NODE_ENV=development
APP_PORT=3000
# Database Configuration
DATABASE_HOST=localhost
DATABASE_PORT=5432
DATABASE_USER=postgres
DATABASE_PASSWORD=postgres123
DATABASE_NAME=resume_api
# pgAdmin Configuration (for Docker setup)
PGADMIN_EMAIL=admin@example.com
PGADMIN_PASSWORD=admin123
PGADMIN_PORT=5050# Development
pnpm run start:dev # Start with hot reload
pnpm run start:debug # Start with debug mode
# Building
pnpm run build # Build the application
pnpm run start:prod # Run production build
# Testing
pnpm run test # Run unit tests
pnpm run test:watch # Run tests in watch mode
pnpm run test:cov # Run tests with coverage
pnpm run test:e2e # Run end-to-end tests
# Code Quality
pnpm run lint # Run ESLint
pnpm run format # Format code with PrettierOnce the application is running, you can access the Swagger API documentation at:
- Local Development: http://localhost:3000/api-docs
- Custom Port: http://localhost:{APP_PORT}/api-docs
The API documentation includes:
- All available endpoints
- Request/response schemas
- Authentication requirements
- Interactive API testing interface
For production deployment, use the main docker-compose file:
# Build and start all services
docker-compose up -d
# View logs
docker-compose logs -f app
# Stop services
docker-compose downThis setup includes:
- NestJS application container
- PostgreSQL database
- pgAdmin for database management
- Proper networking and volume management
Ensure you set secure values for production:
NODE_ENV=production
DATABASE_PASSWORD=<secure-password>
PGADMIN_PASSWORD=<secure-password>- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes
- Run tests:
pnpm run test - Commit your changes:
git commit -am 'Add feature' - Push to the branch:
git push origin feature-name - Submit a pull request
Built with ❤️ by Devtalks Group