
Closed
Posted
Paid on delivery
# Email Invite System for Existing [login to view URL] + Supabase Web App ## Project overview We have an existing web application built in Lovable using [login to view URL], Supabase, and Tailwind CSS, deployed on Vercel. The app is a self-assessment tool used by companies, where each company has an admin user and one or more team members. We need to replace the current shared invite link flow with a personalized email invite system. Each invite must be tied to a specific email address, sent via transactional email, and only usable by the named recipient. This is a focused backend and integration project. No new visual design work is required. The existing dashboard UI will receive a functional update to the invite section, but the broader design system is already established. ## Current state The app already has: - Working authentication via Supabase Auth - A `companies` table and a `company_members` table with role distinctions - A functioning company dashboard for admins - A shared invite link flow that allows anyone with the link to join a company (this is what we are replacing) - Vercel deployment with a production environment at a subdomain of [login to view URL] ## Detailed scope ### 1. Email infrastructure setup - Create and configure a Resend account on the free tier - Verify the [login to view URL] domain in Resend, including all required DNS records (SPF, DKIM, DMARC as applicable) - Store the Resend API key as a Supabase secret named `RESEND_API_KEY` - Confirm test emails deliver to inbox (not spam) from at least three major providers (Gmail, Outlook, Apple Mail) ### 2. Database schema Create a new table in Supabase called `company_invites` with the following columns: - `id` (uuid, primary key, default `gen_random_uuid()`) - `company_id` (uuid, foreign key to `[login to view URL]`, on delete cascade) - `invited_email` (text, not null) - `invite_token` (uuid, default `gen_random_uuid()`, unique) - `status` (text, default 'pending', check constraint: 'pending' | 'accepted' | 'expired') - `invited_by` (uuid, foreign key to `[login to view URL]` or equivalent user table) - `created_at` (timestamp with time zone, default `now()`) - `expires_at` (timestamp with time zone, default `now() + interval '7 days'`) - `accepted_at` (timestamp with time zone, nullable) Add a unique constraint on (`company_id`, `invited_email`) where `status = 'pending'` to prevent duplicate active invites. ### 3. Row-level security policies - Admins of a company can `INSERT` invites for that company - Admins of a company can `SELECT` all invites for their company - A specific invite row is `SELECT`-able by anyone presenting the matching `invite_token` (read-only, via Edge Function preferred over direct client query) - No `UPDATE` or `DELETE` from client-side, only from Edge Functions using the service role key ### 4. Supabase Edge Functions Three Edge Functions, written in TypeScript: **`create-and-send-invite`** - Authenticates the caller and verifies they are an admin of the specified company - Validates the email format - Checks for an existing pending or accepted invite for the same email and company, returns a descriptive error if found - Checks whether the email is already a member of the company, returns a descriptive error if found - Inserts a new row into `company_invites` - Calls `send-invite-email` with the recipient email, company name, and invite token - Returns success or a structured error response **`send-invite-email`** - Accepts `recipientEmail`, `companyName`, and `inviteToken` as parameters - Constructs a clean, functional HTML email with subject "You've been invited to join [companyName] on the North Star Self-Assessment Tool" - Includes a call-to-action button linking to `https://[production-domain]/join/[inviteToken]` - Sends via Resend API - Returns success or error **`accept-invite`** - Accepts an `inviteToken` parameter - Looks up the invite, validates it exists, is not expired, and has status 'pending' - Validates that the calling user's email matches `invited_email` (case-insensitive) - Within a single transaction: marks the invite as 'accepted', sets `accepted_at`, and inserts a row into `company_members` with role 'member' - Returns success with the company ID for redirect, or a descriptive error ### 5. Admin invite UI Replace the existing shared invite link section on the company dashboard with: - A multi-email input that allows entering multiple email addresses separated by commas, spaces, or newlines, with an "Add another" affordance for a clearer one-at-a-time entry mode - A "Send Invites" button that calls `create-and-send-invite` for each address and shows per-email success or error feedback - A pending invites table showing email, date sent, status (pending / accepted / expired), and a "Resend" action for pending or expired invites that refreshes the expiry to 7 days from now and resends the email - Inline validation that prevents sending to emails already pending or accepted for that company - Loading states and clear error messaging throughout UI should match the existing Tailwind-based design language. No new visual design work required, just functional implementation consistent with the current dashboard. ### 6. Invite acceptance flow Create a new page at `/join/[inviteToken]` that handles four distinct scenarios: **Scenario A: New user (no account exists for the invited email)** - Show signup form with email pre-filled and locked - On submit, create the account, call `accept-invite`, redirect to the assessment **Scenario B: Existing user, logged out** - Detect that the email already has an account - Show "Log in to accept invite" prompt with email pre-filled - On successful login, call `accept-invite`, redirect to the assessment **Scenario C: Existing user, currently logged in as the invited email** - Show "Accept invite to join [Company Name]?" confirmation - On accept, call `accept-invite`, redirect to the assessment **Scenario D: Existing user, currently logged in as a different email** - Show "This invite is for [invited email]. You are logged in as [current email]. Please log out and use the correct account." - Provide a "Log out" button Additionally, handle these error states with clear messaging: - Invite token not found - Invite expired (past `expires_at`) - Invite already accepted (single-use) - Database or network error ### 7. Legacy system removal Once the email invite flow is verified working in production: - Remove the existing shared invite link UI from the dashboard - Remove the `/join/[inviteCode]` route - Confirm no other parts of the app reference the old flow - Leave the `company_invites` table and the new `/join/[inviteToken]` route in place ### 8. Testing and handoff - End-to-end test of all four acceptance scenarios in production - Spam folder check across Gmail, Outlook, and Apple Mail - Brief handoff document covering: how to add new admins, how to monitor Resend deliverability, how to manually expire or revoke invites if needed, and a list of the deployed Edge Functions with their purposes ## Out of scope The following will not be addressed under this engagement: - Visual redesign of the dashboard or other app surfaces - Changes to the assessment tool itself - Migration of any data from the existing shared-link invites - Custom email template design beyond a clean functional layout - Ongoing maintenance beyond a 14-day post-launch bug fix window - Multi-language support - Bulk CSV upload for invitations (single email entry only) ## Technical requirements - All code written in TypeScript where applicable - Edge Functions written for Deno runtime per Supabase standards - Frontend code consistent with existing [login to view URL] + Tailwind patterns in the project - All database changes made via Supabase migration files, not direct SQL in the dashboard - Code committed to the existing GitHub repository on a feature branch, with a clean commit history and a pull request for review - No new third-party dependencies introduced without justification ## What we will provide - Access to Lovable, Supabase, Vercel, GitHub, and the domain registrar - Resend account creation (we will handle this ourselves and share API keys securely) - Timely responses to questions within 2 business days - Review feedback within 3 business days of receiving a milestone - A staging environment for testing before production deployment ## What we are looking for in a bidder - Demonstrated experience with Supabase, specifically Edge Functions and Row-Level Security - Experience integrating Resend or a comparable transactional email provider - A portfolio that includes at least one production auth or invite flow - Clear written English communication - Ability to commit to the agreed timeline ## Timeline We are targeting completion within 4 to 6 weeks from project start, with weekly progress check-ins. Bidders should propose their own timeline and milestone breakdown. ## Bid format To be considered, your bid must include: 1. Your proposed fixed price for the scope above 2. Your proposed timeline with at least three milestones 3. Links to two relevant past projects, ideally involving Supabase or invite/auth flows 4. A brief response (3 to 5 sentences) to this question: "Looking at the scope above, what is the most likely source of unexpected complexity, and how would you handle it?" Bids that do not address question 4 will not be reviewed. We are using this question to filter for bidders who have actually read the brief and have real experience with this type of work. About us North Star Project is a mission-driven organization developing ethical standards for the emerging psychedelics industry. We work with care, transparency, and an emphasis on building things well rather than fast. We are looking for a contractor who shares those values.
Project ID: 40450625
130 proposals
Remote project
Active 4 days ago
Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
130 freelancers are bidding on average $1,165 USD for this job

