GithubHelp home page GithubHelp logo

polarsource / polar Goto Github PK

View Code? Open in Web Editor NEW
1.5K 6.0 50.0 79.03 MB

From first donation to IPO. Polar is the funding & monetization platform for developers.

Home Page: https://polar.sh

License: Apache License 2.0

Dockerfile 0.02% Python 46.66% Ruby 0.01% JavaScript 0.62% TypeScript 49.85% Mako 0.01% SCSS 0.11% HTML 0.32% CSS 0.07% Shell 0.07% Mustache 0.33% Astro 0.37% MDX 1.56% Nix 0.01%
fastapi funding nextjs python sponsor typescript tailwindcss github-app react polar

polar's Introduction


Subscribe on Polar

Sign Up   •   Blog   •   Docs   •   API

Polar is released under the Apache 2.0 license. Discord Chat Follow @polar_sh


Polar.sh: All-in-one funding & monetization platform for developers

Focus on building your passion. We'll focus on the infrastructure to get you paid. From first donation to IPO.

  • All-in-one funding & monetization (soon) platform for open source- and indie developers.
  • Build your own audience with Polar Newsletters/Posts
  • 1% OSS Program - setup automatic rewards to upstream contributors/dependencies (soon)
  • We're the merchant of record handling the...
    • ...boilerplate (billing, receipts, customer accounts etc)
    • ...headaches (sales tax, VAT)

Serving world-class open source- and indie developers

Developer/Initiative How they're using Polar
SerenityOS SerenityOS & Ladybird Uses issue funding & rewarding contributors 100%
tRPC tRPC All their issues are fundable with contributors getting 70%
tRPC Bela Bohlender Blogging (incl. premium posts for members) and sponsorship
Your next store Your Next Store Selling access via their website to private GitHub repo of their Next.js storefront
tRPC Biome Uses issue funding & rewarding contributors 70%
tRPC Strawberry GraphQL Membership benefits, newsletter & sponsorship + Discord invites
tRPC David Hewitt Blogging (incl. premium posts for members) and sponsorship
Your next store Open Status Funding towards their issues/backlog
tRPC Isaac Harris-Holt Blogging (incl. premium posts for members) and sponsorship

... and thousands more. Join us!

Pricing

  • No fixed, monthly, costs
  • 5% + payment & payout fees

Roadmap, Issues & Feature Requests

🎯 v1.0 North Star. Checkout what we're building towards

💬 Shape the future of Polar with us. Join our Discord

🐛 Found a bug? Submit it here.

🔓 Found a security vulnerability? We greatly appreciate responsible and private disclosures to [email protected]. See Security

Polar API & SDK

You can integrate Polar on your docs, sites or services using our Public API, Webhook API, and/or our Polar JS SDK (Beta)

Contributions

You can develop on Polar in GitHub Codespaces. The environment is pre-configured to contain (most) of the tools that you'll need, and will help you to configure the integration between Polar and GitHub (see .devcontainer/README). Using an instance with at least 4 cores is recommended.

Open in GitHub Codespaces

You can also develop on Polar locally on your computer, which is the recommended way of working if you want to get into the deep of how Polar works. Documentation on how to setup a development environment is incoming. Until then, if you're feeling adventurous checkout our repository structure below and clients/README and server/README in particular.

Contributors

Monorepo

♥️🙏 To our pyproject.toml friends: FastAPI, Pydantic, Arq, SQLAlchemy, Githubkit, sse-starlette, Uvicorn, httpx-oauth, jinja, blinker, pyjwt, Sentry + more
♥️🙏 To our package.json friends: Next.js, TanStack Query, tailwindcss, zustand, openapi-typescript-codegen, axios, radix-ui, cmdk, framer-motion + more

Security

If you believe you have found a security vulnerability in Polar, we encourage you to responsibly disclose this and not open a public issue. We will investigate all legitimate reports and greatly appreciate your help. Email [email protected] to disclose any security vulnerabilities.

License

Licensed under Apache License, Version 2.0.

polar's People

Contributors

aeworxet avatar ashharr avatar birkjernstrom avatar dennis-nw avatar dependabot[bot] avatar emilwidlund avatar eval avatar frankie567 avatar fredrikaverpil avatar github-actions[bot] avatar hult avatar isaacharrisholt avatar jacobcoffee avatar mahmoudgalalz avatar mfts avatar patrick91 avatar petterheterjag avatar sultaniman avatar yezz123 avatar yoshirulz avatar zegl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

polar's Issues

Add badge to all issues retroactively

In case the maintainer opts-in to have the Polar badge added retroactively to all of their historic issues, schedule a task to add it to all issues in reverse chronological order.

Why reverse order?
Since we update the body, we'll affect the latest modified timestamp which is the default sort by in Github Issues. To reduce the changes to a maintainers issues view, we want to add the badge in reverse to ensure the chronological order remains the same despite all issues being updated in a short timeframe.

Show issues in dashboard

image

Prerequisites

  1. State set for current organization and repository
  2. (Optional, but delightful) Navigation between repositories
  3. Context to setup and manage SSE subscriptions

