Skip to content

ephemeraHQ/convos-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Convos Backend

This is the official repository for Convos backend service.

Contributing

See our contribution guide to learn more about contributing to this project.

🔧 Developing

Prerequisites

Bun

See Bun's documentation for installation instructions.

Docker

See Docker's documentation for installation instructions.

Note

If you're on a Mac, you can also use OrbStack to run Docker containers.

Get started

Setup environment

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 the app locally

# 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 the app locally with Docker

# 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.

Useful commands

  • bun clean: Removes node_modules folder and *.db3* files
  • bun dev: Run the app in watch mode
  • bun format:check: Run prettier format check
  • bun format: Run prettier format and write changes
  • bun generate:key: Generate a key for XMTP database encryption
  • bun generate:notification-secret: Generate a secure token for XMTP notification authentication
  • bun install: Installs all dependencies
  • bun lint: Lint with ESLint
  • bun migrate:dev: Create a Prisma migration from changes in the Prisma schema, apply to the database, and generate Prisma client code
  • bun migrate:deploy: Apply pending migrations to the database
  • bun run build: Builds the app
  • bun start: Run the app
  • bun test: Run tests
  • bun typecheck: Typecheck with tsc

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 7