This is the official repository for Convos backend service.
See our contribution guide to learn more about contributing to this project.
See Bun's documentation for installation instructions.
See Docker's documentation for installation instructions.
Note
If you're on a Mac, you can also use OrbStack to run Docker containers.
Copy .env.example
to .env
.
For secure communication with the XMTP notification server, generate a secret:
bun generate:notification-secret
Add the generated value to your .env
file.
# Run local Docker container for the Convos database
./dev/convos-db/up
# Run local Docker container for an XMTP node
./dev/xmtp/up
# Install dependencies
bun install
# Apply migrations to the local database
bun migrate:dev
# Run the app in watch mode
bun dev
# Run local Docker container for the Convos database
./dev/convos-db/up
# Run local Docker container for an XMTP node
./dev/xmtp/up
# Build the Docker image
docker build -t "convos-api-service" .
# Run the Docker container
docker run --env-file .env -d -p 4000:4000 convos-api-service
Adjust the -p 4000:4000
flag to match the port in the .env
file. The default port is 4000
.
bun clean
: Removesnode_modules
folder and*.db3*
filesbun dev
: Run the app in watch modebun format:check
: Run prettier format checkbun format
: Run prettier format and write changesbun generate:key
: Generate a key for XMTP database encryptionbun generate:notification-secret
: Generate a secure token for XMTP notification authenticationbun install
: Installs all dependenciesbun lint
: Lint with ESLintbun migrate:dev
: Create a Prisma migration from changes in the Prisma schema, apply to the database, and generate Prisma client codebun migrate:deploy
: Apply pending migrations to the databasebun run build
: Builds the appbun start
: Run the appbun test
: Run testsbun typecheck
: Typecheck withtsc