Todo

  • Fetch issues for current repository using React Query
  • Invalidate React Query hook upon receiving SSE event of issues changing
  • Paginate issues

Uninstalling GitHub app fails

AssertionError: Dependency rule tried to blank-out primary key column 'user_organizations.organization_id' on instance '<UserOrganization at 0x11754d790>'

Funding with Polar

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar

Chrome: API endpoint to enhance Github Issues view

Core part of the Chrome Extension. Using a content script on Github Issues page(s), we should send an API request to fetch all the additional data we want to enhance the view with.

We could likely proxy the requests on this page via our API to provide results immediately upon them being requested, but... becomes much more brittle integration if we're a middleman.

Easiest (alpha version) is likely:

  1. On load: Scrape the page for all issue IDs shown
  2. Send an API request for all of those issue IDs
  3. Showcase a "Polar spinner" for Github Issues
  4. Enhance the Github Issues view once we receive the response

But let's discuss quickly as a group once we get here. There are some design considerations, i.e "flickering content" being the biggest of table content changing as we enhance etc.

Funding with Polar

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar

Internal admin for polar team members

Keeping it super basic. Barebones "design" and permissions based on Github user ids for our team members. So we can build a few automations/management for our team.

Tailwind Polar Theme

Light & dark mode.

So we can implement and use it across the product as part of our polish efforts.

Notifications: Notify on PR merged

Notification when a PR has been merged for a given issue, i.e "solved".

In App

  • Maintainer in-app notification
  • Pledger (subscriber) in-app notification

Email

  • Maintainer email (opt-in default: NO)
  • Pledge email (opt-in default: YES).
    • Language & link around reviewing and disputing the fix within 14 days

Funding with Polar

Onboarding

image

image

Prerequisites

  1. Context/Global state of current organization and repository for user & SSE events

Todo

  • Introduce settings for organization
  • Redirect user to onboarding in case no settings exists for an organization, i.e it was just installed and we're syncing all its repositories
  • Keep track of issues synced in database
  • Showcase all repositories
  • Update them based on SSE events of newly synced issues, i.e progress
  • Allow user to customize and set settings for organization

Create GUID type

Currently, it's a bit messy that GUID is only a SQLAlchemy type that we treat and type as a str in Python. Or worse a uuid.UUID which when used with Pydantic will re-introduce the hyphens and thereby break the intent of GUID.

Or... Go with standard uuid.UUID to avoid these types of errors. Might be best. Hyphens is a-ok :)

Notifications: Email Service

Email service

  • Evaluate and decide on email provider, e.g Sendgrid, SES...
  • Integrate chosen email provider
  • Support email templates for each notification
  • Queue sending emails for notifications created + if user has opted-in to them

Funding with Polar

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar

Support auth via Github Installation edit flow

Just ran into this myself.

  1. Signed up for Polar
  2. Signed out of Polar
  3. Edit the installed repositories on Github
  4. Redirected to Polar
  5. Error: Unauthenticated & trying to install repos. Need to redirect back to Github Auth with a custom redirect_uri that allows us to redirect back to the installation path once authenticated

Funding with Polar

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar

Notifications: Add on work (branch) started

Notification when work is started on a given issue, i.e branch is created and contributions (commits) are being made.

In App

  • Maintainer in-app notification
  • Pledger (subscriber) in-app notification

Email

  • Maintainer email (opt-in default: NO)
  • Pledge email (opt-in default: YES)

Funding with Polar

Issues: One endpoint to fetch all issues and their relationships for display

To be discussed as a group.

Ideal solution is likely going with JSON API 1.1, e.g ?include= to keep API standalone per resource, but allow pragmatic loading of additional relationship resources.

However, we can be pragmatic in the beginning and alpha by simply including a lightweight representation of the necessary relationship models in the issues endpoint for the dashboard.

Chrome: Create new clients app for Chrome Extension

Setup the barebones structure for developing our Chrome Extension.

Tasks

  • Create new Next13 app in clients/apps, e.g chrome-extension It's now a plain React app
  • Setup "Hello World" equivalent of content scripts that detect presence on Github Issues

Funding with Polar

Client State Management

Currently, our client-side app is very barebones and hacky. It's mainly hacked together to try out the backend at this stage 🙊

To make the client-side nice to work with and to easily support real-time updates via SSE & React Query re-refetching etc, we need to make some investments in laying the foundations here. Shouldn't take too long, but should save a ton of headache that is already creeping in – even at this hacky stage.

Intended design

  • Zustand for client-side state management
  • React Query for all API requests via our polar-api package
  • SSE support for listening to changes and invalidating React Query cache

Badge settings should appear in onboarding

It exists, but doesn't show currently. Intent is to show up after 40% synced or a certain time threshold. The fact that it's not showing is likely caused or connected to what's caused #74

User Story: "After 10 seconds, I understand that Polar is syncing all my issues, but would like to proceed with the product. So I expect the next step in onboarding and/or the ability to click continue"

Tasks

  • Fix bug of the component not showing
  • Change it to show after 10 seconds vs. % saved
  • Update to use the new badge settings from dashboard settings built by Gustav

Funding with Polar

Use GitHub API to populate UserOrganizations

Use the GitHub API as the source of truth for mapping which organizations and repositories a user can read/write.

Doing this will support new users signing up to be joined into an existing organization, and making sure that we're always up to date.

  1. Use the /user/installations and /user/installations/{installation_id}/repositories API endpoints to fetch which installations and repositories the user can access.
  2. Cache the result into UserOrganizations and UserRepositories (new).
  3. Refresh from GitHub if the cached results is out of date (hourly or so).

Notification Center

image

Our notification center. Notifications are always shown in-app for affected users with different copy depending on the audience, e.g maintainer vs. customer. All notifications also have emails tied to them, but with different default opt-ins depending on the audience.

Feature(s)

Notifications/emails to implement

Polish

Funding with Polar

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar

Notifications: Notify on PR created

Notification when a PR has been submitted and connected to a given issue.

In App

  • Maintainer in-app notification
  • Pledger (subscriber) in-app notification

Email

  • Maintainer email (opt-in default: NO)
  • Pledge email (opt-in default: YES)

Funding with Polar

Show user profile in repository selection dropdown

Currently, in case user doesn't have an organization/repositories connected, we show a blank dropdown (except for the connect more repositories link).

Our frontend knows whether the user has organizations or not. In case they don't, we should showcase the users avatar + name as an "organization", i.e it will look the same as if they had installed the app on one of their personal repositories.

Design discussion
Do we want to add a small badge to these organizations at the root level showing the number of connected repositories? It would help clarify that there are connected repositories once/if they do actually connect repositories.

Redirect to Github App Install directly vs. flash /dashboard

Upon login/signup when we authenticate the user, we redirect them to/dashboard which in turn redirects to github.com/apps/polar-code/installations/new – redirect immediately instead of to /dashboard

Funding with Polar

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog :^)
Fund with Polar

Review & attest payouts

See all recent resolved issues with pledges and attest them in an admin to have them be paid out.

Polar Admin

Setting up an internal admin

Admin features

Funding with Polar

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar

Deployment & Monitoring

Tasks

  • Settle on managed hosting provider(s)
  • Setup simple CD
  • Setup Sentry

Funding with Polar

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar

Require ToS/Privacy opt-in

We need to have users accept our Terms of Service (ToS) and Privacy Policy at two points:

  1. Signup
  2. Pledge

Let's have it in the shape of a checkbox with the text "I accept the Terms of Service and Privacy Policy" with link to /tos and /privacy respectively.

Funding with Polar

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar

Alpha/Beta Invites

We want to limit and ease our initial rollout using classical beta invites.

Of course, since our badge is exposed to everyone, we need to allow pledgers to get invited for a customer/following account without any invite except for their initial pledge. This can create an interesting and fun dynamic in case we grant invites to each member; pledging becomes a way to get early access which in turn also reaches out to new maintainers (from their issue dependencies).

  • allow to join with code
  • send codes via email to others
  • auto approve from logged in pledge?
  • auto approve users joining from anon pledge
  • generate codes on backoffice

Tasks

Funding with Polar

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar

Progressive Signup/Onboarding

By default now, new signups are "customers" without any connected repositories or issues. Once they've granted access with Github, they're redirected to our dashboard in an empty state. Or they're a customer with a single pledge which is almost "empty". We should treat both progressively as seen below AND offer a shortcut via our website.

1: Progressive Signup

We should treat this user the same and have an upsell to connect repositories for:

  • Maintainer of their open source repositories
  • Better following and pledging for their open source dependencies (Following)

2: Direct App Installation Path (Website)

We should offer a shortcut path that our future website can link to, i.e direct Github app installation path. Could be dependent on issue #61

Funding with Polar

Login Flow

Currently our login flow is two-steps.

  • You click "Login" to the right in the top bar
  • We send you /login which contains a Github Login button

Since we're only offering Github SSO for now should we simply use that as the "Login" link in the top bar?

Funding with Polar

Issue sync progress is not accurate during synchronization

Some issues have emerged with the issue sync progress in onboarding. Likely due to some changes with issue edited signals and what the frontend expects in terms of the data.

Issues

  • Total count can change during sync
  • Can restart in the midst of syncing
  • (Existed before too) Includes PRs in the total count

Dashboard

  • Serverside Pull Request matching
  • Issue status (backlog, building, pull request, completed)
  • Filter by status

Pagination of issues via infinite scroll

Let's fetch 50 issues at a time and paginate them via infinite scroll

Funding with Polar

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar

Chrome: Implement design

Once #126 is in place we can implement the design of the Chrome Extension

  • Extension pop-up with authorize button
  • The page that logs you in (could be empty, it's closed as soon as the token is picked up)
  • The issue decoration itself
  • Contain our Tailwind CSS + ensure Github CSS doesn't impact us

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.