A full-stack web application that helps users manage todo items and generate AI-powered summaries that are sent to Slack.
- ✅ Create, edit, and delete todo items
- ✅ Mark todos as complete/incomplete
- ✅ AI-powered todo summarization using OpenAI
- ✅ Automatic Slack notifications with summaries
- ✅ Real-time updates and notifications
- ✅ Responsive design for all devices
- React - User interface library
- Vite - Build tool and development server
- Tailwind CSS - Utility-first CSS framework
- Axios - HTTP client for API requests
- React Hot Toast - Toast notifications
- Node.js - JavaScript runtime
- Express.js - Web framework
- Supabase - Database and backend services
- OpenAI API - AI text generation
- Slack Webhooks - Slack integration
todo-summary-assistant/
├── todo-summary-frontend/
│ ├── src/
│ │ ├── components/
│ │ │ ├── TodoForm.jsx
│ │ │ ├── TodoList.jsx
│ │ │ ├── TodoItem.jsx
│ │ │ ├── SummaryButton.jsx
│ │ │ └── Header.jsx
│ │ ├── services/
│ │ │ └── api.js
│ │ ├── App.jsx
│ │ └── main.jsx
│ ├── .env
│ └── package.json
└── todo-summary-backend/
├── src/
│ ├── controllers/
│ │ ├── todoController.js
│ │ └── summaryController.js
│ ├── services/
│ │ ├── todoService.js
│ │ ├── openaiService.js
│ │ └── slackService.js
│ ├── db/
│ │ └── supabase.js
│ └── routes/
│ └── api.js
├── .env
├── package.json
└── server.js
- Node.js (v16 or higher)
- npm or yarn
- Supabase account
- OpenAI API key
- Slack workspace and webhook URL
Create .env files in both frontend and backend directories:
PORT=5000
SUPABASE_URL=your_supabase_project_url
SUPABASE_KEY=your_supabase_anon_key
OPENAI_API_KEY=your_openai_api_key
SLACK_WEBHOOK_URL=your_slack_webhook_urlVITE_API_URL=http://localhost:5000/api-
Clone the repository
git clone https://github.com/yourusername/todo-summary-assistant.git cd todo-summary-assistant -
Setup Backend
cd todo-summary-backend npm install -
Setup Frontend
cd ../todo-summary-frontend npm install -
Database Setup
- Create a new project in Supabase
- Run the following SQL to create the todos table:
CREATE TABLE todos ( id UUID DEFAULT gen_random_uuid() PRIMARY KEY, created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(), title TEXT NOT NULL, description TEXT, completed BOOLEAN DEFAULT FALSE );
-
Start the backend server
cd todo-summary-backend npm run dev -
Start the frontend development server
cd todo-summary-frontend npm run dev -
Access the application
- Frontend: http://localhost:5173
- Backend API: http://localhost:3001
GET /api/todos- Fetch all todosPOST /api/todos- Create a new todoPUT /api/todos/:id- Update a todoDELETE /api/todos/:id- Delete a todo
POST /api/summarize- Generate AI summary and send to Slack
- Create a new Supabase project at https://supabase.com
- Go to Settings → API to get your project URL and anon key
- Navigate to SQL Editor and run the database schema (provided above)
- Add the URL and key to your backend
.envfile
- Create an account at https://platform.openai.com/
- Navigate to API Keys and create a new secret key
- Add the key to your backend
.envfile asOPENAI_API_KEY
- Go to https://api.slack.com/apps and create a new app
- Under "Features", select "Incoming Webhooks"
- Activate incoming webhooks and create a new webhook for your desired channel
- Copy the webhook URL and add it to your backend
.envfile asSLACK_WEBHOOK_URL
-
Using Render:
- Connect your GitHub repository
- Set environment variables in Render dashboard
- Deploy the backend service
-
Using Heroku:
heroku create your-app-name-backend heroku config:set SUPABASE_URL=your_url heroku config:set SUPABASE_KEY=your_key heroku config:set OPENAI_API_KEY=your_key heroku config:set SLACK_WEBHOOK_URL=your_webhook_url git push heroku main
- Rapid development and prototyping
- Large ecosystem of packages
- JavaScript consistency across frontend and backend
- Good performance for I/O intensive operations
- Real-time capabilities out of the box
- Built-in authentication (if needed later)
- PostgreSQL with modern features
- Easy to set up and deploy
- High-quality text generation
- Easy-to-use API
- Good free tier for development
- Reliable service with good documentation
- Separation of Concerns: Each component has a single responsibility
- Service Layer: API calls centralized in service files
- Error Handling: Consistent error handling across all components
- State Management: Local state with React hooks for simplicity
- Use ES6+ features consistently
- Follow React best practices and hooks patterns
- Implement proper error handling
- Add meaningful comments for complex logic
- Manual testing for all user flows
- API endpoint testing with tools like Postman
- Integration testing for external services
- Environment variables for sensitive data
- Input validation on both frontend and backend
- CORS configuration for API endpoints
- Rate limiting for API endpoints (recommended for production)
-
CORS Errors
- Ensure backend CORS is configured correctly
- Check that frontend is making requests to correct backend URL
-
Supabase Connection Issues
- Verify URL and key are correct
- Check if database table exists with correct schema
-
OpenAI API Issues
- Ensure API key is valid and has credits
- Check rate limits and quota
-
Slack Integration Issues
- Verify webhook URL is correct
- Check if webhook is active in Slack app settings
- Ensure all environment variables are properly set
- Check that
.envfiles are in correct directories - Restart servers after changing environment variables
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes and test thoroughly
- Commit your changes:
git commit -m 'Add feature-name' - Push to the branch:
git push origin feature-name - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Todo Management - Add, edit, delete, and mark todos as complete
- AI Summarization - Generate intelligent summaries of your todo list
- Slack Integration - Automatically send summaries to your Slack channel
- Real-time Updates - Immediate feedback and notifications
🚀 Maintained by Sanjay A R
💡 Like this project? Leave a ⭐ and connect with me!