Beam is a simple tool that allows members to write posts to share across your organization. Think of it like a lightweight internal blog. Features include a simple Markdown-based editor with preview, image drag and drop, comments and likes, search, a clean responsive layout with dark mode support, and an admin role for hiding posts.
npm install- Create a PlanetScale database
- Create a connection string to connect to your database. Choose Prisma for the format
- Set up the environment variables:
cp .env.example .env- Open
.envand set theDATABASE_URLvariable with the connection string from PlanetScale - Create the database schema:
npx prisma db pushBy default Beam uses GitHub for authentication, but you can use Okta if you prefer.
- Create an OAuth app on GitHub (Note that a separate app must be created for production use)
- Go to Developer Settings
- Click on New OAuth App
- For Callback URL, enter
http://localhost:3000/api/auth/callback/github - Once the app is created, click Generate a new client secret
- Set environment variables in
.env- Set
AUTH_PROVIDERtogithub - Set
GITHUB_IDto the Client ID value - Set
GITHUB_SECRETto the secret value generated above - Set
GITHUB_ALLOWED_ORGto the GitHub organization name your Beam members must belong to - Set
NEXTAUTH_SECRETto a random secret. This is a good resource.
- Set
To enable image uploads, set the environment variable NEXT_PUBLIC_ENABLE_IMAGE_UPLOAD to true.
Beam uses Cloudinary for storing uploaded images. You can sign up for a free account.
- On your Cloudinary dashboard, look for these values under your account settings: Cloud Name, API Key, API Secret.
- Update
.envwith the following variables:CLOUDINARY_CLOUD_NAME: Cloud NameCLOUDINARY_API_KEY: API KeyCLOUDINARY_API_SECRET: API Secret
If you'd like to have new Beam posts published to a Slack channel, follow these instructions.
npm run devOpen http://localhost:3000 in your browser.
One-click deploy:
