Skip to content

kichikawa57/google-calendar-integration-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Calendar Integration App

A full-stack application that integrates with Google Calendar API using Next.js frontend and Golang backend.

Features

  • Google OAuth authentication
  • Access token management
  • Google Calendar API integration
  • Recent calendar events display

Setup

Slack

  • アプリ一覧ページ
  • ngrokを使ってhttpsで起動できるようにする
  • Slackのアプリを作成する
  • Incoming Webhooksをonにする
  • Manage DistributionをPublic Distributionにする
  • Redirect URLsも設定とOAuth Tokensをonにする
  • Client IDとClient Secretを取得する

1. Google Cloud Console Setup

  1. Go to Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable the Google Calendar API
  4. Create OAuth 2.0 credentials:
    • APIとサービスの認証情報にアクセス
    • Application type: Web application
    • Authorized redirect URIs: http://localhost:3000/api/auth/callback/google
    • Note down the Client ID and Client Secret

2. Frontend Setup

cd frontend
npm install

Create .env.local file:

NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-secret-key-here
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret

3. Backend Setup

cd backend
go mod tidy

4. Running the Application

Terminal 1 (Frontend):

cd frontend
npm run dev

Terminal 2 (Backend):

cd backend
go run main.go

Usage

  1. Open http://localhost:3000
  2. Click "Sign in with Google"
  3. Authorize the application
  4. Click "Fetch Calendar Data" to retrieve recent calendar events

API Endpoints

  • GET /api/calendar - Fetch calendar events (requires Bearer token)

Tech Stack

  • Frontend: Next.js, NextAuth.js, TypeScript, Tailwind CSS
  • Backend: Go, Gin, Google Calendar API
  • Authentication: Google OAuth 2.0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published