commit 9ab798fd0fd1dfebfc2a273a5ce396090871365a Author: Blake Ridgway Date: Tue Jun 17 13:21:46 2025 -0500 Init commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a89a00a --- /dev/null +++ b/.gitignore @@ -0,0 +1,33 @@ +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ + +# Rider specific +.idea/ + +# Visual Studio specific +.vs/ + +# Database files +*.db +*.db-journal + +# Secrets +appsettings.Development.json +secrets.json + +# Others +*.DS_Store \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..f3fc6e8 --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# MowLog + +A simple but powerful ASP.NET Core MVC application designed to track lawn care activities. +**This project serves as a hands-on learning exercise to explore and master the fundamentals of the ASP.NET Core MVC framework, +from data modeling with Entity Framework Core to building dynamic, data-driven views.** + +## Key Features + +- Log lawn care events (Mowing, Watering, Fertilizing, etc.). +- Track mowing patterns to ensure a healthy lawn and prevent ruts. +- Dashboard homepage showing the last time key activities were performed and what the next mowing pattern should be. +- A filterable and sortable log of all past activities. +- Clean, responsive UI using Bootstrap. + +## Tech Stack + +- **Backend:** C#, ASP.NET Core 8 MVC +- **Database:** Entity Framework Core 8 with SQLite +- **Frontend:** HTML, CSS, Bootstrap 5, JavaScript (with jQuery) +- **Development Environment:** JetBrains Rider on Fedora Linux +- **Version Control:** Git with GitLab + +## How to Run + +1. Clone the repository. +2. Ensure you have the .NET 8 SDK installed. +3. Navigate to the project directory and run `dotnet restore`. +4. Run `dotnet ef database update` to create the initial SQLite database. +5. Run `dotnet run` to start the application. \ No newline at end of file diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..b204179 --- /dev/null +++ b/TODO.md @@ -0,0 +1,66 @@ +# MowLog Project TODO List + +This file tracks the development progress, completed features, and future ideas for the MowLog application. + +## ✅ Completed Features + +- [x] **Initial Project Setup (ASP.NET Core MVC)** + - [x] Created project using the MVC template. + - [x] Configured for development on Fedora Linux with JetBrains Rider. + +- [x] **Data Modeling & Database** + - [x] Created `LawnCareEvent` model with `MowingPattern` and `EventType` enums. + - [x] Set up Entity Framework Core. + - [x] Configured the project to use a SQLite database. + - [x] Created and applied initial database migration. + +- [x] **Core CRUD Functionality** + - [x] Scaffolded the `LawnCareEventsController` with all views (Create, Read, Update, Delete). + - [x] Ensured all CRUD views (`Index`, `Create`, `Edit`, `Delete`, `Details`) are present and working. + +- [x] **Tier 1 Enhancements (UX/UI)** + - [ ] Added JavaScript to conditionally show/hide the "Mowing Pattern" field. + - [x] Set the "Create" form's date field to default to the current day. + - [x] Customized the site's CSS to create a green, themed navigation bar. + +- [x] **Tier 2 Features (Dashboard & Logging)** + - [x] Created a `DashboardViewModel`. + - [x] Implemented a dynamic dashboard on the homepage showing last activity dates and the next mowing pattern. + - [x] Added sorting and filtering capabilities to the main "Mow Log" index page. + +- [x] **Project Management & Documentation** + - [x] Initialized a Git repository. + - [x] Created a GitLab repository and pushed the project. + - [x] Wrote a comprehensive `README.md` file. + - [x] Added a `.gitignore` file tailored for .NET projects. + - [x] Included an MIT `LICENSE` file. + +## 🎯 Next Up + +- [ ] **Feature: Lawn Care Tips Section** + - [ ] Create `LawnCareTip` model (`Id`, `Title`, `Category`, `Content`). + - [ ] Add `DbSet` to `ApplicationDbContext`. + - [ ] Create and apply a new database migration. + - [ ] Scaffold the `LawnCareTipsController` with views. + - [ ] Add a "Tips" link to the main navigation bar. + +## 🚀 Future Ideas & Enhancements + +- [ ] **Feature: Calendar View** + - Integrate a client-side JavaScript library (like FullCalendar) to display events visually. + - Create a JSON endpoint in the controller to serve event data to the calendar. + +- [ ] **Feature: Enhance Data Model** + - Add more specific, nullable fields to the `LawnCareEvent` model (e.g., `WaterAmountInches`, `FertilizerType`, `MowerHeightInches`). + - Update forms to include these new fields, using conditional logic where appropriate. + +- [ ] **Architecture: Refactor to a Service Layer** + - Create an `ILawnCareService` interface and `LawnCareService` class. + - Move all database query logic from controllers into the service layer to improve separation of concerns. + +- [ ] **Feature: User Authentication** + - Integrate ASP.NET Core Identity to allow users to register and log in. + - Associate lawn care events with a specific user ID so each user only sees their own data. + +- [ ] **Deployment: Containerize with Docker** + - Add a `Dockerfile` to the project to create a portable container image of the application. \ No newline at end of file