A Node.js application that fetches university events via the Localist API and displays them in a beautiful, organized web interface.
- π Dynamic Discovery: Find universities near you using location-based search
- πΊοΈ 32 Universities: Pre-loaded directory of major US universities
- π Automatic Updates: Fetches events every 2 hours via API
- π¨ Beautiful UI: Modern, responsive design with gradient colors
- βοΈ Configurable: Add/remove event sources on-the-fly
- π Organized Display: Events sorted by date and time
- π Direct Links: Click through to original event pages
- π Lightweight: No database required, in-memory caching
- π API-Based: Uses official Localist API (no web scraping!)
The application starts empty - you discover and add universities you want to track!
Localist is an event management platform used by many universities. Both Harvard and MIT (and many other schools) use Localist for their event calendars. This application uses the official Localist JSON API to fetch events reliably and efficiently.
- Make sure you have Node.js installed (v14 or higher)
- Navigate to the project directory
- Install dependencies:
npm install
Start the server:
npm startThe application will:
- Start the server on
http://localhost:3000 - Perform an initial fetch from all enabled sources
- Schedule automatic updates every 2 hours
- Open your browser and go to
http://localhost:3000 - You'll see "No events found" - this is normal!
- Click "π Discover Nearby" to find universities
Option 1: Location-Based (Recommended)
- Click "π Share Location"
- Allow location access
- See nearby universities sorted by distance
- Click "+ Add" on universities you want to track
Option 2: Browse All
- Switch to "All Universities" tab
- Browse the complete list of 32 universities
- Click "+ Add" on any university
Option 3: Search
- Switch to "Search" tab
- Type university name, city, or state
- Click "+ Add" on search results
- Click "βοΈ Settings" to toggle sources on/off
- Click "π Refresh Now" to manually fetch new events
- Remove universities by clicking the "β Added" button in Discovery
GET /api/events- Get all fetched eventsGET /api/scrapers- Get available scrapers and their statusPOST /api/scrapers/:id/toggle- Enable/disable a scraperPOST /api/scrape- Manually trigger event fetching
event-notifier/
βββ server.js # Main Express server
βββ package.json # Dependencies
βββ scrapers/
β βββ localistScraper.js # Generic Localist API client
β βββ harvardScraper.js # Harvard events (Localist)
β βββ mitScraper.js # MIT events (Localist)
β βββ demoScraper.js # Demo events generator
β βββ scraperManager.js # Manages all scrapers
βββ public/
βββ index.html # Frontend interface
Many universities use Localist for their event calendars. Adding a new university is simple:
Create a new file in scrapers/ (e.g., yaleScraper.js):
const LocalistScraper = require('./localistScraper');
class YaleScraper extends LocalistScraper {
constructor() {
super(
'Yale University', // Display name
'https://calendar.yale.edu', // Calendar URL
{
daysAhead: 30, // How many days to fetch
perPage: 100, // Results per page (max 100)
distinct: true // Remove duplicates
}
);
}
}
module.exports = YaleScraper;Add it to scraperManager.js:
const YaleScraper = require('./yaleScraper');
class ScraperManager {
constructor() {
this.availableScrapers = {
'harvard': HarvardScraper,
'mit': MITScraper,
'yale': YaleScraper, // Add your new scraper
'demo': DemoScraper
};
this.activeScrapers = ['harvard', 'mit', 'yale', 'demo'];
}
// ...
}The new source will automatically appear in the web UI!
To find if a university uses Localist, look for:
- URLs like
calendar.university.eduorevents.university.edu - Calendars powered by Localist/Concept3D
- API endpoint at
https://calendar.university.edu/api/2/events
Common universities using Localist:
- Stanford:
https://events.stanford.edu - Columbia:
https://events.columbia.edu - Cornell:
https://events.cornell.edu - Duke:
https://calendar.duke.edu - And many more!
The generic LocalistScraper class handles all the API communication:
- Endpoint:
{calendar-url}/api/2/events - Format: JSON
- Parameters:
days- Number of days ahead to fetch (max 370)pp- Results per page (max 100)distinct- Remove duplicate events
- Documentation: https://developer.localist.com/doc/api
- Port: Set
PORTenvironment variable (default: 3000) - Update Frequency: Modify cron schedule in
server.js(default: every 2 hours) - Days Ahead: Configure in each scraper's constructor (default: 30 days)
To test the full functionality with real Harvard and MIT events, run the application on your local machine or in an environment without network restrictions.
If you see 403 Forbidden errors:
- Network Restrictions: Check if your environment blocks external API access
- Rate Limiting: Try reducing the fetch frequency or number of results
- Authentication: Some Localist instances may require authentication (rare for public calendars)
- Check that the scraper is enabled in Settings
- Click "Refresh Now" to manually trigger fetching
- Check server logs for error messages
- Verify the calendar URL is correct
To add custom event parsing or filtering:
-
Override methods in your scraper class:
parseEvents()- Custom event parsingparseDate()- Custom date handlingparseLocation()- Custom location formattingparseDescription()- Custom description processing
-
See
localistScraper.jsfor all available methods
ISC