colorstackorg / oyster Goto Github PK
View Code? Open in Web Editor NEWMonorepo that houses ColorStack's core product software.
License: MIT License
Monorepo that houses ColorStack's core product software.
License: MIT License
If you create a new Postmark account and use its API key, it will not work in our codebase because we hard-code the from
property in our codebase to use the colorstack.org
domain. See here.
After further investigation, it seems as though using a cloud service like Postmark does not make sense in an open-source environment because it requires domain verification, which nobody will have access to with their school emails, and you obviously can't verify a public domain such as gmail.com
.
Developers should be able to add their email credentials (ie: email, password) to their .env
file in order to send an email in development.
A likely approach seems like using the nodemailer
library and simply sending emails from there in development.
From the GitHub documentation:
Dependabot consists of three different features that help you manage your dependencies:
- Dependabot alerts: inform you about vulnerabilities in the dependencies that you use in your repository.
- Dependabot security updates: automatically raise pull requests to update the dependencies you use that have known security vulnerabilities.
- Dependabot version updates: automatically raise pull requests to keep your dependencies up-to-date.
Dependabot should automatically upgrade dependencies on a weekly basis.
Once #18 is in, then we will no longer have 2 UI packages so we can simply rename core-ui
to ui
.
We'll need to update all references to this package accordingly.
A few months ago, this feature was requested in the member directory, and it has come to surface once again π
The feature would be a ColorStack Map in the member profile.
Map contains 2 filters:
As well on the map if there was some special token
representation of where colorstack chapters are. The only thing that should happen if clicked is to have the abovementioned details alongside how long it has been there. Founding Chapters should have a label π« Founding Chapters π«
and newer chapters (< 1 year) should also have a label βNew Chapter β
.
Related to #4.
The query to list job offers from the database should support pagination (ie: limit
, offset
) as well as the ability to filter by status, company, employment type and/or location!
If an application has already been accepted, and there is another application with that same email, then the process will fail if that second application is also accepted.
Steps to reproduce the behavior:
Once the first application is accepted, we should automatically delete any other applications that have that same email.
The acceptApplication
function is going to be the main focus of this issue.
Currently, new contributors have to manually run commands to create the Postgres databases, and now to also create a Postgres role with password. We should instead allow them to run a script that automatically does that.
A contributor should just be able to run some sort of database initialization script that automatically runs these commands for them to create the role and databases.
We display important resources in the home page of the Member Profile, as such:
Now that we are open-source, we should have the link to this GitHub repository.
A new link should be listed just below the Member Wiki
with the title:
GitHub
and the description:
The codebase where our software, called Oyster, lives. Go read + contribute to the codebase!
The user's profile picture becomes distorted (shrunken horizontally) when the display becomes smaller 3
Steps to reproduce the behavior:
The user's profile picture will be shrunken horizontally and become vertically off-center.
This occurs on the page where you edit your personal profile. This bug was detected on Firefox on my MacBook.
Need to update all package names to use the @oyster
prefix, ie:
@oyster/api
@oyster/core
@oyster/core-ui
@oyster/member-profile
@oyster/types
@oyster/utils
ColorStack members who have created their profiles in the Member Directory would be automatically opted-in to share their emails with their local ColorStack Chapters (if they exist), and they could opt out in the settings of their member profile.
As a ColorStack Chapter leader, we often want to provide opportunities to our leaders, specifically catering them to ColorStack National-affiliated members. We cannot identify said members if they haven't posted an introduction or only lurk in Slack, and we cannot request the data without their consent.
It would be preferable to make this data available to chapters, at least in the surrounding area, because it is common for ColorStack members to commute to neighboring universities to attend their ColorStack Chapter events.
Currently, sending a one time code for authentication purposes will fail silently. That's because simply queue a job in the background to send the email. The expected behavior is that the user would see an error message if it failed.
The user should see an error message if the one time code fails to send.
This code needs to be converted from queueing a job, to actually sending the email.
π΅οΈ Students often when in the job search have inquiries about a particular interview process for a company they are applying for. While we do have company specific channels, #career-question & #career-interview-prep in our Slack, sometimes those inquires may go unanswered or are repeated.
β Solution: If we had an application/file for students to document their experiences easily, it could give ColorStack members a more efficient way of finding answers and reduce inefficiencies in finding answers within Slack channels.
The hope is for everyone who may have had a previous internship/program to fill it in, but if they do not, Slack channels are still open for networking/finding answers.
The idea of how it could be formatted would be the following:
Your Name | Position | Duration (Intern/FT) | # of interview Rounds | Interview Questions | Rating out of 10 & Why? | Other Notes |
---|---|---|---|---|---|---|
John Doe | SWE intern | Intern | 2 | Two Sum Kth Smallest Element in a BST | 6 because they did not provide housing stipends | Reviewing this the night before helped me for the first part which was a behavioral |
Other idea: We could do something similar to the icebreakers on the member profile, to make filling in this info easier in having drop down menus and other features.
This is a draft of the idea; more things can be added/subtracted from the idea as we go along, but I would love to work on this and am open to any suggestions/critics!
When setting up Postgres locally, developers will encounter an error:
FATAL: role "ramiabdou" does not exit
That's because our DATABASE_URL
does not have a username in it, so it falls back to the OS user name. We should add the username/password to prevent needing to create any roles.
.env.example
files should be updated to include the colorstack:colorstack
username/password combination.As a 1-person engineering team, I'm the bottleneck for reviewing PRs and getting code merged. Often times, we need some initial feedback on a PR that can be the first touch point before I come in.
We should explore CodeRabbit throughly to see if its a feasible/trustworthy option to help with code reviews. Any decision/learnings should be documented in this thread!
Some alternatives include What The Diff and Codium.
We already have a couple GitHub issue templates that make it easy to file a bug or feature request. There's a another category of issue that Rami typically uses to file issues and it'd be nice to have a template for that too.
The existing issue templates we have are here in the ./github/ISSUE_TEMPLATE folder.
This issue should create a new template with the name general.md
and have the following content:
---
name: General π€
about: A generic ticket.
title: ''
labels:
assignees: ''
---
### Description
A clear and concise description of what the issue is.
### Acceptance Criteria
What are the criteria that would make this issue complete?
### Additional Context
Add any other context about the issue here.
This is an open issue meant to explore the best package manager. So far, it looks like pnpm
is the most promising with regards to its first-class monorepo support as well as installation speed. But that is certainly up in the air.
Learnings will be documented below!
Linux machines seem to have stricter default configurations for Postgres, particularly in the pg_hba.conf
file. This line in particular seems to be an issue when connecting to Postgres without a username/password:
local all all peer
Because of this default peer
authentication method, we'll get an error message such as:
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: Peer authentication failed for user "postgres"
We should add documentation that instructs the user to update their pg_hba.conf
's main authentication method to trust
.
ColorStack does an annual census which surveys members on their experience with ColorStack, how they are doing in their job searches and more. Last year, this was an Airtable form. This year, we want to move this into the Member Profile because we already have a lot of data linked to a particular member, and it would streamline/simplify the whole process.
The ideal UX is something like this:
This is a obviously a large feature, so it'll need to be split into subtasks.
I'm going to keeping everything in this ticket and just reference them in PRs, but ultimately update this todo list.
Currently, ESLint is only enabled in the api
application. We need to enable this in all of our other applications and packages.
This issue will be accepted if:
eslint:recommended
) rules.lint
commands which actually runs eslint
.The api
already has enabled ESLint, see you can see here for inspiration.
Most of our members already have their birthdate stored on their Slack profiles. We can use the Slack API in order to fetch these birthdates.
The Slack API has 2 endpoints that may be helpful in this task:
Per Slack's documentation:
A user's custom profile fields may be discovered using users.profile.get
...and it seems as though the birthdate field is a custom profile field that ColorStack has set in our Slack workspace.
We'll likely just need to execute this job as a one-time script (almost like a database migration). We'll also need to handle the case in which people change their birthdates (or when new members join the workspace and update their birthdate), but we'll handle that separately.
It's not immediately clear to newcomers what all of the PR expectations are, despite having PR templates.
We should clearly document:
After every Fam Friday, the ColorStack team uploads videos of the event sessions to YouTube! Then, it's linked in the Member Wiki. In the effort to consolidate things into one place, it would be great to be able to access event recordings from the Member Profile.
To view an event recording, a member should be able to do the following in the Member Profile:
This is dependent on #68 being worked on first.
We use Tailwind throughout our applications, however we have a few components in our core-ui
package that rely on SCSS for styling. This is annoying as it requires a build step and thus a dependency on rollup
as well.
The following components should be converted to Tailwind:
Checkbox
Dropdown
Modal
Radio
Select
Toast
Once the Modal
is converted, we can actually also get rid of the _breakpoints.scss
file.
Then we can remove the following dependencies:
postcss
rollup-plugin-postcss
sass
Sentry Issue: MEMBER-PROFILE-4Y
error: column "current_location_coordinates" is of type point but expression is of type record
File "/app/apps/member-profile/build/server/index.js?t=1712568885000", line 5792, in <anonymous>
File "/app/apps/member-profile/build/server/index.js?t=1712568885000", line 5782, in updateMember
...
(15 additional frame(s) were not displayed)
Career coaching link is not valid. Not sure if this is because we are no longer doping career coaching or simply because the link is invalid.
Steps to reproduce the behavior:
Link should be valid and lead to calendly link to set up a time for a meeting with CataliΓ±a.
Although this is an open-source codebase, this is primarily meant to benefit ColorStack members on their journey to become software engineers, giving them opportunities to read and contribute to the codebase.
If someone opens a PR that is not a ColorStack member (we'll check if their GitHub account is connected to our database), then a GitHub Actions bot should automatically display a message like:
It doesn't seem like you are a ColorStack member. This codebase is primarily meant to benefit our students so that they can gain experience contributing to a codebase, so unfortunately your contribution will not be prioritized.
If you are a ColorStack member, then be sure to connect your GitHub account in your Member Profile!
This is dependent on #64.
We display our ColorStack socials in the home page of the Member Profile, as such:
Now that we are open-source, we should have the link to this GitHub repository.
We should display the GitHub logo just after our Twitter
logo.
Note that we use react-feather
, which is an icon library where we get our social logos from.
Currently, we're using Statsig for feature flags in our product.
There a couple downsides to this:
Instead, we should build a very simple feature flag system, controlling feature flags in our own database.
When members add their GitHub username to the CONTRIBUTORS.yml
file, most people will simply add their name to the end of the file. Ideally, we would like to sort all of the usernames, and do so automatically.
When a new push to the main
branches happens:
CONTRIBUTORS.yml
is already sorted, then nothing should happen.CONTRIBUTORS.yml
is not already sorted, then it should automatically sort the the file and push a new commit.A good example of how to do this can be found here. Though there's a lot more going on in this file than we specifically need, we can take inspiration from how they sort a file and push a new commit.
After following steps in contributing guide to set up postgres db and environment files, running yarn
and attempting a yarn build
, I encounter this error:
β°β[:(] % yarn build
yarn run v1.22.19
$ turbo run build --cache-dir=.turbo
β’ Packages in scope: @oyster/admin-dashboard, @oyster/api, @oyster/core, @oyster/email-templates, @oyster/eslint, @oyster/member-profile, @oyster/tailwind, @oyster/tsconfig, @oyster/types, @oyster/ui, @oyster/utils
β’ Running build in 11 packages
β’ Remote caching disabled
@oyster/core:build: cache miss, executing 71fc511f580a6b90
$ tsup
@oyster/core:build: CLI Building entry: src/api.ts
@oyster/core:build: CLI Using tsconfig: tsconfig.json
@oyster/core:build: CLI tsup v6.2.3
@oyster/core:build: CLI Using tsup config: /Users/tewodrosmitiku/Desktop/Sandbox/oyster/packages/core/tsup.config.ts
@oyster/core:build: CLI Target: node14
@oyster/core:build: CLI Cleaning output folder
@oyster/core:build: CJS Build start
@oyster/core:build: ESM Build start
@oyster/core:build: ESM dist/api.js 123.98 KB
@oyster/core:build: ESM β‘οΈ Build success in 39ms
@oyster/core:build: CJS dist/api.cjs 133.16 KB
@oyster/core:build: CJS β‘οΈ Build success in 40ms
@oyster/core:build: DTS Build start
@oyster/core:build: src/modules/authentication/use-cases/login-with-oauth.ts(39,5): error TS2322: Type '{ [x: string]: any; } | undefined' is not assignable to type '{ id: string; } | null | undefined'.
@oyster/core:build: Property 'id' is missing in type '{ [x: string]: any; }' but required in type '{ id: string; }'.
@oyster/core:build: src/modules/authentication/use-cases/login-with-oauth.ts(40,19): error TS2769: No overload matches this call.
@oyster/core:build: The last overload gave the following error.
@oyster/core:build: Argument of type 'string' is not assignable to parameter of type 'TableExpression<DB, never>'.
@oyster/core:build: src/modules/authentication/use-cases/login-with-oauth.ts(41,8): error TS2769: No overload matches this call.
@oyster/core:build: Overload 1 of 3, '(selections: readonly SelectExpression<DB, never>[]): SelectQueryBuilder<DB, never, { [x: string]: any; }>', gave the following error.
@oyster/core:build: Type 'string' is not assignable to type 'SelectExpression<DB, never>'.
@oyster/core:build: Overload 2 of 3, '(callback: SelectCallback<DB, never>): SelectQueryBuilder<DB, never, { [x: string]: any; }>', gave the following error.
@oyster/core:build: Argument of type 'string[]' is not assignable to parameter of type 'SelectCallback<DB, never>'.
@oyster/core:build: Overload 3 of 3, '(selection: SelectExpression<DB, never>): SelectQueryBuilder<DB, never, { [x: string]: any; }>', gave the following error.
@oyster/core:build: Argument of type 'string[]' is not assignable to parameter of type 'SelectExpression<DB, never>'.
@oyster/core:build: src/modules/authentication/use-cases/login-with-oauth.ts(42,14): error TS2345: Argument of type 'string' is not assignable to parameter of type 'ReferenceExpression<DB, never>'.
@oyster/core:build: src/modules/authentication/use-cases/login-with-oauth.ts(43,14): error TS2345: Argument of type 'string' is not assignable to parameter of type 'ReferenceExpression<DB, never>'.
Steps to reproduce the behavior:
Steps in contributing guide up to yarn build
Project builds with no errors.
Wondering if I've done something wrong in my setup or typescript types aren't setup correctly.
After every Fam Friday, the ColorStack team uploads videos of the event sessions to YouTube! Then, it's linked in the Member Wiki. In the effort to consolidate things into one place, it would be great to be able to access event recordings from the Member Profile.
An admin should be able to do the following in the Admin Dashboard:
This is the current events page in the Admin Dashboard:
Currently, applications in the Admin Dashboard are shown newest to oldest, but though that means some applications will get reviewed really fast, it also means that some applications will get reviewed fairly slow. To have a more consistent time to review each application, we'll sort oldest to newest.
This is the route where the applications get displayed, and this is the function that gets called, which pulls applications from the database. You'll want to update the orderBy()
statement to go the other way. πΌ
Related to #2, we'll need to handle the case in which:
In both of those cases, Slack will emit a user_profile_changed
event when someone in our workspace updates their profile.
We actually already handle the user_profile_changed
event in our codebase because we need to know when people change their profile picture, since we store that picture to be used in the Member Profile. Here is where we're doing that.
We should update that logic to check for the birthdate field, and if it has a value, we should emit a slack.birthdate.changed
job, similar to how we emit a slack.profile_picture.changed
. And in that handler, we should validate the birthdate and store it on the member record.
β It would be great to implement something that gives permission for ColorStack to share a Member's Email with local ColorStack Chapter leaders.
π© Chapter Leaders (like myself) are always looking for ways to engage with the community and to reach as many people as possible. In my case there are hundreds if not upwards of a thousand ColorStack members across the NYC metro area. But Johana can't just give me their contact info for legal reasons. Implementing this will help bridge the gap between chapter leaders, and the community.
π» This will likely be implemented as a checkbox somewhere in this folder here my guess is either the emails page or the general page
Good and luck and be sure to see our contributing guide!π
It may be unclear to folks on how to keep their forked repository up-to-date with the upstream repository, so we should link the following GitHub articles:
if you trigger an action that displays a toast, it will only show it the first time and never again, unless you reload the page.
Toast messages should display every time that you do an action that should trigger it.
Husky is a tool that has Git hooks which allows to automatically do stuff (ie: lint) before committing/pushing. This ensures a higher bar for code quality for anything that makes it to GitHub.
We should automatically be running the format:fix
and lint:fix
command for any files that are staged (ie: lint-staged) before committing.
We don't currently have a format
/format:fix
command in the codebase, so we'll need to add that first.
This project will consist of building a working MVP for the chapter leaders platform. This platform will serve as a place where chapter leaders can access and keep track of the members in their school's chapter and, more broadly, the national ColorStack members at their school.
As the number of chapters (and chapter leaders) grows, it becomes increasingly clear how a centralized platform could simplify the process of starting and managing a school chapter. Furthermore, there have been recommendations for various features relevant to school chapters, but many of these tools can't be built without an initial platform for chapter leaders. By developing a basic platform, chapter leaders will immediately have a centralized manner to keep track of basic information about each member in the chapter, as well as contact information about ColorStack members that may not yet be part of the school's chapter (for the members that opt into sharing their email with local chapter leaders).
For this MVP, the focus can be on setting up a chapter member directory. Then, chapter leaders will be able to manually add/remove members from their school's directory, as well as update information such as email address or membership status. The value comes from providing an easier way for chapter leaders to manage members, distribute roles, access info such as emails, and gain perspective on size and growth of the chapter.
As an initial MVP, we won't aim to implement every feature that we might think of yet, but figure out what are the essentials to begin with.
Which of these seem essential for the MVP? Anything that's not yet listed?
In terms of scalability, (1) may be preferable because if we want to add more pages for more complex functionalities, it makes sense to have a separate app for this. For example, if in the future we were to add support for workflows such as managing applications or managing/scheduling events, it would make sense to have a separate app. However because chapters are still relatively small groups (compared to all of ColorStack) it's not clear if or when these workflows would be needed within the platform.
In terms of implementation, (2) is more favorable. With the current aim of building a page with a table containing the member directory, it would make more sense
Do we want to create a platform that's exclusively for chapter leaders, or should there be support for university chapters to connect on the ColorStack platform? It might make more sense to start with just providing support for chapter leaders' administrative needs.
Once a basic platform is built, there will be a lot of opportunities to build upon it with various features. These are likely outside the scope of this project, but future features could include
When a Windows OS user clones the GitHub repository, they are running into an issue in which Windows will fail creating the migration files since they have colon characters (:
) in it.
error: invalid path 'packages/core/src/infrastructure/database/migrations/2024-01-29T17:23:16Z-init.ts'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
Migration files should work on all machines, so it should no longer have colons in it.
We'll have to be careful about renaming migration files since production we'll need to update kysely_migrations
in production.
A bit of context: we have a job that runs about 2.5 minutes after an application is received and it's responsibility is to reject a member if possible (ie: wrong graduation year, email bounced, etc).
There's an edge case where if an application is accepted within 2.5 minutes, but the job that runs after wants to reject them, it will and it will also send a rejection email (despite that the member was accepted and already invited to the community).
Steps to reproduce the behavior:
After an application is accepted, they should not get a rejected email.
The reviewApplication
function is the one responsible for auto-rejections. We should modify this so that we only look at functions where the status
is pending
.
We no longer need to have a feature-ui
package, we can simply move those into either the core
or core-ui
packages.
An important feature request by ColorStack members is being able to share and view interview experiences for various companies - following the trend of features like compensation data and company features. This issue focuses on the backend features needed to make this possible and is linked to issue #120 .
On the backend, in the core package:
Before we had ESLint, we used tsc --noEmit
to do type checking in packages which didn't have type checking as a part of thier build commands (ie: packages with no build step or Remix, which doesn't do type checking). That was our only form of "linting" at the time so we called it lint
. Now that we're finally adopting ESLint everywhere, we can move tsc --noEmit
to it's more accurate command of type-check
.
tsc --noEmit
exists in the lint
command anywhere, it should be moved to type-check
.type-check
command accordingly.type-check
should be added to the Turbo command configuration.type-check
should be run in the CI pipeline.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!
For the MVP, we should give members a way to do the following in the Member Profile:
Here is the core data that we want to collect for a job offer in this MVP:
Here's a short overview of what needs to happen technically to support this.
On the backend, in the core
package:
job_offers
SQL table.uploadJobOffer
function, which accepts some job offer data and saves it to the job_offers
table.listJobOffers
function, which accepts some query parameters to support pagination and returns a list of offers.On the frontend, in the member-profile
application:
Companies
tab in the Member Profile.Companies
page which shows all job offers on the screen.We need to support connecting a GitHub account to a member's ColorStack account. This will be the beginning of many such integrations in the future!
This issue should:
Integrations
page to the "profile" section of the Member Profile.github_id
) on the member record.github_url
on the member record when the account is connected.On Windows machines, it seems like scrollbars show everywhere in the Member Profile as well as the Admin Dashboard. It looks really ugly!
Steps to reproduce the behavior:
The scrollbars should be hidden, and only appear once the scrolling happens (such as the default behavior on MacOS).
You need to be on a Windows machine to reproduce!
Implement dark mode functionality. Develop a configuration that allows users to toggle between 'light mode' (the current state) and 'dark mode'.
Dark mode provides users with an alternative color scheme that is easier on the eyes in low-light environments and can potentially reduce eye strain.
Many websites use dark mode functionality due to its benefits for user comfort and accessibility. Additionally, dark mode can improve battery life on devices with OLED displays, further enhancing the user experience for mobile users.
This issue is dependent on #19. Once we remove our dependencies on postcss
, then we will no longer need a build step in core-ui
.
The one small thing to consider however, is the the build step currently copies over the shared.css
to dist/index.css
. We'll likely need to add some new entrypoints to the core-ui
package using the exports
functionality within the package.json
. Something to the effect of:
{
"exports": {
"./index.css": "./src/index.css"
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.