This is the template version of EngNotes with all sensitive information replaced by placeholders.
-
Fork or clone this repository
-
Connect to Cloudflare Pages:
- Go to Cloudflare Dashboard
- Pages > Create a project > Connect to Git
- Select your repository
-
Set Environment Variables:
- Go to Pages > Your Project > Settings > Environment Variables
- Add the following variables:
Variable Description Required GOOGLE_DRIVE_API_KEYYour Google Drive API key Yes NOTES_FOLDER_IDGoogle Drive folder ID for notes Yes TEXTBOOKS_FOLDER_IDGoogle Drive folder ID for textbooks Yes CONTACT_EMAILYour contact email No CACHE_TTL_HOURSCache duration in hours (default: 24) No -
Deploy - Cloudflare will automatically deploy your site
- Copy
js/config.example.jstojs/config.js - Replace placeholders with your actual values
- Upload all files to your hosting provider
| Variable | Description | Example |
|---|---|---|
GOOGLE_DRIVE_API_KEY |
Google Drive API key | AIzaSy... |
NOTES_FOLDER_ID |
Folder ID for notes | 1SNnQiyuSNuJUSbs... |
TEXTBOOKS_FOLDER_ID |
Folder ID for textbooks | 1qdcMtjkSDhOFol... |
| Variable | Description | Default |
|---|---|---|
CONTACT_EMAIL |
Contact email address | your-email@example.com |
CACHE_TTL_HOURS |
Cache duration in hours | 24 |
ENABLE_ANALYTICS |
Enable analytics | false |
ENABLE_ADS |
Show ad placeholders | true |
- Go to Google Cloud Console
- Create a new project or select existing
- Enable Google Drive API
- Create API Key (not OAuth)
- Add HTTP Referrer restriction:
yourdomain.com/* - Copy the API key to your environment variables
Root Folder (Notes)
├── Computer Science
│ ├── Sem 1
│ │ ├── Subject Name
│ │ │ ├── Unit-1
│ │ │ │ └── notes.pdf
│ │ │ └── Unit-2
│ │ └── Another Subject
│ ├── Sem 2
│ └── ...
├── Electronics
└── ...
Root Folder (Textbooks)
├── Computer Science
│ ├── Sem 1
│ │ ├── Subject Name
│ │ │ ├── Unit-1
│ │ │ └── Unit-2
│ │ └── ...
│ └── ...
└── ...
Semester Detection:
Sem 1,Sem 2,Sem 3, etc.Semester 1,Semester 2, etc.S1,S2,S3, etc.1st Sem,2nd Sem, etc.
Unit Detection:
Unit-1,Unit-2, etc.U-1,U-2, etc.Module-1,Module-2, etc.Chapter-1,Chapter-2, etc.
The system auto-detects department codes from folder names:
| Department | Code | Color |
|---|---|---|
| Artificial Intelligence / AIDS | AIDS | Pink |
| Civil | CE | Blue |
| Computer Science | CSE | Green |
| Electronics | ECE | Orange |
| Electrical | EEE | Yellow |
| Instrumentation | EIE | Red |
| Information Technology | IT | Purple |
| Mechanical | ME | Cyan |
template/
├── index.html # Home page
├── notes.html # Class resources page
├── textbooks.html # Textbooks page
├── calculator.html # GPA/CGPA calculator
├── CHANGELOG.html # Version history
├── _worker.js # Cloudflare Worker for env injection
├── wrangler.toml # Cloudflare configuration
├── .env.example # Environment variables template
├── js/
│ ├── config.js # Environment configuration (PLACEHOLDERS)
│ ├── drive-api.js # Google Drive API module
│ ├── navigation.js # UI rendering
│ ├── calculator.js # Calculator logic
│ └── ...
├── css/
│ ├── themes.css # Theme variables
│ ├── common.css # Shared styles
│ └── ...
└── docs/
└── ...
- Set up a local server (Python, Node.js, etc.)
- Copy
js/config.jsand update with your values - Open
index.htmlin browser - Check browser console for errors
- Never commit
.envorconfig.jswith real credentials - Use Cloudflare's Environment Variables for production
- Restrict your Google API key to your domain only
- The
_worker.jsinjects env vars at runtime securely
Before deploying, ensure you've set:
-
GOOGLE_DRIVE_API_KEY- In Cloudflare Dashboard -
NOTES_FOLDER_ID- In Cloudflare Dashboard -
TEXTBOOKS_FOLDER_ID- In Cloudflare Dashboard -
CONTACT_EMAIL- (optional) - Google API Key restricted to your domain
For issues or questions, check:
- Browser console for errors
- Network tab for API call failures
- Google Cloud Console for API key restrictions
- Cloudflare Pages logs for Worker errors
MIT License - Feel free to use and modify for your own projects.