Before starting the development process, you must seed your database with the following seeding commands:
pnpm db:seed:user
pnpm db:seed:room
pnpm db:seed:calendar-shareable
pnpm db:seed:group-shareable
or just
pnpm db:seed:all
After that, copy the contents in .env.example
to a new file called .env
and fill in the variables' value.
You can build the project with:
pnpm build
This project was bootstrapped with create-t3-app (https://create.t3.gg)
This guide explains how to set up Google APIs for Calendar and Admin SDK Directory access using a Google Service Account with Domain-Wide Delegation, to then integrate those APIs with the FEMS app.
In the Google Cloud Console:
- Go to APIs & Services > Library
- Enable the following:
- Google Calendar API
- Admin SDK API
- Go to IAM & Admin > Service Accounts
- Click "Create Service Account"
- Give it a name and description
- Once created:
- Navigate to the service account
- Go to the "Keys" tab
- Click "Add Key > Create New Key"
- Choose JSON
- Save the key securely (used as
keyFile
in your app)
- Open the service account
- Click "Edit", then "Show Domain-Wide Delegation"
- Check "Enable G Suite Domain-wide Delegation"
- Save and note the Client ID
In your Google Admin Console:
- Go to Security > Access and data control > API controls
- Under Domain-wide Delegation, click "Manage Domain Wide Delegation"
- Click "Add new":
- Client ID: Paste your service account’s client ID
- OAuth Scopes: (comma-separated)
https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.events, https://www.googleapis.com/auth/admin.directory.resource.calendar, https://www.googleapis.com/auth/admin.directory.group, https://www.googleapis.com/auth/admin.directory.group.member
OAuth Scope | Purpose |
---|---|
https://www.googleapis.com/auth/calendar |
Full calendar access |
https://www.googleapis.com/auth/calendar.events |
Manage calendar events |
https://www.googleapis.com/auth/admin.directory.resource.calendar |
Manage calendar resources |
https://www.googleapis.com/auth/admin.directory.group |
Manage Workspace groups |
https://www.googleapis.com/auth/admin.directory.group.member |
Manage group members |