How thiagoconnectcom/ecoleta works
Ecoleta is a waste-collection marketplace with a React web client and an Express/SQLite API. The visible user workflow starts at the home page, opens point registration, gathers contact details, location and collection-item choices, then submits a point. The API also exposes item listing and point search/detail operations. Source excerpts show the registration-to-API path and server-side persistence; the README is empty, and the home page excerpt does not show a search interface, so no client-side discovery flow is inferred.
Main entry points: routes.ts API routing · index.tsx Register collection point · connection.ts Knex connection · routes.tsx Page routing
Components 19
Web client
- React app
web/src/App.tsx - Page routing
web/src/routes.tsx - Marketplace home
web/src/pages/Home/index.tsx - Register collection point
web/src/pages/CreatePoint/index.tsx - HTTP API client
web/src/services/api.tsx
API service
- HTTP server
server/src/server.ts - API routing
server/src/routes.ts - List collection items
server/src/controllers/ItemsController.ts - Search points
server/src/controllers/PointsController.ts - Point details
server/src/controllers/PointsController.ts - Create point
server/src/controllers/PointsController.ts - Static uploads
server/src/server.ts
Persistence
- Knex connection
server/src/database/connection.ts - SQLite database
server/src/database/database.sqlite - Marketplace schema
server/src/database/migrations - Initial item data
server/src/database/seeds/create_items.ts
External services
- IBGE location service
- OpenStreetMap tiles
Other components
- Marketplace visitor
Connections 22
- Marketplace visitor → Marketplace home: opens
web/src/pages/Home/index.tsx - React app → Page routing: renders
web/src/App.tsx - Page routing → Marketplace home: routes to
web/src/routes.tsx - Page routing → Register collection point: routes to
web/src/routes.tsx - Marketplace home → Register collection point: links to
web/src/pages/Home/index.tsx - Register collection point → HTTP API client: requests through
web/src/pages/CreatePoint/index.tsx - Register collection point → IBGE location service: loads locations
web/src/pages/CreatePoint/index.tsx - Register collection point → OpenStreetMap tiles: loads map tiles
web/src/pages/CreatePoint/index.tsx - HTTP API client → HTTP server: sends HTTP requests
web/src/services/api.tsx - HTTP server → API routing: mounts routes
server/src/server.ts - API routing → List collection items: routes item listing
server/src/routes.ts - API routing → Create point: routes point creation
server/src/routes.ts - API routing → Search points: routes point search
server/src/routes.ts - API routing → Point details: routes point detail
server/src/routes.ts - HTTP server → Static uploads: serves files
server/src/server.ts - List collection items → Knex connection: queries items
server/src/controllers/ItemsController.ts - Search points → Knex connection: queries matching points
server/src/controllers/PointsController.ts - Point details → Knex connection: reads point and items
server/src/controllers/PointsController.ts - Create point → Knex connection: writes point and item links
server/src/controllers/PointsController.ts - Knex connection → SQLite database: connects to
server/src/database/connection.ts - Marketplace schema → SQLite database: defines schema
- Initial item data → SQLite database: seeds items