Introduction
useSend’s codebase is fully open-source on github Here is the codebase structureapps
directory contains the code for:
-
web
: Code for our dashboard and email infra -
marketing
: The code for the landing page of useSend -
docs
: The documentation that you are currently reading.
packages
directory contains the code for:
-
eslint-config
package contains shared ESLint configuration settings -
sdk
package contains TypeScript SDK for useSend REST API -
tailwind-config
This package contains a shared Tailwind CSS configuration. -
typescript-config
This package contains a shared typescript configuration -
ui
This package is a collection of reusable UI components like buttons, badges, etc
Running useSend locally
To run useSend locally, you will need to setup the following:- AWS Free tier account will work.
- Cloudflare Free tier account will work.
- Docker Recommended but not mandatory
Fork and Clone the repo
1
Fork the repo
Click on the fork button on GitHub to fork the repo
2
Clone the repo
Once the repo is forked you can clone it on your local machine using:
Install Dependencies
1
2
Setup environment variables:
1
Copy the env.example file into .env
2
Nextauth secret
Use the following command to generate a key and add it under
NEXTAUTH_SECRET
3
Setup GitHub Oauth (optional)
You don’t need this setup if you have
FROM_EMAIL
set in your environment
variables. for development email link will logged in the console.GITHUB_ID
and CLIENT SECRET under GITHUB_SECRET
4
Setup AWS credentials (Optional)
You don’t need this setup if you are using the local-sen-sns image. But email
will not be sent out.
Running useSend locally
We are using a local Postgresql server and a local Redis server. But if you don’t have docker you can also manually set these up.Option 1: Using Docker Recommended
1
Start the dashboard
2
Dashboard and Landing page will start running
Dashboard will be started onLanding page will be started on
3
Once you login with GitHub you will be prompted with SES settings. You will need to run cloudflare tunnel to add the callback URL
Run the following command to get the URL. Here is the more detailed guide by cloudflareYou can paste the URL provided by cloudflare in the Callback URL section
Option 2: Using your own database or hosted database
1
Set up your PostgreSQL and Redis database in Environment Variables
2
Migrate the database
3
Start the development server
4
Once you login with GitHub you will be prompted with SES settings. You will need to run cloudflare tunnel to add the callback URL
Run the following command to get the URL. Here is the more detailed guide by cloudflareYou can paste the URL provided by cloudflare in the Callback URL section