An eco-conscious habit-tracking application designed to promote sustainable living through habit formation. This project helps users establish eco-friendly habits by providing a simple interface to track progress and view environmental impact reports. Built with a Java backend and minimal HTML/CSS frontend, this app demonstrates the potential of technology in fostering sustainable lifestyles.
- User Accounts: Users are able to create/register a new account which is stored with the in-memory h2 DB, and user's session id/auth token is stored for relevant login security.
- Vehicle Registration: Users are able to create and remove various vehicles with different attributes (name, make, model, mpg) which will be used in the future to calculate carbon emissions.
- Extensive Testing: Unit tests have been added to relevant logic to ensure functionality is working as intended, integration tests are on priority TODO.
- Progress Reporting: Visual summaries of your eco-habits’ impact over time. [Currently Working On]
- Habit Tracking: Track daily eco-friendly actions, set goals, and monitor your streaks. [Currently Working On]
- Reminders and Notifications: Encouragement to complete daily habits.
- Eco-Fact of the Day: Stay informed with daily eco-friendly tips and facts.
To get a local copy of the project up and running, follow these simple steps.
- Java 11 or later installed
- Maven installed for managing dependencies
- H2 Database configured
- Clone the repository:
Begin by cloning this repository to your local system:
git clone https://github.com/Ian4448/Eco-Friendly-Habit-Tracker.git cd Eco-Friendly-Habit-Tracker
- Install dependencies:
mvn install
- Access the Application: Open your web browser and navigate to http://localhost:8080 to access the Eco-Friendly Habit Tracker.
- Java: Backend language for business logic and core functionality.
- HTML/CSS: Used for the frontend layout and styling.
- JavaScript: Adds interactivity to the frontend.
- Spring: Provides a framework for building scaleable applications, handling dependency injection, RESTful APIs, and security.
- Mockito: Allows for unit testing by creating mock objects to simulate interactions.
- JUnit: Framework for testing Java applications, ensuring code reliability and performance.
- H2 Database: An in-memory database used for development and testing, providing easy and fast setup.
- JPA (Java Persistence API): Manages relational data, simplifies database interactions, and maps Java objects to database tables.
- BCrypt: Provides secure password hashing to protect user credentials.
- JSoup: Provides ability to parse HTML and sanitize input to only receive necessary text.
- REST API: Used for client-server communication, allowing the frontend to interact with backend services seamlessly.
- Google Maps API: TODO
Contributions are welcome! Follow these steps to contribute:
- Fork the project.
- Create your feature branch (git checkout -b feature/AmazingFeature).
- Commit your changes (git commit -m 'Add AmazingFeature').
- Push to the branch (git push origin feature/AmazingFeature).
- Open a pull request. For any significant changes, please open an issue first to discuss what you would like to change.