Skip to content

A starter template for building Slack apps using Bolt ⚡️ with Prisma in TypeScript

Notifications You must be signed in to change notification settings

utsavdotpro/starter-bolt-prisma-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bolt ⚡️ with Prisma in TypeScript

A starter template for building Slack apps using Bolt with Prisma in TypeScript

Tech Stack


Using the template locally

Use degit to download the repository locally.

❓ What is degit?

degit downloads a copy of git repository with downloading its entire git history.

Install degit globally.

npm install -g degit

Download the latest version

degit utsavdotpro/starter-bolt-prisma-ts

Getting Started

Bolt app

Run locally

yarn dev

Build app

yarn build

Run build version

yarn start

Real-time Dev Testing

After you've started the Bolt app using any of the commands above, run the following to expose your local server to the world.

yarn serve

You will receive a url, for example https://random-words.loca.lt, that you can use directly on Slack. Made possible using localtunnel

Update the port in package.json for the serve script if you want to use anything other than 3000 for the Bolt app

Express app

Bolt doesn't require a separate Express app but it's good to have to quickly test your APIs locally

Run locally

yarn dev:express

Prisma

yarn migrate:dev # migrate to dev
yarn migrate:reset # reset DB
yarn migrate:deploy # deploy migrations
yarn prisma:studio # start DB interface
yarn prisma:generate # generate prisma modals
yarn prisma:generate:watch # generate prisma modals on change

Project Structure

project
|-- prisma                    ℹ️ schema and migrations
|-- src
|   |-- listeners             ℹ️ listeners for different event types
|   |   |-- actions
|   |   |-- events
|   |   |-- shortcuts
|   |   |-- views
|   |-- models
|   |-- ui
|   |   |-- modals            ℹ️ keep your modal UIs
|   |   |                     ℹ️ keep your UI functions
|   |-- utils
|   |   |-- constants         ℹ️ keep your constants
|   |   |                     ℹ️ keep your util functions

Deployment

Bolt is basically a NodeJS app and so can be easily hosted on platforms like Heroku.

Deploy for free on Render

Quick Tips

  • Add the following script in your package.json file to automatically generate your Prisma models on every install
    "scripts": {
      "postinstall": "npm run prisma:generate"
    }

About

A starter template for building Slack apps using Bolt ⚡️ with Prisma in TypeScript

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published