EduCrate is a modern, elegant digital library designed specifically for S4 Computer Science & Engineering students. Built with simplicity and accessibility in mind, this web application provides a centralized hub for storing, organizing, and accessing course materials, lecture notes, and study resources.
- 📁 Subject-Based Organization - Materials categorized by subject folders for intuitive navigation
- 🔍 Smart Search - Real-time search functionality to quickly find the notes you need
- 📱 Fully Responsive - Seamless experience across desktop, tablet, and mobile devices
- 🌓 Dark Mode Support - Toggle between light and dark themes for comfortable reading
- 📄 Built-in PDF Viewer - View documents directly in the browser with download capabilities
- ⚡ Fast & Lightweight - Optimized performance with minimal dependencies
- 🎨 Modern UI/UX - Clean, intuitive interface built with Tailwind CSS
- 🔒 Google Drive Integration - Secure file storage and retrieval
- 🛡️ Security First - Input validation, XSS protection, rate limiting, and Content Security Policy
This application implements multiple security measures to protect users and data:
- ✅ Input Validation - All user inputs are validated and sanitized
- ✅ XSS Protection - HTML escaping and removal of inline event handlers prevent script injection
- ✅ Content Security Policy - Strict CSP headers without unsafe-inline for scripts
⚠️ Rate Limiting - Basic rate limiting implemented (may need enhancement for production serverless environments)- ✅ Secure CORS - Configurable cross-origin resource sharing
- ✅ Error Handling - Secure error messages that don't expose internal details
For detailed security information, see SECURITY_AUDIT.md
| Category | Technology |
|---|---|
| Frontend | HTML5, Vanilla JavaScript, Tailwind CSS |
| Backend | Node.js, Express.js |
| Storage | Google Drive API |
| Deployment | Netlify |
| Styling | Tailwind CSS (CDN) |
-
Browse Subjects 📚
- Use the sidebar menu to navigate through different subjects
- Click on the hamburger menu (mobile) to access subjects
-
Search Notes 🔍
- Click the search icon in the navigation bar
- Type at least 2 characters to see instant results
- Click on any result to open the document
-
View PDFs 📄
- Click on any note card to open it in the built-in viewer
- The viewer loads with a smooth animation
-
Download ⬇️
- Use the "DOWNLOAD" button in the PDF viewer
- Files are downloaded directly from secure storage
-
Toggle Theme 🌓
- Click the moon/sun icon to switch between dark and light modes
- Your preference is saved automatically
Before you begin, ensure you have the following installed:
Node.js >= 14.0.0
npm >= 6.0.0 or yarn >= 1.22.0
Git-
Clone the repository
git clone https://github.com/MabelMoncy/EduCrateNoteHub.git cd EduCrateNoteHub -
Install dependencies
npm install
-
Set up environment variables
Copy the example environment file:
cp .env.example .env
Then edit
.envand add your credentials:# Google Drive API Configuration GOOGLE_SERVICE_ACCOUNT_JSON={"type":"service_account",...} # Server Configuration PORT=3000 NODE_ENV=development
-
Run the development server
npm start
-
Access the application
Open your browser and navigate to:
http://localhost:3000
| Endpoint | Method | Description |
|---|---|---|
/api/folders |
GET | Get all subject folders |
/api/files/:folderId |
GET | Get files in a specific folder |
/api/search?q=query |
GET | Search for files across all folders |
- Connect your repository to Netlify
- Netlify will use the
netlify.tomlconfiguration automatically - Add environment variables in Netlify dashboard
- Deploy!
This repository includes automated workflows in .github/workflows/:
ci.yml- Runs on
pull_requestandpush - Executes syntax checks,
node security-test.js, andnpm audit --audit-level=high
- Runs on
netlify-preview.yml- Runs on pull requests (
opened,synchronize,reopened,ready_for_review) - Deploys a Netlify preview and comments the preview URL on the PR
- Runs on pull requests (
netlify-production.yml- Runs after successful
CIworkflow onmain(or manualworkflow_dispatch) - Deploys to Netlify production and performs smoke checks on:
//api/folders
- Runs after successful
Required GitHub repository secrets:
NETLIFY_AUTH_TOKENNETLIFY_SITE_ID
Recommended GitHub environment:
production- Configure approval rules if you want manual gatekeeping before production deploy.
Experience EduCrate in action! The live demo showcases all features including:
✅ Subject browsing and navigation
✅ Real-time search functionality
✅ PDF viewing and downloading
✅ Dark/light mode theming
✅ Mobile-responsive interface
Note: The demo is populated with educational resources for S4 CS2 students.
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is created for educational purposes. Please credit the original author when using or modifying this code.
- Tailwind CSS for the amazing utility-first CSS framework
- Netlify for seamless deployment
- Google Drive API for file storage
- All S4 CS2 students who inspired this project
If you have any questions or need help, please:
- 🐛 Open an Issue
- 💬 Start a Discussion
- ⭐ Star this repository if you find it helpful!
Made for Students, By Students 🎓
⭐ Star this repo if you find it helpful!