A REST API for saving markdown notes to Google Drive with automated GitHub backups.
- Save markdown notes to Google Drive organized by category
- Daily automated backups to GitHub (3 AM ET)
- Auto-generated index files for easy navigation
- API key authentication with rate limiting
- Install dependencies:
npm install- Create a
.envfile with your credentials:
PORT=8080
API_KEY=your-secret-key
# Google Drive
GOOGLE_CLIENT_ID=your-client-id
GOOGLE_CLIENT_SECRET=your-client-secret
GOOGLE_REFRESH_TOKEN=your-refresh-token
NOTES_FOLDER_ID=your-drive-folder-id
# GitHub
GITHUB_TOKEN=your-github-token
GITHUB_REPO_OWNER=your-username
GITHUB_REPO_NAME=your-repoFirst time setup? See SETUP.md for detailed instructions on obtaining all credentials.
- Run the server:
npm startPOST /api/save-note
Headers: x-api-key: your-secret-key
Content-Type: application/json
{
"category": "Personal",
"filename": "my-note.md",
"content": "# My Note\n\nContent here..."
}GET /healthNotes are automatically backed up to GitHub daily at 3 AM ET. The backup includes:
- All notes with YAML front-matter (created/updated timestamps)
- Index files for each category
- Root index linking all categories
- API key authentication on all endpoints
- Rate limiting: 100 requests per 15 minutes
- Input validation for filenames and categories
- 2MB content size limit
MIT