Hi, I've worked on building and maintaining complex automation workflows using n8n, focusing on integrating CRMs, databases, and marketing tools. My experience with Supabase, especially Edge Functions and Row-Level Security, and my background in transactional email integrations make me a strong fit for this project. I can start with a small test task to ensure alignment before moving to larger work. Looking forward to discussing this further. Best regards, Ivica
$1,125 USD in 7 days
3.9
3.9

Hello, I see you’re replacing a shared invite link with a fully personalized invite system that spans Resend setup, a new Supabase table, RLS policies, three Edge Functions, and a multi‑scenario join flow in Next.js. I’ve built nearly identical invite architectures for two SaaS platforms, including a Supabase‑based membership system where I delivered tokenized email onboarding and secure acceptance paths. I know the main risk here is ensuring consistency between RLS, Edge Functions, and email token handling, especially with pending/accepted uniqueness and multi‑scenario UX states. If that logic isn’t tightly coupled, expired or mismatched tokens can silently break onboarding. I’ll implement the `company_invites` schema via migrations, create the Edge Functions with clear service‑role isolation, integrate Resend with domain‑verified sending, and update the dashboard using your existing Tailwind patterns. I’ll also build the `/join/[inviteToken]` page to cover all four acceptance scenarios and finalize with full end‑to‑end testing. Before I start, I want to confirm a few details about your staging environment and whether you prefer individual or batched Edge Function calls for multi‑email entry. I can deliver this cleanly within the expected timeline. Best regards, John allen.
$1,000 USD in 10 days
0.0
0.0

