-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Billing #2667
Billing #2667
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
2ba73ed
to
45b1ff7
Compare
009a27b
to
c35251b
Compare
f6ad21e
to
7e4f33f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR introduces comprehensive billing functionality and multi-tenant support to the DAnswer system, integrating Stripe for payment processing and enhancing user management capabilities.
- Implemented Stripe integration for subscription management in
backend/ee/danswer/server/tenants/api.py
andweb/src/app/ee/admin/cloud-settings/BillingInformationPage.tsx
- Added new Cloud Settings admin page in
web/src/app/ee/admin/cloud-settings/page.tsx
for managing billing information - Modified PostgreSQL port from 5432 to 5433 in Docker Compose files and
backend/danswer/configs/app_configs.py
- Enhanced multi-tenant support with new functions in
backend/danswer/auth/users.py
andbackend/danswer/server/manage/users.py
- Hardcoded
CLOUD_ENABLED
totrue
inweb/src/lib/constants.ts
, potentially affecting cloud-related features
22 file(s) reviewed, 9 comment(s)
Edit PR Review Bot Settings
10a97cf
to
e0f4e1f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it works :P
backend/Dockerfile.cloud
Outdated
FROM python:3.11.7-slim-bookworm | ||
|
||
LABEL com.danswer.maintainer="founders@danswer.ai" | ||
LABEL com.danswer.description="This image is the web/frontend container of Danswer which \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of the comments and things are not correct. I would say this just should not be used by the community.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's remove this one
from danswer.auth.users import current_admin_user | ||
from danswer.auth.users import current_curator_or_admin_user | ||
from danswer.auth.users import current_user | ||
from danswer.auth.users import current_user_with_expired_token | ||
from danswer.configs.app_configs import APP_API_PREFIX | ||
from danswer.server.danswer_api.ingestion import api_key_dep | ||
from ee.danswer.server.tenants.access import control_plane_dep |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not import ee modules from the MIT stuff. It confuses the separation between the versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are other places this is done but we should address those.
@@ -60,6 +63,7 @@ | |||
from ee.danswer.db.api_key import is_api_key_email_address | |||
from ee.danswer.db.external_perm import delete_user__ext_group_for_user__no_commit | |||
from ee.danswer.db.user_group import remove_curator_status__no_commit | |||
from ee.danswer.server.tenants.billing import register_tenant_users |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here and around this line, it should not import from ee
They will be directed to the billing page. | ||
We gate the product when | ||
1) User has ended free trial without adding payment method | ||
2) User's card has declined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can let them use it and give a warning if the card declined. Hubspot does this and I appreciated that and paid them :P
@@ -0,0 +1,243 @@ | |||
services: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's remove this
* k * data -> control * nit * nit: error handling * auth + app * nit: color standardization * nit * nit: typing * k * k * feat: functional upgrading * feat: add block for downgrading to seats < active users * add auth * remove accomplished todo + prints * nit * tiny nit * nit: centralize security * add tenant expulsion/gating + invite user -> increment billing seat no. * add cloud configs * k * k * nit: update
* add vespa multi tenancy * k * formatting * Billing (#2667) * k * data -> control * nit * nit: error handling * auth + app * nit: color standardization * nit * nit: typing * k * k * feat: functional upgrading * feat: add block for downgrading to seats < active users * add auth * remove accomplished todo + prints * nit * tiny nit * nit: centralize security * add tenant expulsion/gating + invite user -> increment billing seat no. * add cloud configs * k * k * nit: update * k * k * k * k * nit
JWT-based authentication:
SECRET_JWT_KEY
for encrypting user/tenant contextJWT_ALGORITHM
(HS256) for token signingInter-service communication security:
DATA_PLANE_SECRET
secures control plane and data plane communicationAPI access control:
EXPECTED_API_KEY
required in headers for control plane API accessStripe integration for secure billing: