EcoCity is a web application for reporting and monitoring environmental issues. It allows users to submit reports about pollution, illegal dumping, and other environmental concerns, and engage with the community through comments and discussions.
- User Authentication: Secure login and registration system
- Environmental Reporting: Submit reports with location data and images
- Interactive Dashboard: View your submitted reports and activity
- Community Engagement: Comment on reports and collaborate on solutions
- Geolocation: Automatic location detection and city name resolution
-
Clone the repository:
git clone https://github.com/JakubKorytko/EcoCity.git cd EcoCity -
Run the Docker container:
docker-compose up --build
Prerequisites: - Node.js (v20 or higher) - SQLite3
-
Clone the repository:
git clone https://github.com/JakubKorytko/EcoCity.git cd EcoCity -
Run the application:
node pig.mjs
ecocity/
├── server/ # Server-side code
│ ├── api/ # API endpoints
│ ├── database/ # Database setup and ORM
│ └── index.mjs # Server entry point
├── src/ # Client-side code
│ ├── components/ # UI components
│ ├── pages/ # Pages
│ ├── public/ # Public assets
│ ├── modules/ # JavaScript modules
│ └── App.pig.mjs # Routing entry point
└── Pig.html # Main HTML file
GET /api/reports- Get all reportsGET /api/comments- Get comments for a reportGET /api/users- Get users detailsPOST /api/login- Authenticate a userPOST /api/logout- End a user sessionPOST /api/session- Get session information & verify user authentication
- Frontend: Custom UI framework with HTML components
- Backend: Node.js with custom server implementation
- Database: SQLite with custom ORM
- Authentication: Token-based session management
- Geolocation: Integration with OpenStreetMap Nominatim API
- Passwords are hashed before storage
- Sessions expire after 1 hour of inactivity
- HTTPS recommended for production use
Font Awesome icons are used in this project, check out their license for more details.
