https://github.com/supabase-community/partner-gallery-example
Supabase Partner Gallery Example
https://github.com/supabase-community/partner-gallery-example
edge-functions full-text-search nextjs-starter postgres supabase
Last synced: 4 months ago
JSON representation
Supabase Partner Gallery Example
- Host: GitHub
- URL: https://github.com/supabase-community/partner-gallery-example
- Owner: supabase-community
- License: mit
- Created: 2022-04-04T16:28:05.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-24T03:47:05.000Z (over 1 year ago)
- Last Synced: 2024-12-08T00:39:25.405Z (5 months ago)
- Topics: edge-functions, full-text-search, nextjs-starter, postgres, supabase
- Language: TypeScript
- Homepage: https://supabase.com/partners
- Size: 567 KB
- Stars: 113
- Watchers: 11
- Forks: 32
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Supabase Partner Gallery Example
An example Next.js website that shows Postgres Full Text Search, `next-image` with Supabase Storage, and sending emails based on an insert trigger with Supabase Edge Functions.
[](https://supabase.com/partners)
[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fsupabase-community%2Fpartner-gallery-example&project-name=supabase-partner-gallery-example&repository-name=supabase-partner-gallery-example&integration-ids=oac_VqOgBHqhEoFTPzGkPd7L0iH6&external-id=https%3A%2F%2Fgithub.com%2Fsupabase-community%2Fpartner-gallery-example%2Ftree%2Fmain&root-directory=app)
# Usage
1. Click the "Deploy" button above and run through the setup steps. This will automatically set your Supabase env vars and set up the Database schema located in the [migrations folder](./supabase/migrations/20230712074829_init.sql).
2. Deploy Supabase Edge Function for contact form notifications:```
supabase link --project-ref your-project-ref
supabase secrets set SMTP_HOSTNAME="your.hostname.com" SMTP_PORT="2587" SMTP_USERNAME="your_username" SMTP_PASSWORD="your_password" SMTP_FROM="[email protected]" SMTP_TO="[email protected]" FUNCTION_SECRET="your-random-secret"
supabase functions deploy contact-notification
```Note: `SMTP_PORT` must be a port other than `25`, `465`, and `587` as Deno Deploy does not support outgoing connections to ports. AWS SES (port 2587) is recommended.
3. Setup a Supabase Function Hook to trigger the function when a new row is inserted into `partner_contacts`


4. Within Vercel project settings, ensure Framework Preset is set to `Next.js` and Root Directory is set to `app`.
5. Insert partners into the `partners` table.
6. Celebrate together 🎉## Resources
- [TGIF: Postgres Full Text Search & sending emails from Edge Functions](https://youtu.be/ZhlXnWRts04)
- [Edge Functions](https://vercel.com/docs/concepts/functions/edge-functions)