Team members: Tanzir Hasan, Matthew Gong, Shao Jin, Michelle Lin
A job finder for adding/deleting and finding jobs of individual preferences. Serves as a personalized job finder where personal information and preferences are used.
The project is written in Python 3.9. To install the required packages, run the following command:
-
Clone the repository to your local machine.
-
It is recomended to use a virtual environment to install the packages.
- If you are using a virtual environment, activate it before running the following commands:
python -m venv venv; source venv/bin/activate
- If you are not using a virtual environment, you can skip this step.
- If you are using a virtual environment, activate it before running the following commands:
-
run
make dev_env
to install the required packages, for dev enviroment. -
run
./local.sh
to start the server locally.
DB_NAME=
MONGO_USERNAME=
MONGO_PASSWORD=
CLOUD_MONGO=
OPENAI_API_KEY=
- DB_NAME: The name of the MongoDB database to connect to.
- MONGO_USERNAME: The username for the MongoDB database.
- MONGO_PASSWORD: The password for the MongoDB database.
- CLOUD_MONGO: Set to 1 if the database is hosted on a cloud provider, 0 if it is hosted on a local server.
- OPENAI_API_KEY: The API key for the OpenAI API.
It could be helpful to put these in a shell script and export them if there are problems with using a .env.
This project defines a set of RESTful API endpoints for managing user accounts, job postings, and user reports related to job postings.
- Returns a list of all available endpoints in the system.
- Allows updating a user's information.
_id
(string): User IDnew_email
(string): New email for the usernew_username
(string): New username for the user
- Allows users to submit reports about job postings.
user_id
(string): User ID submitting the report.job_id
(string): ID of the job being reported.report
(string): The user's report.
- Retrieve all user reports.
- Used to update job postings description.
job_id
(string): ID of the job to be updated.company
(string): The company that posted the jobjob_description
(string): Description of the jobjob_type
(string): The type of joblocation
(string): The location of the jobdate
(string): The date of the postinglink
(string): Link to the job posting
- Allows users to delete their accounts.
user_id
(string): ID of the user account to be deleted.
- Returns a specified number of most recent job postings or returns all jobs if there are fewer than the specified number.
numbers
(string): Number of recent jobs to retrieve.
- Allows admin accounts to delete a specific job based on its ID.
admin_id
(string): ID of the admin performing the deletion.job_id
(string): ID of the job to be deleted.
- Allows a developer to delete all jobs past a certain date.
invalid_past_date
(string): Date before which jobs should be deleted.
- Allows users to create a new account.
username
(string): Username for the new account.email
(string): Email for the new account.password
(string): Password for the new account.
- Allows users to log in to their accounts.
username
(string): Username for the login attempt.password
(string): Password for the login attempt.
status
(string): Success status.message
(string): User ID of the logged-in user.
- Allows users to update their account preferences.
user_id
(string): ID of the user account to be updated.location
(string): Preferred location for job searches.job_type
(string): Preferred job type for job searches.
- Retrieves the account preferences for a user.
user_id
(string): ID of the user account.
preference
(object): User's account preferences.
- Allows users to submit new job postings.
company
(string): The company that posted the jobjob_description
(string): Description of the jobjob_type
(string): The type of joblocation
(string): The location of the jobdate
(string): The date of the postinglink
(string): Link to the job posting
- Allows deleting a user report based on its ID.
report_id
(string): ID of the user report to be deleted.
- Allows users to get a job based on its ID. Returns the job that matches the ID.
job_id
(string): ID of the job.
- Allows users to get a username based on the user ID. Returns the username that matches the user ID.
user_id
(string): ID of the user.
- Allows users to search for jobs based on a search query. The search query is a string that is used to generate a vector using the OpenAI text-embedding-ada-002 model. The resulting vector is used to search for jobs that match the vector.
query
(string): The search query.limit
(int): The number of jobs to return.