An educational environmental monitoring platform for tracking conservation projects worldwide using interactive satellite maps, real-time environmental data, and pledge management.
Purpose: Educational environmental monitoring platform inspired by Plant-for-the-Planet
Current State: Fully functional with authentication, project management, and pledge system
Tech Stack: React 18 + TypeScript + Express.js + PostgreSQL + Drizzle ORM
- ✅ Configured Vite for Replit proxy support (host: 0.0.0.0, port: 5000, HMR over WSS)
- ✅ Fixed SSL certificate issue for Supabase PostgreSQL connection (NODE_TLS_REJECT_UNAUTHORIZED=0 in dev)
- ✅ Set up PostgreSQL database schema with Drizzle ORM
- ✅ Configured deployment for Replit Autoscale
- ✅ Tested authentication endpoints (register/login working correctly)
- ✅ Seeded database with 6 sample conservation projects
- Location:
/client/src - Port: 5000
- Key Features:
- Interactive maps with Leaflet (OpenStreetMap, NASA GIBS satellite, OpenWeatherMap)
- Dark mode support with next-themes
- Authentication UI with Shadcn components
- Project browsing and pledge creation
- Location:
/server - Port: 5000 (same as frontend - integrated server)
- Key Routes:
/api/projects- CRUD operations for conservation projects/api/pledges- Create and view pledges/api/auth/register- User registration with bcrypt/api/auth/login- User authentication/api/seed- Seed database with sample data
- ORM: Drizzle
- Tables:
users- User accounts with hashed passwordsprojects- Conservation projects with location datapledges- User pledges linked to projects
- Schema Location:
/shared/schema.ts
All environment variables are stored in .env (already configured):
DATABASE_URL- PostgreSQL connection string (Supabase)VITE_SUPABASE_URL- Supabase project URLVITE_SUPABASE_ANON_KEY- Supabase anonymous keyVITE_OPENWEATHER_API_KEY- OpenWeatherMap API key for weather dataDATASPACE_USERNAME/PASSWORD- Copernicus Dataspace credentialsNASA_EARTHDATA_USERNAME/PASSWORD- NASA Earthdata credentialsSESSION_SECRET- Express session secret
Development: SSL verification is disabled (NODE_TLS_REJECT_UNAUTHORIZED=0) to handle Supabase's self-signed certificates
Production: SSL verification enabled via deployment configuration
npm run devRuns on port 5000 with Vite dev server and HMR
npm run db:push # Push schema changes
npx drizzle-kit push --force # Force push if neededcurl -X POST http://localhost:5000/api/seedCreates 6 sample conservation projects from around the world
Method: Local authentication with bcrypt (not Supabase Auth)
Flow:
- Registration: Username + email + password → hashed password stored
- Login: Username + password → bcrypt comparison → user data returned
Test Credentials:
- Username:
testuser - Password:
Test1234
- Host:
0.0.0.0(required for Replit proxy) - Port: 5000 (only non-firewalled port)
- HMR: WebSocket over SSL (clientPort: 443, protocol: wss)
- Uses
@neondatabase/serverlesswith WebSocket - Pipeline connect disabled for compatibility
- SSL verification bypassed in development
- Target: Replit Autoscale (stateless, database handles state)
- Build:
npm run build(Vite + esbuild) - Run:
npm start(production mode)
- PostCSS Warning: Non-critical warning about
fromoption - doesn't affect functionality - React DOM Warning: Nested
<a>tags in navigation - minor, doesn't affect UX - SSL in Development: Using
NODE_TLS_REJECT_UNAUTHORIZED=0- acceptable for dev, removed in production
No specific coding preferences set yet. Using:
- TypeScript strict mode
- React functional components with hooks
- Shadcn UI component library
- TanStack Query for data fetching
curl -X POST http://localhost:5000/api/auth/register \
-H "Content-Type: application/json" \
-d '{"username":"user","email":"user@example.com","password":"pass123"}'curl -X POST http://localhost:5000/api/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"user","password":"pass123"}'curl http://localhost:5000/api/projects- Base: OpenStreetMap (roads, cities, terrain)
- Satellite: NASA GIBS MODIS Terra true color
- Weather: OpenWeatherMap cloud coverage overlay
- Payment integration for pledges
- Admin dashboard for project management
- User profile pages
- Real-time project updates
- Mobile app version