bespoke-surf / bespoke

The open source Mailchimp alternative.

Home Page:https://bespoke.surf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

⚠️ Bespoke has seized maintenance. This repository has been archived.



Bespoke Logo

Open Source Mailchimp Alternative.

Combining best parts of Mailchimp, Kalviyo's automation, Substack's newsletter and Typeform for surveys.


Administration panel

Bespoke's mission is to gather information about the customer and do personalized targetting.

We gather customer data through various means, including API's, behavioral intent, surveys and integrations with platforms for data ingestion. Recommendations are delivered via Automations and Campaigns.

Feature roadmap

  • Automations
  • Newsletter
  • Sign-up Forms
  • Design Emails
  • Lists
  • Segmentation
  • Campaigns
  • Analytics Dashboard
  • Transactional Emails & Webhooks
  • Surveys
  • Behavioral Intent API

Documentation & Links

OpenAPI and Postman

Experience seamless integration with Bespoke's OpenAPI and Postman. Explore our latest OpenAPI specification.

For quick and convenient interaction with our APIs, import the OpenAPI spec into your preferred API tool, such as Postman. This will enable you to immediately begin working with our new APIs.

To further simplify your workflow, we have created a dedicated Postman Workspace. By visiting our Postman Workspace, you will have access to our latest collection of requests, along with the comprehensive API definitions.

Developing Bespoke

  1. Clone this repository

  2. Initial setup

    ~/bespoke$: yarn setup
  3. Run both web and server using turbo repo in parallel mode:

    ~/bespoke$: yarn dev

    ℹ️ we recommed not running it parallel.

    ~/bespoke/apps/web$: yarn dev
    
    ~/bespoke/packages/server$: yarn dev
    

    Do not forget to fill the env variables in web and server folder

This starts your app in development mode.

Deploying Bespoke

Bespoke comes with a GitHub Action that handles automatically deploying your app to production environments.

Prior to your first deployment, you'll need to do a few things:

  1. Install, sign up and login to Fly

  2. Create two apps on Fly, one for web and one for server:

    fly apps create [your-app-name]-web
    fly apps create [your-app-name]-server
  3. Add a FLY_API_TOKEN to your GitHub repo. To do this, go to your user settings on Fly and create a new token, then add it to your repo secrets with the name FLY_API_TOKEN.

  4. Dealing with Bespoke Web

    1. Add the following secrets to your fly app secrets, to do this you can run the following commands:

      fly secrets set FRONTEND_HOST= BACKEND_HOST= FLY_BACKEND_HOST= SENTRY_DSN= POSTHOG_TOKEN= POSTHOG_ORGANISATION= POSTHOG_PROJECT_ID= CLOUDINARY_UPLOAD_IMAGE_URL= CLOUDINARY_PRESET= UNLAYER_PROJECT_ID= OPEN_SOURCE=true --app [your-app-name]-web
    2. Add AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_S3_BUCKET_REGION, AWS_S3_BUCKET, CLOUDFRONT, SENTRY_AUTH_TOKEN, SENTRY_ORG, SENTRY_PROJECT to your repo secrets in Gihub. This is used during docker container build.

    3. For the initial fly deploy you can use:

        ~/bespoke$: yarn deploy:web
  5. Dealing with Bespoke Server

    1. Add to your fly app secrets, to do this you can run the following commands:

      fly secrets set HOST= FRONTEND_HOST= FRONTEND_HOST_PROTOCOL= SESSION_SECRET=$(openssl rand -hex 32) AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= SES_REGION= SES_SENDING_RATE= REDIS_PORT= REDIS_HOST= REDIS_PASSWORD= UNLAYER_SECRET= OPEN_SOURCE=true EMAIL_DOMAIN= SUPPORT_EMAIL= SENTRY_DSN= POSTHOG_KEY= --app [your-app-name]-server
    2. Create a Fly Postgres Cluster

    3. Attach Postgres Cluster to Bespoke Server

    4. We recommend not using Redis by Upstash in Fly.

    5. Before deploying please read AWS SES & SNS setup

    6. For the initial fly deploy you can use:

       ~/bespoke$: yarn deploy:server

Setting up Email Provider

To receive Hard bounce, Open, Delivery events etc, let's setup AWS SES with AWS SNS

AWS SNS Setup

We need to create a new subscription and confirm the https endpoint.

  1. Create a new Subscription

  2. Add Topic name and select HTTPS protocol

  3. Add your endpoint i.e [server-hostname]/user/sns-webhook

  4. console.log() the data in your sns-webhook under user controller

  5. Before deploying add and confirm a localhost endpoint

  6. Deploy the server and confirm your production endpoint

AWS SES Setup

We need to create a new configuration set and add the SNS subscription as the destination for events.

  1. Create a new configuration set with default values

  2. Add a new Event Destination

  3. Select all event types except Redering failures & also select open and click tracking

  4. Under destination option, select Amazon SNS and select the SNS topic you created

SES Sending Rate

For the SES_SENDING_RATE env variable, you can get the value from the SES dashboard.

OPEN_SOURCE=true

To get unlimited contacts and to send emails with no restriction and to create unlimited signup-forms, please set OPEN_SOURCE=true

Unlayer Project Id & Unlayer Secret

Let's setup Unlayer for Signup-Forms and Email templates to work

  1. Login or Signup to Unlayer embed

  2. Create a project and get the project id from the url

  3. Use project id for UNLAYER_PROJECT_ID env variabe for bespoke web

  4. Go to the Security tab and enforce identity verification.

  5. Copy secret and add to UNLAYER_SECRET env varaible for bespoke server

Now that everything is set up you can commit and push your changes to your repo. Every commit to your main branch will trigger a deployment to your production environment.

Contributing

  1. Create a new branch
    • git checkout -b my-new-branch
  2. Commit your changes
    • git commit -a -m 'Description of the changes'
      • There are many ways of doing this and this is just a suggestion
  3. Push your branch to GitHub
    • git push origin my-new-branch
  4. Go to the repository page in GitHub and click on "Compare & pull request"

Bespoke engineers are checking this regularly.

License

Bespoke is AGPL-3.0 license

About

The open source Mailchimp alternative.

https://bespoke.surf

License:GNU Affero General Public License v3.0


Languages

Language:TypeScript 99.3%Language:CSS 0.6%Language:JavaScript 0.2%