The CV Builder project is a Django REST framework-based application that allows users to register, log in, and create and manage their CVs. The system allows users to provide details such as bio, skills, job experience, education, and certificates. Additionally, users can download their CV in PDF format.
- User Registration & Authentication: Users can register and log in using JWT tokens or session-based authentication.
- Profile Management: Users can manage their profiles, including adding skills, job experience, education, and certificates.
- Download CV as PDF: Users can download their profile details in a PDF format, making it easy to share or print their CV.
- Swagger Documentation: The project includes Swagger for API documentation, making it easier to test and explore the available endpoints.
- Python 3.x
- Django 3.2.x
- Django REST Framework
- PostgreSQL (for database)
- djangorestframework-simplejwt
- drf-yasg (for Swagger API documentation)
-
Clone the repository:
git clone https://github.com/PeymanNr/django-cv-builder.git cd cv-builder
-
Create a virtual environment and activate it:
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts�ctivate
-
Install the required packages:
pip install -r requirements.txt
-
Apply database migrations:
python manage.py migrate
-
Create a superuser to access the Django admin:
python manage.py createsuperuser
Ensure the following environment variables are set in a .env
file:
SECRET_KEY
: Your Django secret key.DEBUG
: Set toFalse
for development.DB_NAME
: Database name.DB_USER
: Database username.DB_PASSWORD
: Database password.DB_HOST
: Database host (e.g.,localhost
).DB_PORT
: Database port (default:5432
).
Start the Django development server:
python manage.py runserver
- POST
/user/register/
: Register a new user. - POST
/user/login/
: Log in and get a JWT token for authentication. - GET
/user/profile/
: Get the user's profile. - PUT
/user/profile/
: Update the user's profile. - POST
/user/profile/skills/
: Add skills to the user's profile. - GET
/user/profile/pdf/
: Download the user's profile as a PDF.
To download your profile as a PDF, make a GET
request to the following endpoint:
GET /user/profile/pdf/
This will generate a PDF file with your profile details that can be downloaded.
The project includes Swagger for API documentation. You can access it by navigating to:
http://localhost:8000/docs/
The project includes automated tests to ensure the functionality is working correctly. To run the tests, use the following command:
python manage.py test
To deploy the project to production, you can use services like Heroku, AWS, or any other platform supporting Django. Make sure to set DEBUG = False
in the production environment, configure the database, and set the proper environment variables.
Django 3.2.x
: Web framework for building the application.Django REST Framework
: For building RESTful APIs.ReportLab
: For generating PDF files.djangorestframework-simplejwt
: For JWT authentication.