A GitHub-style contributions calendar for tracking task completion in Notion databases.
- GitHub-style contribution visualization with blue color palette
- Dynamic database integration via path parameters:
/{databaseId} - Automatic updates based on Notion database entries
- Daily streaks and productivity tracking
- Secure Notion API handling with environment variables
- Embeddable in Notion pages
-
Create a Notion Integration
- Go to https://www.notion.so/my-integrations
- Create a new integration and copy the API key
-
Share your Notion database with the integration
- Open your Notion database
- Click "Share" in the top right
- Add your integration by name
- Make sure your database has a "Status" property that can be set to "Done"
- Clone the repository
git clone https://github.com/yourusername/notion-contributions.git
cd notion-contributions- Install dependencies
npm install- Create a
.env.localfile with your Notion API key
NOTION_API_KEY=your_notion_api_key_here
NEXT_PUBLIC_BASE_URL=http://localhost:3000
- Run the development server
npm run devOpen http://localhost:3000 with your browser to see the application.
-
Find your Notion database ID from the URL:
- It's in the format:
https://www.notion.so/workspace/[database-id]?v=... - The database ID is a 32-character string with hyphens
- It's in the format:
-
View your contributions calendar:
- Visit
http://localhost:3000/[database-id] - The calendar shows your task completions over time
- Visit
-
Embed in Notion:
- Use Notion's
/embedcommand - Paste your calendar URL
- The embed automatically updates when tasks are completed
- Use Notion's
The easiest way to deploy this application is with Vercel:
- Push your code to a GitHub repository
- Import the project to Vercel
- Set environment variables:
NOTION_API_KEY- Your Notion API keyNEXT_PUBLIC_BASE_URL- Your deployment URL (e.g.,https://your-app.vercel.app)
notion-contributions/
├── src/
│ ├── app/
│ │ ├── api/
│ │ │ └── notion/
│ │ │ └── [databaseId]/
│ │ │ └── route.ts
│ │ ├── [databaseId]/
│ │ │ └── page.tsx
│ │ ├── globals.css
│ │ ├── layout.tsx
│ │ ├── not-found.tsx
│ │ └── page.tsx
│ ├── components/
│ │ ├── ContributionCalendar.tsx
│ │ └── Layout.tsx
│ └── lib/
│ ├── notion.ts
│ └── utils.ts
├── public/
├── .env.local
├── next.config.ts
└── package.json
This project is licensed under the MIT License.