A sustainable carpooling platform for Eastside Preparatory School students to share rides to school events while reducing their carbon footprint.
EPCarpool was born from the first EPS Hackathon in January 2024, addressing the challenge: "How can we make EPS more sustainable?" Rather than just raising awareness, we chose to create a practical solution that empowers students to take direct climate action through carpooling.
The platform enables students to coordinate rides for school eventsβsports games, academic competitions, social gatherings, and moreβtransforming transportation into a collaborative, eco-friendly experience that builds community while protecting the environment.
- Create & Join Carpools: Organize rides for any EPS event with detailed route information
- Intelligent Matching: Get personalized carpool recommendations based on your interests (sports, academics, social events)
- Real-time Management: Handle passenger requests, track available seats, and manage your carpools
- CO2 Savings Calculator: Automatically calculate environmental impact using EPA emission standards (0.404 kg CO2/mile)
- Personal Impact Dashboard: Track your cumulative CO2 savings over time
- Visual Equivalents: See your impact in relatable terms (plastic bottles, rice servings equivalent)
- Community Goals: Work together toward school-wide sustainability targets
- Interactive Maps: Visualize pickup routes and event locations using Leaflet mapping
- Address Geocoding: Automatic conversion of addresses to coordinates for accurate routing
- Distance Calculation: Smart algorithms to optimize routes and calculate travel distances
- Secure Authentication: Firebase-powered login system with EPS email verification
- Personalized Settings: Customize notification preferences and interests
- Event Categories: Filter by sports, academic, social, and other event types
- Responsive Design: Works seamlessly on desktop and mobile devices
- School Email Verification: Restricted to verified EPS students and staff
- Rate Limiting: Protection against abuse with intelligent request throttling
- Data Privacy: Secure handling of personal information and location data
- Admin Controls: Administrative oversight for platform management
- Node.js (v22.x or higher)
- MongoDB database
- Firebase service account credentials
- EPS email account for authentication
-
Clone the repository
git clone https://github.com/EPSpaces/EPShareRides.git cd EPShareRides -
Install dependencies
npm install
-
Configure environment
Contact the development team for required configuration files:
.env- Environment variablesservice_account.json- Firebase credentialsconfig.js- Application configuration
π§ Contact: ajosan@eastsideprep.org, nmahesh@eastsideprep.org, ayamashita@eastsideprep.org
-
Set development mode
# In your .env file MODE=DEV -
Start the development server
npm run dev
The application will start at
http://localhost:3000with hot reloading via nodemon.
npm startThe app is configured for Google Cloud Platform deployment with automatic scaling.
- Backend: Node.js with Express.js framework
- Database: MongoDB with Mongoose ODM
- Authentication: Firebase Authentication
- Frontend: EJS templating with Bulma CSS framework
- Maps: Leaflet.js for interactive mapping
- Testing: Jest with Supertest for API testing
- Deployment: Google Cloud Platform App Engine
EPShareRides/
βββ index.js # Main server file
βββ package.json # Dependencies and scripts
βββ app.yaml # GCP deployment configuration
βββ jest.config.js # Test configuration
β
βββ routes/ # Express route handlers
β βββ apiRoutes.js # API endpoints for carpools, events, CO2 tracking
β βββ authRoutes.js # Authentication routes
β
βββ schemas/ # MongoDB data models
β βββ User.model.js # User account information
β βββ Carpool.model.js # Carpool details and participants
β βββ Event.model.js # School events
β βββ UserSettings.model.js # User preferences
β
βββ utils/ # Utility functions
β βββ authUtils.js # JWT authentication helpers
β βββ co2Calculator.js # Environmental impact calculations
β βββ distanceUtils.js # Route distance calculations
β βββ geoUtils.js # Geocoding and location services
β βββ studentUtils.js # Student data processing
β
βββ public/ # Static frontend assets
β βββ js/ # Client-side JavaScript
β βββ style.css # Custom styling
β βββ bulma.min.css # UI framework
β βββ *.js # Feature-specific scripts
β
βββ views/ # EJS templates
β βββ index.ejs # Dashboard homepage
β βββ mycarpools.ejs # Personal carpool management
β βββ findrides.ejs # Browse available rides
β βββ *.ejs # Additional pages
β
βββ __tests__/ # Test suites
βββ *.test.js # Jest test files
Run the comprehensive test suite:
npm testTests cover:
- API endpoint functionality
- Carpool recommendation algorithms
- CO2 calculation accuracy
- Authentication flows
- Database operations
EPCarpool calculates real environmental benefits:
- CO2 Reduction: Uses EPA standards (0.404 kg CO2 per mile) for accurate calculations
- Passenger Sharing: Each additional passenger significantly reduces per-person emissions
- Visual Impact: Converts savings to understandable equivalents
- Community Goals: Tracks school-wide progress toward sustainability targets
A 4-person carpool for a 20-mile round trip saves approximately 2.42 kg CO2 compared to driving separatelyβequivalent to the CO2 used in producing 29 plastic water bottles!
We welcome contributions from the EPS community! Here's how to get involved:
Code Style:
- Follow JavaScript/Node.js best practices
- Use
camelCasefor variables and functions - Use
PascalCasefor classes and models - Write descriptive commit messages
- Include tests for new features
Architecture Patterns:
- Organize routes by functionality in separate files
- Use MongoDB/Mongoose patterns for database operations
- Implement async/await for asynchronous operations
- Handle errors with comprehensive try/catch blocks
- Comment complex business logic and algorithms
- Fork the repository and create a feature branch
- Make your changes following the style guidelines
- Add tests for any new functionality
- Run the test suite to ensure everything works
- Submit a pull request with a clear description of changes
Found a bug or have a feature request? Please create an issue with:
- Clear description of the problem/request
- Steps to reproduce (for bugs)
- Expected vs actual behavior
- Screenshots if applicable
This project is licensed under the ISC License - see the LICENSE file for details.
EPCarpool is developed and maintained by EPS students and faculty:
- Development Team: Contact ajosan@eastsideprep.org, nmahesh@eastsideprep.org, ayamashita@eastsideprep.org
- Community: All EPS students and staff
- EPS Hackathon 2024 - Where the idea was born
- Eastside Preparatory School - For supporting student innovation
- Environmental Protection Agency - For CO2 emission standards
- Open Source Community - For the amazing tools and libraries
Ready to reduce your carbon footprint while connecting with your EPS community? Start carpooling today! ππ
Visit us at epcarpool.com or contact the development team for questions and support.