colorstackorg/oyster

Kickoff: Compensation Data 💰

Closed this issue · 8 comments

Overview

It's really important that members in our community have access to real data when it comes to job offers and compensation. For those who already have offers, this helps to evaluate how strong their offer is as compared to the rest of the community. For those who don't have offers, it shows them what's possible. Having such data is also important to the internal ColorStack team because it will serve as a critical data point and success metric over time. Eventually, we want to build company reviews as well!

Scope

For the MVP, we should give members a way to do the following in the Member Profile:

  1. Upload a job offer.
  2. View job offers in the community (anonymously).

Data Requirements

Here is the core data that we want to collect for a job offer in this MVP:

  • Company
  • Employment Type (ie: Internship / Full-Time)
  • Compensation Type (ie: Salary / Hourly)
  • Base Salary
  • Stock Per Year
  • Bonus
  • Level Name
  • Status (ie: Accepted / Rejected / Still Deciding)

Technical Plan

Here's a short overview of what needs to happen technically to support this.

On the backend, in the core package:

  1. Implement a database migration that creates a job_offers SQL table.
  2. Implement a uploadJobOffer function, which accepts some job offer data and saves it to the job_offers table.
  3. Implement a listJobOffers function, which accepts some query parameters to support pagination and returns a list of offers.

On the frontend, in the member-profile application:

  1. Add a new Companies tab in the Member Profile.
  2. Implement a form with all fields necessary to upload a job offer.
  3. Implement the Companies page which shows all job offers on the screen.

I would like to work on this :)

Question #1
Hi Rami,
On our last call, we had run into an error with the conversion between camelcase and snake case. Unfortunately, I am still getting an error about that. I have tried carefully reading through my uploadJobOffer function and comparing it with the other functions in the use-cases folder to see if there was a missing piece and haven't found any. This is what my errors look like as of now:
Screenshot 2024-03-29 at 11 00 51 PM

Screenshot 2024-03-29 at 11 00 41 PM

Question #2

So, I was playing around on how to run migrations on colorstack-test, because it was still empty even after running the migration. I came across this page that sounds like I can go ahead and work with the connection to colorstack, and not worry about creating a new connection to colorstack-test? Is this correct? How can I incorporate the test database into my tests, if I do need to?
Screenshot 2024-03-30 at 12 21 23 AM

@hebronmekuria So sorry for the late response here, I didn't see these comments! To help further debug these issues, I think the easiest thing would be to put up a draft PR and just tag me in some comments in the code/PR directly. It'll also make it easier for to pull your branch down locally and give it a shot (though I can do that now as well I believe).

I'll pull your branch down and try to see what the issue is with the types!

Question #2

So, I was playing around on how to run migrations on colorstack-test, because it was still empty even after running the migration. I came across this page that sounds like I can go ahead and work with the connection to colorstack, and not worry about creating a new connection to colorstack-test? Is this correct? How can I incorporate the test database into my tests, if I do need to?

You actually don't need to do any setup for the colorstack-test database! That's automatically handled in vitest-environment-kysely.ts. All you have to do is run the test command and you should be all good - it'll connect to colorstack-test with the given setup!

The reason you don't see any tables in colorstack-test is because we "reset" the database after every test run. That ensures that we get the same results every time we run tests!

Alright, let me make a PR.

Question for the listJobOffers function:
What parameters are required for searching? I'm assuming role_title and company can be optional? Other search parameters can be: location or employment type.

Closing for now, but will reopen shortly.