This is the final project of CS50x. It is a web application that helps you add events on your Google Calendar, and automatically tells you the departure time. It simplifies the process of adding a new event and checking the departure time.
Click below to see video intro:
- Create a new account by the "Sign up" button on the nav-bar, or "Get Started" button in hero section. Then click "Sign in"" to login your account.
Here can setup some default value for you to edit a new event
-
After login, go to SETTING page to edit your *Address Label and Preferences.
(Note: You can use the SCHEDULE function as long as you setup your "Time Zone" and "Commute Mode". )
-
Click the button to edit your Home address and Work address. It will help you to search for the address.
-
Click the "Add" and "Delete" button to and other address you frequently-used.
-
Click the Edit button to setup your Preference Commute Mode and Time Zone.
(Note: The Commute Mode will be the default one for adding a new event, you can still select other options if needed.)
This page is for adding new events, getting departure time and commute time. You can also check your calendar and event here.
- Click the "New Event" button
- Edit the event info such as Title, Date, Time, Destination, and Description.
- Select the where you will departure. If you will leave from home, just not need to change it.
-
Select the Commute Mode you plan to go to the event. Your preference mode (you set in SETTING page) will be the first choice as well.
-
Click the "Save" button after you complete.
After schedule you can check your event in calendar. You can click "month" "week" "day" to check the event.
The calendar will show the event, the commute time you need, and when to departure.
You can also find the same event,commute time and departure time on your goolge calendar.
Below are the resources I used to build this project.
- Flask
- SQLite
- Google Cloud Platform
- Jinja2
- Bootstrap
- BootstrapMade
- DatePicker
- TimePicker
- FullCalendar
By following these instructions you can run this application on your local machine.
Use pip install -r requirements.txt
to install, or run the folloing commands:
pip install flask
pip install flask_session
pip install googlemaps
pip install google-api-python-client
pip install google-auth-oauthlib
pip install python-dotenv
Activate your GCP and get the api-key for uses. You'll need to activate the following API in your GCP:
- Places api
- Distance matrix api
- Calendar api*
(*note:In order to use Calendar API, you also need to setup "OAuth2" to get the "client_secret.json" file, then download it and add into this project)
After that you can get your API_KEY from GCP.
Create a .env
file, open it and set
`API_KEY={YOUR_API_KEY}‵. Then you can run this project on your computer!