Skip to content

Commit

Permalink
Add js docs, and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
TiannaLopes committed Oct 9, 2024
1 parent 79a5169 commit fc94721
Show file tree
Hide file tree
Showing 34 changed files with 12,507 additions and 161 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Deploy JSDoc

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Install dependencies
run: npm install

- name: Generate JSDoc
run: npm run docs

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
98 changes: 88 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,102 @@
# outlook-scheduler-poc

## Project setup
```
# Outlook Scheduler POC

This project is a proof of concept for scheduling appointments in an Outlook calendar using a Vue.js frontend and a Node.js/Express backend. The app integrates with Microsoft Azure Active Directory (Azure AD) for authentication and uses the Microsoft Graph API to create calendar events.

## Project Setup

To get started, follow these steps:

### Install Dependencies
```bash
npm install
```

### Compiles and hot-reloads for development
```
### Compiles and Hot-Reloads for Development
```bash
npm run serve
```

### Compiles and minifies for production
```
### Compiles and Minifies for Production
```bash
npm run build
```

### Lints and fixes files
```
### Lints and Fixes Files
```bash
npm run lint
```

### Customize configuration
### JSDoc Documentation
The project uses JSDoc for code documentation. To view the generated docs locally, open the `docs/index.html` file in your browser.

To regenerate the documentation:
```bash
npm run docs
```

The documentation is also hosted online at [Project Documentation](https://<your-username>.github.io/<your-repo-name>/).

### Customize Configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

## Features

### Azure Active Directory Integration
The app integrates with Microsoft Azure Active Directory for authentication:
- Users are redirected to the Microsoft login page to authenticate using their Microsoft account (supports both organizational and personal accounts).
- The app uses OAuth 2.0 with the PKCE (Proof Key for Code Exchange) flow for secure authentication.
- Access tokens are retrieved and stored in the browser for making authenticated requests to the Microsoft Graph API.

### Logging in to Microsoft
- Clicking the "Login with Microsoft" button redirects the user to the authentication endpoint (`/auth/login`).
- After successful login, the app stores the access token and user's name in the browser's local storage.
- The user's authenticated status is maintained across sessions as long as the token is valid.

### Creating Calendar Appointments
- Authenticated users can create appointments in their Outlook calendar.
- The user can fill out a form with the appointment details, including the title, start time, end time, and description.
- When the form is submitted, a request is sent to the backend, which uses the Microsoft Graph API to create the event in the user's calendar.

### Backend Connection
The backend is a Node.js/Express server that handles:
1. **Authentication Flow:** It manages the OAuth 2.0 authorization process, including generating a PKCE code verifier and exchanging authorization codes for access tokens.
2. **Creating Calendar Events:** It accepts requests from the frontend to create calendar events using the Microsoft Graph API.

The backend uses the following endpoints:
- `GET /auth/login`: Redirects users to the Microsoft login page.
- `GET /auth/callback`: Handles the redirect from Microsoft after login and exchanges the authorization code for an access token.
- `POST /appointments`: Creates a new calendar event using the Microsoft Graph API.

## Documentation

For more details on the project's structure and code documentation, please see the [Project Documentation](https://<your-username>.github.io/<your-repo-name>/).

## Next Steps and Future Improvements

### Possible Features to Add
1. **Improved Error Handling and User Feedback:**
- Display more informative messages to the user when authentication fails or calendar event creation encounters an issue.

2. **Token Refresh Mechanism:**
- Implement a token refresh flow to automatically renew the access token when it expires.

3. **Recurring Events Support:**
- Add the ability to schedule recurring events (e.g., daily, weekly).

4. **Multiple Calendar Support:**
- Allow users to choose which calendar to add the event to (e.g., work calendar, personal calendar).

5. **Notification System:**
- Send email or in-app notifications when an appointment is approaching.

6. **Offline Support and Data Synchronization:**
- Enable offline access and synchronize appointments when the user comes back online.

## Contributing

Feel free to open issues and submit pull requests to help improve this project. Follow the existing coding style and add JSDoc comments for any new functions.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
Binary file added docs/fonts/OpenSans-Bold-webfont.eot
Binary file not shown.
Loading

0 comments on commit fc94721

Please sign in to comment.