How tusharkkp/ecotravel works
Project type and purpose
• This is a full-stack web application (“Eco-Travel Planner”) with a React-based Single Page Application (SPA) on the client side and a Node.js/Express REST API on the server side.
• Purpose: Let users compare and book eco-friendly travel options, calculate carbon footprints, earn and spend “EcoCoins,” and track personal eco-impact.
File structure
• Top-level directories:
• client/ – React frontend: public assets, source code (components, pages, services, context, styles).
• server/ – Express backend: routes, controllers (business logic), models (Mongoose schemas), middleware (authentication), configuration.
• Other files:
• DEPLOYMENT.md, deploy.js – deployment instructions/scripts.
• .env.sample files in each folder – environment variable requirements.
• Notice MVC pattern in server (models/controllers/routes), and component-based organization in client (UI components, pages, context/providers, API wrappers).
README for additional insights
• Tech stack: React, Tailwind CSS, Chart.js, Leaflet on the frontend; Node.js, Express, MongoDB, JWT on the backend.
• External dependencies: Carbon Calculator API (configurable via REACT_APP_API_URL), third-party chatbot service, possibly mapping/geolocation services.
• Deployment targets: Netlify (client) and any Node hosting (server).