Skip to content

Welcome email, login and my account pages to handle workspaces#22

Merged
vkarpov15 merged 6 commits intomasterfrom
vkarpov15/welcome-email
Feb 24, 2026
Merged

Welcome email, login and my account pages to handle workspaces#22
vkarpov15 merged 6 commits intomasterfrom
vkarpov15/welcome-email

Conversation

@vkarpov15
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings February 24, 2026 20:00
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@netlify
Copy link

netlify bot commented Feb 24, 2026

Deploy Preview for mongoose-js ready!

Name Link
🔨 Latest commit f08c0af
🔍 Latest deploy log https://app.netlify.com/projects/mongoose-js/deploys/699e1d8b0a441a0008aa2330
😎 Deploy Preview https://deploy-preview-22--mongoose-js.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request implements workspace-based authentication and onboarding for Mongoose Studio. When users purchase a subscription via Stripe, they receive a welcome email with a setup link that allows them to log in via GitHub or Google OAuth and claim ownership of their workspace. The PR also adds account management pages where users can view their workspaces, see API keys, and update workspace names.

Changes:

  • Added Stripe webhook handling to create workspaces, send welcome emails with setup links, and rotate API keys upon subscription creation
  • Implemented login and account management pages with OAuth integration that matches users to workspaces based on email
  • Enhanced GitHub OAuth to retrieve primary email addresses and match users to workspace invitations by email

Reviewed changes

Copilot reviewed 19 out of 21 changed files in this pull request and generated 15 comments.

Show a summary per file
File Description
test/verifyGithubAccessToken.test.js Minor formatting fix: removed space before parentheses in arrow function
test/updateWorkspaceMember.test.js Fixed test to use 'roles' array instead of singular 'role' to match API
test/stripeWebhook.test.js Added comprehensive tests for Stripe webhook handling including workspace creation and email sending
src/util/error.js New IntegrationError class for handling integration-specific errors with status codes
src/integrations/mailgun.js New Mailgun integration for sending transactional emails with form-data support
src/integrations/githubOAuth.js Added getPrimaryEmail function to fetch user's primary email from GitHub API
src/emailTemplates/newWorkspace.html HTML email template for welcoming new workspace owners with setup instructions
src/db/workspace.js Added stripeCustomerEmail field to temporarily store customer email before workspace is claimed
src/db/user.js Fixed missing semicolon in validation error message
src/db/invitation.js Minor formatting fix: removed space before parentheses in post-validate hook
src/actions/updateWorkspace.js New action to allow owners/admins to update workspace names with validation
src/actions/stripeWebhook.js Major update to handle checkout completion: creates workspaces, generates API keys, and sends setup emails
src/actions/getMyAccount.js New action to retrieve user account info and associated workspaces with roles
public/my-account.html New account dashboard page showing user's workspaces with API key management and name editing
public/login.html New login page that handles OAuth flows and workspace setup via query parameters
package.json Added random-word-slugs dependency and changed mongoose version from pre-release to stable
netlify/functions/updateWorkspace.js Serverless function wrapper for updateWorkspace action
netlify/functions/google.js Added logic to match users to workspaces by stripeCustomerEmail
netlify/functions/github.js Enhanced to fetch primary email and match users to invitations/workspaces by email
netlify/functions/getMyAccount.js Serverless function wrapper for getMyAccount action
.env.test Added environment variables for Stripe, GitHub, and Mailgun in test environment

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

vkarpov15 and others added 4 commits February 24, 2026 16:21
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@vkarpov15 vkarpov15 merged commit 7444248 into master Feb 24, 2026
6 checks passed
@vkarpov15 vkarpov15 deleted the vkarpov15/welcome-email branch February 24, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants