The backend server component of the Resume Analyzer application, built with NestJS. This server provides API endpoints for resume analysis, cover letter generation, and user authentication.
- AI-Powered Analysis: Process and analyze resumes using OpenAI integration
- Cover Letter Generation: Generate tailored cover letters based on resume content and job descriptions
- Authentication System: Secure JWT-based authentication system
- File Processing: Handle resume file uploads and processing
- RESTful API: Well-structured API endpoints following REST principles
- Database Integration: TypeORM integration with PostgreSQL for data persistence
The server is built using NestJS with a modular architecture:
src/
├── analyze/ # Resume analysis module
├── auth/ # Authentication module
├── cover-letter/ # Cover letter generation module
├── openai/ # OpenAI service integration
└── libs/
└── shared/ # Shared resources (entities, DTOs, etc.)
- Node.js (v16 or higher)
- pnpm or bun package manager
- PostgreSQL database
- OpenAI API key
-
Clone the repository:
git clone [repository-url] cd ResumeAnalyzeServer
-
Install dependencies:
pnpm install
-
Set up environment variables:
cp .env.example .env
Then edit
.env
with your configuration values.
# Run in development mode
pnpm start:dev
# Run in production mode
pnpm start:prod
# Run tests
pnpm test
Copy .env.example
to .env
and configure the following variables:
PORT
: Server port (default: 3000)DATABASE_URL
: PostgreSQL connection stringJWT_SECRET
: Secret key for JWT token generationJWT_EXPIRATION
: JWT token expiration timeOPENAI_API_KEY
: Your OpenAI API keyOPENAI_MODEL
: OpenAI model to use (default: gpt-4)CORS_ORIGIN
: Allowed CORS origin for frontendFILE_UPLOAD_SIZE
: Maximum file upload sizeFILE_UPLOAD_PATH
: Path for storing uploaded files
When the server is running, access the Swagger API documentation at:
http://localhost:3000/api/docs
Key API endpoints:
POST /auth/register
: User registrationPOST /auth/login
: User authenticationPOST /analyze/resume
: Resume analysisPOST /cover-letter/generate
: Cover letter generationGET /user/profile
: User profile information
# Unit tests
pnpm test
# e2e tests
pnpm test:e2e
# Test coverage
pnpm test:cov
# Generate a migration
pnpm migration:generate
# Run migrations
pnpm migration:run
# Revert last migration
pnpm migration:revert
This project is licensed under the MIT License - see the LICENSE file for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
For support, please open an issue in the GitHub repository.