CVComposer-backend is the backend of the CVComposer project. CVComposer is a web-based platform tailored to assist job seekers in crafting compelling CVs (Curriculum Vitae) and Cover Letters effortlessly. In the backend we also add a method of posting and and getting job postes from the database. The backend is built using Node.js, Express.js, and MongoDB.
- Endpoint:
http://localhost:8800/api/v1/auth/register
- Method:
POST
- Description: Register a new user.
- Body: JSON containing username, email, and password.
- Method:
- Endpoint:
http://localhost:8800/api/v1/auth/login
- Method:
POST
- Description: Log in a user.
- Body: JSON containing username and password.
- Method:
- Endpoint:
http://localhost:8800/api/v1/users/checkadmin/{userId}
- Method:
GET
- Description: Check if a user is an admin.
- Params: userId (replace with actual user ID).
- Method:
- Endpoint:
http://localhost:8800/api/v1/users/{userId}
- Method:
PUT
- Description: Update user details, specifically set isAdmin to false.
- Body: JSON containing isAdmin field.
- Method:
- Endpoint:
http://localhost:8800/api/v1/jobs
- Method:
POST
- Description: Create a new job posting.
- Body: JSON with job details such as title, company, location, etc.
- Method:
- Endpoint:
http://localhost:8800/api/v1/jobs/{JobId}
- Method:
PUT
- Description: Update an existing job posting.
- Body: JSON with updated job details.
- Method:
- Endpoint:
http://localhost:8800/api/v1/jobs/{JobId}
- Method:
GET
- Description: Get details of a specific job.
- Method:
- Endpoint:
http://localhost:8800/api/v1/jobs?page=1&resultsPerPage=10
- Method:
GET
- Description: Get a list of all jobs.
- Features: implement pagination
- Method:
- Endpoint:
GET /api/v1/tips/bytitle/?title={title}
- Description: Retrieve tips based on a specific category.
- Headers: User-Agent: insomnia/8.4.5
- Endpoint:
GET /api/v1/tips?page=1&resultsPerPage=10
- Description: Retrieve all tips.
- Headers: User-Agent: insomnia/8.4.5
- Features: also implement pagination
- Endpoint :
GET /api/v1/tips/find/{tipId}
- Description: Retrieve a specific tip by ID.
- Headers: User-Agent: insomnia/8.4.5
- Endpoint:
GET /api/v1/tips/bycategory/?category={category}
- Description: Retrieve tips based on a specific category.
- Headers: User-Agent: insomnia/8.4.5
- Endpoint**:
POST /api/v1/tips
- Description: Create a new tip.
- Headers: Content-Type: application/json, User-Agent: insomnia/8.4.5
- Body:
{ "title": "CV Writing Tips", "category": "CV", "content": "Highlight your key achievements, use action verbs, and keep your CV concise and well-organized. Tailor it for the specific job you're applying for." }
To run the CVComposer-backend locally for development or testing purposes, follow these steps:
-
Clone the repository to your local machine:
git clone https://github.com/MelakuDemeke/CVComposer-backend.git
-
Navigate to the project directory:
cd CVComposer-backend
-
Install the required dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your API tester and start expermenting the API
Usage Guide for Experimenting with API Data in Insomnia
- Step 1: Navigate to the Test Folder
- Open your project directory and locate the "Test" folder.
cd path/to/your/project/Test
- Step 2: Access the API Folder
- Navigate into the "api" subfolder within the "Test" directory.
cd api
-
Step 3: Retrieve the Backup JSON File
- Find and copy the backup JSON file you want to use for testing. Ensure you have the file path for the next steps.
-
Step 4: Open Insomnia API Tool
- If you don't have Insomnia installed, download and install it from Insomnia Website. Open Insomnia on your computer.
-
Step 5: Import Data into Insomnia
- In Insomnia, click on the "Import/Export" option in the top-left corner.
- Select "Import Data".
- Choose the "From File" option.
- Navigate to the location where you saved the backup JSON file and select it.
-
Step 6: Start Experimenting Now that you've imported the data, you can start experimenting with your API requests.
- Explore the imported requests in the sidebar.
- Modify request parameters as needed.
- Execute the requests to interact with your API. Remember to save your changes in Insomnia as needed.
Happy experimenting! Here is Samples