A simple web app built with Next.js 13 that allows users to send messages directly to a Slack channel.
- Send messages to a specified Slack channel.
- Simple user interface with a text input and a send button.
- Backend API route to handle message sending via Slack's API.
- Frontend: Next.js 13, React
- Backend: Node.js, Next.js API routes
- HTTP Client: Axios
- Deployment: Vercel
- Node.js installed on your machine.
- A Slack workspace and a Slack app with appropriate permissions (
chat:write
scope). - A Slack OAuth token for authenticating API requests.
-
Clone the repository:
git clone https://github.com/shrutirthr29/Slack_messenger.git cd Slack_messenger
-
Install dependencies:
npm install
-
Set up environment variables:
Create a
.env
file in the root directory and add your Slack OAuth token:SLACK_TOKEN=your-slack-oauth-token
- Replace
your-slack-oauth-token
with your actual Slack OAuth token.
- Replace
-
Run the development server:
npm run dev
Open http://localhost:3000 in your browser to see the app in action.
- Type a message in the input field.
- Click the "Send Message" button.
- The message will be sent to the specified Slack channel.
This project can be easily deployed to Vercel.
-
Deploy to Vercel:
- Log in to your Vercel account.
- Link the project to your GitHub repository.
- Set the environment variables in the Vercel dashboard (
SLACK_TOKEN
). - Deploy!