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-configpackage contains shared ESLint configuration settings -
sdkpackage contains TypeScript SDK for useSend REST API -
tailwind-configThis package contains a shared Tailwind CSS configuration. -
typescript-configThis package contains a shared typescript configuration -
uiThis 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
Fork the repo
Clone the repo
Install Dependencies
Setup environment variables:
Copy the env.example file into .env
Nextauth secret
NEXTAUTH_SECRETCreate symlink for Next.js
.env file:Setup GitHub Oauth (optional)
FROM_EMAIL set in your environment
variables. for development email link will logged in the console.GITHUB_IDand CLIENT SECRET under GITHUB_SECRETSetup AWS credentials (Optional)
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
Start the dashboard
Dashboard and Landing page will start running
Once you login with GitHub you will be prompted with SES settings. You will need to run cloudflare tunnel to add the callback URL
Option 2: Using your own database or hosted database
Set up your PostgreSQL and Redis database in Environment Variables
Migrate the database
Start the development server
Once you login with GitHub you will be prompted with SES settings. You will need to run cloudflare tunnel to add the callback URL