Hello, I understand the importance of transitioning to a personalized email invite system for your self-assessment tool, ensuring that each invite is secure and tied to specific users. My approach will leverage Supabase for database management and Edge Functions, along with Resend for transactional email delivery, to create a seamless integration. Here is what I will deliver: - A new `company_invites` table in Supabase with appropriate constraints and security policies. - Three Edge Functions to handle invite creation, email sending, and invite acceptance, ensuring robust user authentication. - Clean, maintainable code with clear documentation for future reference. I can confidently complete this within your budget and timeline, and I will keep you updated throughout the process. What method do you prefer for testing email deliverability across different providers? Best regards
$1,125 USD in 7 days
0.0
0.0

Hi, The project scope is clear: replace the existing shared invite link with a personalized email system tied to specific email addresses, integrated via Supabase Edge Functions. I’d implement create-and-send-invite, send-invite-email, and accept-invite functions, enforce row-level security, and integrate with Resend for transactional emails. The key is ensuring all four acceptance scenarios work flawlessly, including new user signup, existing user login, and handling edge cases like expired or already-accepted invites. I’ve delivered similar production auth/invite flows with Supabase and transactional email integration, including dashboard UI updates and secure token handling. I can deliver a fully functional, tested invite system with clear documentation and staging-to-production deployment guidance.
$1,200 USD in 20 days
0.0
0.0

Hey, I can start now. ✅I’ve worked on something very SIMILAR. What really matters here is transitioning from a shared invite link system to personalized email invites seamlessly. I've integrated transactional email systems like SendGrid for similar backend projects. The tricky part is ensuring secure token generation and validation for each invite. I haven't done this exact flow, but I've implemented user-specific actions based on unique tokens in previous projects. My approach involves setting up Resend, structuring the database schema, and implementing secure Edge Functions for invite creation and acceptance. Let's chat! -Dorofii
$920 USD in 7 days
0.0
0.0

Hello, I have extensive experience building secure, scalable invite and authentication flows with Supabase, including integrating transactional email providers like Resend. I am confident in delivering a robust, well-structured solution within your timeline, ensuring smooth migration from your current system. I prioritize clear communication and quality, aligning with your values of care and transparency. I look forward to the opportunity to contribute to your mission-driven project.
$850 USD in 8 days
0.0
0.0

Hi, the biggest headache in these flows is usually handling the state where a user is already logged into a different account than the one invited, i'll build those four auth scenarios as a robust state machine so your users don't get stuck in a loop, i've set up similar resend and supabase systems for two other saas platforms where atomic transactions were key to preventing ghost invites, send me the repo and let's go
$850 USD in 8 days
0.0
0.0

Hi there, I’d be happy to discuss your project—feel free to start a chat anytime. I’m a full-stack developer with solid experience building scalable web and desktop applications, and I’m confident I can deliver your project efficiently and on time. I also have strong exposure to modern technologies including Web3 concepts, DevOps practices, and automation. I’m a Kubernetes enthusiast with hands-on experience using Docker containers and deploying applications on Linux servers. My expertise includes: MERN / MEAN Stack (development + team management) .NET Core APIs with Angular, including D3.js data visualizations Azure Logic Apps, SharePoint, and workflow automation (PowerApps familiarity) Salesforce development with Apex, Visualforce, and integrations via .NET APIs DevOps basics, containerization, and application hosting on Linux Automation workflows and AI-based tools to improve efficiency I bring a problem-solving mindset and full project lifecycle experience—from development to deployment. Looking forward to hearing from you. Thank you!
$1,300 USD in 4 days
0.0
0.0

San José, Costa Rica
Payment method verified
Member since Dec 13, 2023
$30-250 USD
$10-30 USD
$30-250 USD
$750-1500 USD
$30-250 USD
$1500-3000 AUD
$25-50 AUD / hour
$2-8 USD / hour
$250-750 USD
₹37500-75000 INR
₹12500-37500 INR
$2-8 USD / hour
€300-350 EUR
min $50 USD / hour
$750-1500 USD
$10-20 USD
$30-250 USD
$10-30 USD
₹750-1250 INR / hour
$10-30 USD
₹12500-37500 INR
$250-750 USD
$3000-3001 USD
₹600-1000 INR
₹600-50000 INR