This project is an advanced calendar management system that helps users manage their schedules smartly and efficiently by performing various calendar operations. The system is built using FastHTML and integrates with Google for authentication.
- Retrieve calendar information
- Add new events to the calendar
- Modify existing events
- Remove events from the calendar
- Perform bulk operations on multiple events
- Intelligent handling of date and time information
- SMARTLY have it do it all for you with "smart" requests.
- Python 3.8+
- Virtual environment (optional but recommended)
-
Clone the repository:
git clone https://github.com/abinashkarki/SmartCalendar.git cd smart-calendar -
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Install additional dependencies:
pip install langtrace-python-sdk pip install python-fasthtml pip install llama-index pip install llama-index-llms-groq
-
Set up environment variables:
Create a
.envfile in the root directory and add the following variables:GOOGLE_CLIENT_ID=your_google_client_id GOOGLE_CLIENT_SECRET=your_google_client_secret GOOGLE_REDIRECT_URI=your_google_redirect_uri GITHUB_CLIENT_ID=your_github_client_id GITHUB_CLIENT_SECRET=your_github_client_secret GITHUB_REDIRECT_URI=your_github_redirect_uri OPENAI_API_KEY=your_openai_api_key GROQ_API_KEY=your_groq_api_key
-
Initialize the database:
The application uses an SQLite database named
calendar.db. It will be created automatically when you run the application for the first time.
-
Start the server:
python main.py
-
Access the application:
Open your web browser and navigate to
http://localhost:5000.
-
Login with Google:
- Navigate to the login page and click on "Login with Google".
- Follow the prompts to authenticate with your Google account.
-
Login with GitHub:
- Uncomment the GitHub client initialization code in
main.pyif you want to use GitHub for authentication. - Navigate to the login page and click on "Login with GitHub".
- Follow the prompts to authenticate with your GitHub account.
- Uncomment the GitHub client initialization code in
-
View Events:
- The calendar grid displays events for the current week.
- Hover over an event to see options to edit or delete the event.
-
Add Event:
- Click on the "+" button in any time slot to add a new event.
- Fill in the event details and click "Save".
-
Edit Event:
- Click on the "Edit" button on an event to modify its details.
- Update the event information and click "Save".
-
Delete Event:
- Click on the "Delete" button on an event to remove it from the calendar.
- Confirm the deletion.
-
Smart Requests:
- Click on the "Smart Requests" button to open the smart request form.
- Enter your request in natural language and click "Send".
- The system will interpret your request and perform the necessary operations.