Interactive map for volunteer.templeeearth.cc showing organizations and their descriptions.
- Interactive map with organization markers
- Filtering by organization type, location, and volunteer opportunities
- Detailed organization profiles with descriptions
- Volunteer opportunity listings
- Responsive design
- RESTful API for integration
- Python 3.9+
- Node.js (for frontend development)
- SQLite (included with Python)
- Cloudflare Tunnel (optional, for production deployment)
- Clone or download the project to your server:
sudo mkdir -p /opt/volunteer-map
cd /opt/volunteer-map- Run the setup script:
sudo chmod +x setup.sh
./setup.sh- Start the services:
# Backend (auto-started via systemd)
sudo systemctl start volunteer-map
# Frontend development server
cd frontend
npm start- Access the application:
- Frontend: http://localhost:3000
- API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
/opt/volunteer-map/
├── backend/ # FastAPI backend application
│ ├── app/ # Main application package
│ │ ├── models.py # Database models
│ │ ├── schemas.py # Pydantic schemas
│ │ └── main.py # FastAPI application
│ ├── scripts/ # Utility scripts
│ │ └── seed_db.py # Database seeding script
│ ├── alembic.ini # Alembic migration configuration
│ ├── requirements.txt # Python dependencies
│ └── .env # Environment configuration
├── frontend/ # React/Vanilla JS frontend
│ ├── css/ # Stylesheets
│ ├── js/ # JavaScript application
│ ├── index.html # Main HTML file
│ └── package.json # (Optional) Frontend dependencies
├── data/ # Data files and configuration
├── scripts/ # Additional scripts
├── cloudflare-tunnel-config.json # Cloudflare Tunnel configuration
├── setup.sh # Setup script
└── README.md # This file
GET /api/organizations/- List all organizations (with filtering)GET /api/organizations/{id}- Get specific organizationPOST /api/organizations/- Create new organization (admin)PUT /api/organizations/{id}- Update organization (admin)DELETE /api/organizations/{id}- Delete organization (admin)
GET /api/opportunities/- List all opportunitiesGET /api/organizations/{id}/opportunities- Get opportunities for organizationPOST /api/opportunities/- Create new opportunity (admin)
GET /api/organizations/nearby- Find organizations near a location- Parameters: latitude, longitude, radius_km, limit
GET /api/statistics/- Get application statisticsGET /api/health/- Health check endpoint
id- Primary keyname- Organization namedescription- Detailed descriptionorganization_type- Type (ecovillage, nonprofit, community-group, educational)website- Organization websiteemail- Contact emailphone- Contact phoneaddress- Street addresscity- Cityregion- State/Province/Regioncountry- Countrypostal_code- Postal/ZIP codelatitude- Geographic latitudelongitude- Geographic longitudelocation- PostGIS geography pointvolunteer_opportunities- Boolean flagaccepting_volunteers- Boolean flagcreated_at- Timestamplast_updated- Timestamp
id- Primary keyorganization_id- Foreign key to organizationstitle- Opportunity titledescription- Detailed descriptionrole- Role/positionskills_needed- Required skillsstart_date- Start dateend_date- End datecommitment- Time commitmentremote_options- Remote work availableapplication_email- Application contact emailcreated_at- Timestamp
- Install Cloudflare Tunnel:
cloudflared tunnel --url http://localhost:8000- Create and configure the tunnel:
cloudflared tunnel create volunteer-map-
Update
/opt/volunteer-map/cloudflare-tunnel-config.jsonwith your account details. -
Run the tunnel:
cloudflared tunnel --config /opt/volunteer-map/cloudflare-tunnel-config.json run- Configure your DNS to point
volunteer.templeeearth.ccto the Cloudflare Tunnel.
The application includes a systemd service file (/etc/systemd/system/volunteer-map.service) that:
- Runs as the
terexitariususer - Automatically restarts on failure
- Starts on boot
Manage the service with:
sudo systemctl start volunteer-map
sudo systemctl stop volunteer-map
sudo systemctl restart volunteer-map
sudo systemctl status volunteer-mapcd /opt/volunteer-map/backend
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000cd /opt/volunteer-map/frontend
npm install
npm startcd /opt/volunteer-map/backend
alembic upgrade headcd /opt/volunteer-map/backend
python scripts/seed_db.pyOrganizations can be added via the API or through a future admin interface.
DATABASE_URL- Database connection stringSECRET_KEY- Secret key for signing dataBACKEND_CORS_ORIGINS- Allowed CORS origins
- Change the
SECRET_KEYin production. - Use HTTPS with Cloudflare Tunnel.
- Implement proper authentication/authorization for API endpoints.
- Regularly update dependencies for security patches.
Database connection errors:
- Ensure SQLite is installed
- Check file permissions for the database file
API not responding:
- Check systemd service status:
sudo systemctl status volunteer-map - Check logs:
journalctl -u volunteer-map
Frontend not loading:
- Ensure Node.js and npm are installed
- Check that the backend API is running
Enable debug logging by setting DEBUG=1 in the environment.
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to the open-source tools that make this project possible
- Special thanks to the volunteer.templeeearth.cc team for the inspiration