CV Exporter is a web application that allows users to export their CV (Curriculum Vitae) in various formats, including PNG, PDF, and HTML. This project utilizes Express.js for the server-side implementation and Puppeteer for browser automation and document generation.
- Features
- Prerequisites
- Installation
- Usage
- API Endpoints
- Docker Support
- Deployment
- Project Structure
- Dependencies
- Development
- Contributing
- License
- Contact
- Export CV as PNG image
- Export CV as PDF document
- Export CV as HTML file
- Responsive web design
- Docker support for easy deployment
- Fly.io configuration for cloud deployment
Before you begin, ensure you have met the following requirements:
- Node.js (version 14.0.0 or higher)
- npm (usually comes with Node.js)
- Git (for version control)
To install CV Exporter, follow these steps:
-
Clone the repository:
git clone https://github.com/yourusername/cv-exporter.git -
Navigate to the project directory:
cd cv-exporter -
Install the dependencies:
npm install
To start the server, run:
npm start
The application will be available at http://localhost:3000.
/: Serves the main CV page/export-image: Exports the CV as a PNG image/export-pdf: Exports the CV as a PDF document/export-html: Exports the CV as an HTML file
This project includes a Dockerfile for containerization. To build and run the Docker container:
-
Build the Docker image:
docker build -t cv-exporter . -
Run the container:
docker run -p 3000:3000 cv-exporter
This project is configured for deployment on Fly.io. The fly.toml file contains the necessary configuration.
To deploy:
- Install the Fly CLI
- Authenticate with Fly.io
- Run:
fly deploy
.
├── Dockerfile
├── fly.toml
├── package-lock.json
├── package.json
├── public
│ └── index.html
├── puppeteerUtils.js
└── server.js
Dockerfile: Contains instructions for building the Docker imagefly.toml: Configuration file for Fly.io deploymentpackage.json&package-lock.json: Node.js package management filespublic/index.html: The main HTML file for the CVpuppeteerUtils.js: Utility functions for Puppeteer operationsserver.js: The main Express.js server file
- Express.js: Web application framework
- Puppeteer: Headless Chrome Node.js API
- pdf-lib: PDF manipulation library
For a full list of dependencies, refer to the package.json file.
To run the application in development mode with auto-reloading:
npm run dev
This command uses nodemon to watch for file changes and restart the server automatically.
Contributions to CV Exporter are welcome. Please follow these steps:
- Fork the repository
- Create a new branch (
git checkout -b feature/AmazingFeature) - Make your changes
- Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the ISC License. See the LICENSE file for details.
Your Name - your.email@example.com
Project Link: https://github.com/yourusername/cv-exporter