A web application and Telegram bot for parsing and managing event details from various platforms.
- Python 3.8+
- Node.js 16+
- npm
- Clone the repository:
git clone https://github.com/yourusername/cohere-events.git
cd cohere-events- Set up the backend:
# Navigate to backend directory
cd backend
# Create virtual environment
python -m venv venv
# Activate virtual environment
# On macOS/Linux:
source venv/bin/activate
# On Windows:
# venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Copy environment file
cp .env.sample .env- Set up the frontend:
# Navigate to frontend directory
cd frontend
# Install dependencies
npm install- Configure your
.envfile with required API keys
- Build the frontend with watch mode:
cd frontend
npm run buildThe frontend will automatically rebuild when you make changes.
- Run the Flask development server:
cd backend
python app.pyThe application will be available at http://localhost:5000
Run the Flask application using Gunicorn:
cd backend
source venv/bin/activate # On Windows: venv\Scripts\activate
gunicorn wsgi:app --bind 127.0.0.1:5000In a separate terminal:
cd backend
source venv/bin/activate # On Windows: venv\Scripts\activate
python bot.pyBefore deploying:
- Build the frontend locally:
cd frontend && npm install && npm run build - Create a static directory in backend and copy the built files:
mkdir -p backend/static cp -r frontend/dist/* backend/static/ - Commit and push your changes
- Create a new service pointing to your repository
- Set the root directory to
/backend - Set the build command:
pip install -r requirements.txt - Set the start command:
gunicorn wsgi:app --bind 0.0.0.0:8080 - Add environment variables:
ANTHROPIC_API_KEY
- Create another service pointing to the same repository
- Set the root directory to
/backend - Set the start command:
python bot.py - Add environment variables:
TELEGRAM_BOT_TOKENAPI_URL: Set tohttps://${flask api + web app.RAILWAY_PUBLIC_DOMAIN}
- Add service dependency:
- Go to Settings > Dependencies
- Add the Flask service as a dependency
Railway will ensure the Flask service is running before starting the bot service.
- Frontend: React + Vite
- Backend: Flask
- The frontend builds directly into the backend's static directory
- Auto-rebuilds on frontend changes for seamless development
- Optional Telegram bot integration
- Parse event details from Partiful links
- Create Google Calendar events with parsed details
- Timezone-aware event handling
- Clean, modern UI
- Telegram bot integration for easy event parsing
Required variables in .env:
ANTHROPIC_API_KEY: Your Anthropic API keyTELEGRAM_BOT_TOKEN: Your Telegram bot token (only if using bot)
-
Frontend:
- React
- Material-UI
- Axios
- Day.js
-
Backend:
- Flask
- BeautifulSoup4
- AISuite API
- Google Calendar API
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request